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

Daniel Vetter daniel at ffwll.ch
Tue Feb 7 10:52:06 UTC 2017


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.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list