[Intel-gfx] [PATCH 2/5] drm/vblank: Restoring vblank counts after device runtime PM events.

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 3 20:55:47 UTC 2018


Quoting Dhinakaran Pandiyan (2018-01-03 20:39:58)
> The HW frame counter can get reset when devices enters low power
> states and this messes up any following vblank count updates. So, compute
> the missed vblank interrupts for that low power state duration using time
> stamps. This is similar to _crtc_vblank_on() except that it doesn't enable
> vblank interrupts because this function is expected to be called from
> the driver _enable_vblank() vfunc.
> 
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
> ---
>  drivers/gpu/drm/drm_vblank.c | 33 +++++++++++++++++++++++++++++++++
>  include/drm/drm_vblank.h     |  1 +
>  2 files changed, 34 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> index 7eee82c06ed8..494e2cff6e55 100644
> --- a/drivers/gpu/drm/drm_vblank.c
> +++ b/drivers/gpu/drm/drm_vblank.c
> @@ -1230,6 +1230,39 @@ void drm_crtc_vblank_on(struct drm_crtc *crtc)
>  }
>  EXPORT_SYMBOL(drm_crtc_vblank_on);
>  
> +void drm_crtc_vblank_restore(struct drm_device *dev, unsigned int pipe)

drm_crtc_* should be taking the drm_crtc.
-Chris


More information about the Intel-gfx mailing list