From dd91ddcdd507d2964b3203886ca5d16a6fcced7e Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 25 Feb 2020 13:15:09 +0200 Subject: [PATCH] drm/i915/drv: use intel_uncore_write() for register access 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. Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200225111509.21879-3-jani.nikula@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 4e1fcee..3f5946e 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -763,7 +763,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); /* Reveal our presence to userspace */ if (drm_dev_register(dev, 0) == 0) { -- 2.7.4