drm/i915: pass dev_priv explicitly to PIPE_WGC_C21_C20
authorJani Nikula <jani.nikula@intel.com>
Mon, 29 Apr 2024 14:02:20 +0000 (17:02 +0300)
committerJani Nikula <jani.nikula@intel.com>
Tue, 30 Apr 2024 09:14:50 +0000 (12:14 +0300)
Avoid the implicit dev_priv local variable use, and pass dev_priv
explicitly to the PIPE_WGC_C21_C20 register macro.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/af39047d304f8a5c3c7a643f702f66c06ea5d638.1714399071.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_color.c
drivers/gpu/drm/i915/display/intel_color_regs.h

index a4935289729dc2ebe659873d0d8bae624e59bbde..fc27c1bda6765fb9bb4ee5f3831076a29025555f 100644 (file)
@@ -626,7 +626,7 @@ static void vlv_load_wgc_csc(struct intel_crtc *crtc,
        intel_de_write_fw(dev_priv, PIPE_WGC_C12(dev_priv, pipe),
                          csc->coeff[5]);
 
-       intel_de_write_fw(dev_priv, PIPE_WGC_C21_C20(pipe),
+       intel_de_write_fw(dev_priv, PIPE_WGC_C21_C20(dev_priv, pipe),
                          csc->coeff[7] << 16 | csc->coeff[6]);
        intel_de_write_fw(dev_priv, PIPE_WGC_C22(pipe),
                          csc->coeff[8]);
@@ -653,7 +653,7 @@ static void vlv_read_wgc_csc(struct intel_crtc *crtc,
        tmp = intel_de_read_fw(dev_priv, PIPE_WGC_C12(dev_priv, pipe));
        csc->coeff[5] = tmp & 0xffff;
 
-       tmp = intel_de_read_fw(dev_priv, PIPE_WGC_C21_C20(pipe));
+       tmp = intel_de_read_fw(dev_priv, PIPE_WGC_C21_C20(dev_priv, pipe));
        csc->coeff[6] = tmp & 0xffff;
        csc->coeff[7] = tmp >> 16;
 
index 2dc876e10eda29d2a791d17191aa1f46e4463718..c2e06ccf96c45a5e3eff8b32d4d6e53c46f51721 100644 (file)
 #define PIPE_WGC_C02(dev_priv, pipe)           _MMIO_TRANS2(dev_priv, pipe, _PIPE_A_WGC_C02)
 #define PIPE_WGC_C11_C10(dev_priv, pipe)               _MMIO_TRANS2(dev_priv, pipe, _PIPE_A_WGC_C11_C10)
 #define PIPE_WGC_C12(dev_priv, pipe)           _MMIO_TRANS2(dev_priv, pipe, _PIPE_A_WGC_C12)
-#define PIPE_WGC_C21_C20(pipe)         _MMIO_TRANS2(dev_priv, pipe, _PIPE_A_WGC_C21_C20)
+#define PIPE_WGC_C21_C20(dev_priv, pipe)               _MMIO_TRANS2(dev_priv, pipe, _PIPE_A_WGC_C21_C20)
 #define PIPE_WGC_C22(pipe)             _MMIO_TRANS2(dev_priv, pipe, _PIPE_A_WGC_C22)
 
 /* pipe CSC & degamma/gamma LUTs on CHV */