[PATCH 17/65] drm/i915: pass dev_priv explicitly to PFIT_AUTO_RATIOS
Rodrigo Vivi
rodrigo.vivi at intel.com
Thu Jun 6 15:40:51 UTC 2024
On Tue, Jun 04, 2024 at 06:25:35PM +0300, Jani Nikula wrote:
> Avoid the implicit dev_priv local variable use, and pass dev_priv
> explicitly to the PFIT_AUTO_RATIOS register macro.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_overlay.c | 3 ++-
> drivers/gpu/drm/i915/i915_reg.h | 2 +-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c b/drivers/gpu/drm/i915/display/intel_overlay.c
> index 117120ce5a1d..d3d0e22cdd34 100644
> --- a/drivers/gpu/drm/i915/display/intel_overlay.c
> +++ b/drivers/gpu/drm/i915/display/intel_overlay.c
> @@ -951,7 +951,8 @@ static void update_pfit_vscale_ratio(struct intel_overlay *overlay)
> u32 tmp;
>
> if (intel_de_read(dev_priv, PFIT_CONTROL(dev_priv)) & PFIT_VERT_AUTO_SCALE)
> - tmp = intel_de_read(dev_priv, PFIT_AUTO_RATIOS);
> + tmp = intel_de_read(dev_priv,
> + PFIT_AUTO_RATIOS(dev_priv));
> else
> tmp = intel_de_read(dev_priv,
> PFIT_PGM_RATIOS(dev_priv));
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 094e693c40bf..cd6eda1b6bef 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -1617,7 +1617,7 @@
> #define PFIT_VERT_SCALE_MASK_965 REG_GENMASK(28, 16) /* 965+ */
> #define PFIT_HORIZ_SCALE_MASK_965 REG_GENMASK(12, 0) /* 965+ */
>
> -#define PFIT_AUTO_RATIOS _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x61238)
> +#define PFIT_AUTO_RATIOS(dev_priv) _MMIO(DISPLAY_MMIO_BASE(dev_priv) + 0x61238)
>
> #define PCH_GTC_CTL _MMIO(0xe7000)
> #define PCH_GTC_ENABLE (1 << 31)
> --
> 2.39.2
>
More information about the Intel-gfx
mailing list