[Intel-gfx] [PATCH 3/3] drm/i915/drv: use intel_uncore_write() for register access

Chris Wilson chris at chris-wilson.co.uk
Tue Feb 25 11:46:04 UTC 2020


Quoting Jani Nikula (2020-02-25 11:15:09)
> The implicit "dev_priv" local variable use has been a long-standing pain
> point in the register access macros I915_READ(), I915_WRITE(),
> POSTING_READ(), I915_READ_FW(), and I915_WRITE_FW().
> 
> Replace the sole remaining I915_WRITE() in i915_drv.c with
> intel_uncore_write(), although it might be better to keep the entire
> file void of direct register access.
> 
> No functional changes.
> 
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 7f0e0ba918e9..57e2fc911dac 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -758,7 +758,8 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
>          * when running inside a VM.
>          */
>         if (intel_vgpu_active(dev_priv))
> -               I915_WRITE(vgtif_reg(display_ready), VGT_DRV_DISPLAY_READY);
> +               intel_uncore_write(&dev_priv->uncore, vgtif_reg(display_ready),
> +                                  VGT_DRV_DISPLAY_READY);

Bonus patch for intel_vgpu_register() ?

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


More information about the Intel-gfx mailing list