[Intel-gfx] [PATCH 3/3] drm/i915: Initialize drm_driver vblank funcs at compile time

Chris Wilson chris at chris-wilson.co.uk
Tue Jun 18 14:55:10 UTC 2019


Quoting Ville Syrjala (2019-06-18 15:21:08)
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Move the .get_vblank_timestamp() and .get_scanout_position()
> initialization to happen at compile time. No point in delaying
> it since we always assign the same functions.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c |  3 +++
>  drivers/gpu/drm/i915/i915_irq.c | 11 ++++-------
>  drivers/gpu/drm/i915/i915_irq.h |  5 +++++
>  3 files changed, 12 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index ea6b06109d5a..178e9872b905 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -3216,6 +3216,9 @@ static struct drm_driver driver = {
>         .gem_prime_export = i915_gem_prime_export,
>         .gem_prime_import = i915_gem_prime_import,
>  
> +       .get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos,
> +       .get_scanout_position = i915_get_crtc_scanoutpos,

One might suggest intel_get_crtc_scanoutpos, and a push for it to be
passed drm_crtc instead of dev + pipe.

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris


More information about the Intel-gfx mailing list