Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/backlight: use VLV_DISPLAY_BASE for VLV/CHV backlight registers

Since the VLV/CHV backlight registers are only used on VLV/CHV, there's
no need to dynamically look up DISPLAY_MMIO_BASE(). We know it's
VLV_DISPLAY_BASE. Use it statically, reducing the implicit dev_priv
references.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/eb252083a56ec64b4fdb58d4d30abcf305a3a9c2.1670405587.git.jani.nikula@intel.com

+9 -12
+9 -12
drivers/gpu/drm/i915/display/intel_backlight_regs.h
··· 8 8 9 9 #include "intel_display_reg_defs.h" 10 10 11 - #define _VLV_BLC_PWM_CTL2_A (DISPLAY_MMIO_BASE(dev_priv) + 0x61250) 12 - #define _VLV_BLC_PWM_CTL2_B (DISPLAY_MMIO_BASE(dev_priv) + 0x61350) 13 - #define VLV_BLC_PWM_CTL2(pipe) _MMIO_PIPE(pipe, _VLV_BLC_PWM_CTL2_A, \ 14 - _VLV_BLC_PWM_CTL2_B) 11 + #define _VLV_BLC_PWM_CTL2_A (VLV_DISPLAY_BASE + 0x61250) 12 + #define _VLV_BLC_PWM_CTL2_B (VLV_DISPLAY_BASE + 0x61350) 13 + #define VLV_BLC_PWM_CTL2(pipe) _MMIO_PIPE(pipe, _VLV_BLC_PWM_CTL2_A, _VLV_BLC_PWM_CTL2_B) 15 14 16 - #define _VLV_BLC_PWM_CTL_A (DISPLAY_MMIO_BASE(dev_priv) + 0x61254) 17 - #define _VLV_BLC_PWM_CTL_B (DISPLAY_MMIO_BASE(dev_priv) + 0x61354) 18 - #define VLV_BLC_PWM_CTL(pipe) _MMIO_PIPE(pipe, _VLV_BLC_PWM_CTL_A, \ 19 - _VLV_BLC_PWM_CTL_B) 15 + #define _VLV_BLC_PWM_CTL_A (VLV_DISPLAY_BASE + 0x61254) 16 + #define _VLV_BLC_PWM_CTL_B (VLV_DISPLAY_BASE + 0x61354) 17 + #define VLV_BLC_PWM_CTL(pipe) _MMIO_PIPE(pipe, _VLV_BLC_PWM_CTL_A, _VLV_BLC_PWM_CTL_B) 20 18 21 - #define _VLV_BLC_HIST_CTL_A (DISPLAY_MMIO_BASE(dev_priv) + 0x61260) 22 - #define _VLV_BLC_HIST_CTL_B (DISPLAY_MMIO_BASE(dev_priv) + 0x61360) 23 - #define VLV_BLC_HIST_CTL(pipe) _MMIO_PIPE(pipe, _VLV_BLC_HIST_CTL_A, \ 24 - _VLV_BLC_HIST_CTL_B) 19 + #define _VLV_BLC_HIST_CTL_A (VLV_DISPLAY_BASE + 0x61260) 20 + #define _VLV_BLC_HIST_CTL_B (VLV_DISPLAY_BASE + 0x61360) 21 + #define VLV_BLC_HIST_CTL(pipe) _MMIO_PIPE(pipe, _VLV_BLC_HIST_CTL_A, _VLV_BLC_HIST_CTL_B) 25 22 26 23 /* Backlight control */ 27 24 #define BLC_PWM_CTL2 _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x61250) /* 965+ only */