Re: [PATCH v2 01/25] drm/drm_panel: no error when no callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michał

> > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> > index ce8da64022b4..d71655b2634c 100644
> > --- a/include/drm/drm_panel.h
> > +++ b/include/drm/drm_panel.ha
> [...]
> >  	/**
> >  	 * @get_modes:
> >  	 *
> > -	 * Add modes to the connector that the panel is attached to and
> > -	 * return the number of modes added.
> > +	 * Add modes to the connector that the panel is attached to.
> > +	 *
> > +	 * This function is mandatory.
> > +	 *
> > +	 * Returns the number of modes added, -EOPNOTSUPP if callback
> > +	 * is missing, -EINVAL if panel is NULL.
> >  	 */
> >  	int (*get_modes)(struct drm_panel *panel);
> >  
> 
> Hi!
> 
> If .get_modes is mandatory, then panel->func != NULL checks can be removed
> if panel->func and .get_modes presence gets checked at panel probe time.

drivers are supposed to use drm_panel_init() to set up panel-func,
so that would be a good time to verify that preconditions are met.
But as we have no control if any drivers does wrong things later
the checks for consistency still makes sense.
I have a few other small changes pending and will include checks
in drm_panel_init().

Thanks,
	Sam
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux