[PATCH 53/65] drm/i915: pass dev_priv explicitly to PIPE_DATA_N2
Rodrigo Vivi
rodrigo.vivi at intel.com
Thu Jun 6 16:12:48 UTC 2024
On Tue, Jun 04, 2024 at 06:26:11PM +0300, Jani Nikula wrote:
> Avoid the implicit dev_priv local variable use, and pass dev_priv
> explicitly to the PIPE_DATA_N2 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_display.c | 4 ++--
> drivers/gpu/drm/i915/i915_reg.h | 2 +-
> drivers/gpu/drm/i915/intel_gvt_mmio_table.c | 8 ++++----
> 3 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index c2a2061a467d..7bf5b2559143 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -2661,7 +2661,7 @@ void intel_cpu_transcoder_set_m2_n2(struct intel_crtc *crtc,
>
> intel_set_m_n(dev_priv, m_n,
> PIPE_DATA_M2(dev_priv, transcoder),
> - PIPE_DATA_N2(transcoder),
> + PIPE_DATA_N2(dev_priv, transcoder),
> PIPE_LINK_M2(transcoder), PIPE_LINK_N2(transcoder));
> }
>
> @@ -3359,7 +3359,7 @@ void intel_cpu_transcoder_get_m2_n2(struct intel_crtc *crtc,
>
> intel_get_m_n(dev_priv, m_n,
> PIPE_DATA_M2(dev_priv, transcoder),
> - PIPE_DATA_N2(transcoder),
> + PIPE_DATA_N2(dev_priv, transcoder),
> PIPE_LINK_M2(transcoder), PIPE_LINK_N2(transcoder));
> }
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 9c56df4c1f9f..465d73ef43e2 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -2382,7 +2382,7 @@
> #define PIPE_DATA_M1(dev_priv, tran) _MMIO_TRANS2(dev_priv, tran, _PIPEA_DATA_M1)
> #define PIPE_DATA_N1(dev_priv, tran) _MMIO_TRANS2(dev_priv, tran, _PIPEA_DATA_N1)
> #define PIPE_DATA_M2(dev_priv, tran) _MMIO_TRANS2(dev_priv, tran, _PIPEA_DATA_M2)
> -#define PIPE_DATA_N2(tran) _MMIO_TRANS2(dev_priv, tran, _PIPEA_DATA_N2)
> +#define PIPE_DATA_N2(dev_priv, tran) _MMIO_TRANS2(dev_priv, tran, _PIPEA_DATA_N2)
> #define PIPE_LINK_M1(tran) _MMIO_TRANS2(dev_priv, tran, _PIPEA_LINK_M1)
> #define PIPE_LINK_N1(tran) _MMIO_TRANS2(dev_priv, tran, _PIPEA_LINK_N1)
> #define PIPE_LINK_M2(tran) _MMIO_TRANS2(dev_priv, tran, _PIPEA_LINK_M2)
> diff --git a/drivers/gpu/drm/i915/intel_gvt_mmio_table.c b/drivers/gpu/drm/i915/intel_gvt_mmio_table.c
> index 4199106f7202..829196c665c6 100644
> --- a/drivers/gpu/drm/i915/intel_gvt_mmio_table.c
> +++ b/drivers/gpu/drm/i915/intel_gvt_mmio_table.c
> @@ -269,7 +269,7 @@ static int iterate_generic_mmio(struct intel_gvt_mmio_table_iter *iter)
> MMIO_D(PIPE_DATA_M1(dev_priv, TRANSCODER_A));
> MMIO_D(PIPE_DATA_N1(dev_priv, TRANSCODER_A));
> MMIO_D(PIPE_DATA_M2(dev_priv, TRANSCODER_A));
> - MMIO_D(PIPE_DATA_N2(TRANSCODER_A));
> + MMIO_D(PIPE_DATA_N2(dev_priv, TRANSCODER_A));
> MMIO_D(PIPE_LINK_M1(TRANSCODER_A));
> MMIO_D(PIPE_LINK_N1(TRANSCODER_A));
> MMIO_D(PIPE_LINK_M2(TRANSCODER_A));
> @@ -277,7 +277,7 @@ static int iterate_generic_mmio(struct intel_gvt_mmio_table_iter *iter)
> MMIO_D(PIPE_DATA_M1(dev_priv, TRANSCODER_B));
> MMIO_D(PIPE_DATA_N1(dev_priv, TRANSCODER_B));
> MMIO_D(PIPE_DATA_M2(dev_priv, TRANSCODER_B));
> - MMIO_D(PIPE_DATA_N2(TRANSCODER_B));
> + MMIO_D(PIPE_DATA_N2(dev_priv, TRANSCODER_B));
> MMIO_D(PIPE_LINK_M1(TRANSCODER_B));
> MMIO_D(PIPE_LINK_N1(TRANSCODER_B));
> MMIO_D(PIPE_LINK_M2(TRANSCODER_B));
> @@ -285,7 +285,7 @@ static int iterate_generic_mmio(struct intel_gvt_mmio_table_iter *iter)
> MMIO_D(PIPE_DATA_M1(dev_priv, TRANSCODER_C));
> MMIO_D(PIPE_DATA_N1(dev_priv, TRANSCODER_C));
> MMIO_D(PIPE_DATA_M2(dev_priv, TRANSCODER_C));
> - MMIO_D(PIPE_DATA_N2(TRANSCODER_C));
> + MMIO_D(PIPE_DATA_N2(dev_priv, TRANSCODER_C));
> MMIO_D(PIPE_LINK_M1(TRANSCODER_C));
> MMIO_D(PIPE_LINK_N1(TRANSCODER_C));
> MMIO_D(PIPE_LINK_M2(TRANSCODER_C));
> @@ -293,7 +293,7 @@ static int iterate_generic_mmio(struct intel_gvt_mmio_table_iter *iter)
> MMIO_D(PIPE_DATA_M1(dev_priv, TRANSCODER_EDP));
> MMIO_D(PIPE_DATA_N1(dev_priv, TRANSCODER_EDP));
> MMIO_D(PIPE_DATA_M2(dev_priv, TRANSCODER_EDP));
> - MMIO_D(PIPE_DATA_N2(TRANSCODER_EDP));
> + MMIO_D(PIPE_DATA_N2(dev_priv, TRANSCODER_EDP));
> MMIO_D(PIPE_LINK_M1(TRANSCODER_EDP));
> MMIO_D(PIPE_LINK_N1(TRANSCODER_EDP));
> MMIO_D(PIPE_LINK_M2(TRANSCODER_EDP));
> --
> 2.39.2
>
More information about the Intel-gfx
mailing list