[PATCH v3 01/23] drm: add vblank hooks to struct drm_crtc_funcs

Thierry Reding thierry.reding at gmail.com
Tue Feb 7 11:50:06 UTC 2017


On Tue, Feb 07, 2017 at 11:52:06AM +0100, Daniel Vetter wrote:
> On Tue, Feb 07, 2017 at 11:38:08AM +0100, Andrzej Hajda wrote:
> > On 07.02.2017 10:16, Shawn Guo wrote:
> > > +static u32 __get_vblank_counter(struct drm_device *dev, unsigned int pipe)
> > > +{
> > > +	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
> > > +		struct drm_crtc *crtc = drm_crtc_from_index(dev, pipe);
> > > +
> > > +		if (crtc->funcs->get_vblank_counter)
> > > +			return crtc->funcs->get_vblank_counter(crtc);
> > > +	}
> > > +
> > > +	if (dev->driver->get_vblank_counter)
> > > +		return dev->driver->get_vblank_counter(dev, pipe);
> > 
> > After converting all modeset drivers dev->driver->get_vblank_counter
> > could be called only for non-modeset drivers, ie 'else' can be put
> > before last if, the same for two other callbacks.
> 
> Shawn converted a lot of drivers, but not yet all of them. There's a lot
> more kms drivers, so probably will take some time until we can do this.
> But a good long-term goal indeed.

Probably should be added to that new TODO list thing... =)

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170207/412e2913/attachment.sig>


More information about the dri-devel mailing list