From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <jouni.hogander@intel.com>
Subject: Re: [PATCH 05/19] drm/i915: pass dev_priv explicitly to EDP_PSR_AUX_CTL
Date: Thu, 2 May 2024 08:56:23 -0400 [thread overview]
Message-ID: <ZjONdzJ2cu601TFI@intel.com> (raw)
In-Reply-To: <87edakpnpa.fsf@intel.com>
On Thu, May 02, 2024 at 12:28:33PM +0300, Jani Nikula wrote:
> On Tue, 30 Apr 2024, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> > On Tue, Apr 30, 2024 at 01:09:59PM +0300, Jani Nikula wrote:
> >> Avoid the implicit dev_priv local variable use, and pass dev_priv
> >> explicitly to the EDP_PSR_AUX_CTL register macro.
> >>
> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >
> > Two things crossing my mind at this point:
> >
> > 1. perhaps we should have grouped by impacted file and all these psr cases
> > together?
> > 2. then perhaps while doing the whole file we could already do a
> > s/dev_priv/i915 on those impacted functions..
> >
> > but well, it crossed my mind, but I'm actually happy with this easy
> > review and perhaps a last full sed s/dev_priv/i915.
>
> I'm actually not going for s/dev_priv/i915/ at all! The next step is
> going to be passing struct intel_display * to the register macros. It'll
> just work, because all they use is
>
> #define DISPLAY_INFO(i915) (__to_intel_display(i915)->info.__device_info)
>
> which handles either.
>
> And going for struct intel_display * is just slightly more involved than
> the pure rename.
ack. it makes total sense and much better indeed.
>
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> Thanks for the reviews!
>
> BR,
> Jani.
>
> >
> >> ---
> >> drivers/gpu/drm/i915/display/intel_psr.c | 2 +-
> >> drivers/gpu/drm/i915/display/intel_psr_regs.h | 2 +-
> >> 2 files changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> >> index 0b1f7e62470e..daeb1b65a2e5 100644
> >> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> >> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> >> @@ -323,7 +323,7 @@ static i915_reg_t psr_aux_ctl_reg(struct drm_i915_private *dev_priv,
> >> enum transcoder cpu_transcoder)
> >> {
> >> if (DISPLAY_VER(dev_priv) >= 8)
> >> - return EDP_PSR_AUX_CTL(cpu_transcoder);
> >> + return EDP_PSR_AUX_CTL(dev_priv, cpu_transcoder);
> >> else
> >> return HSW_SRD_AUX_CTL;
> >> }
> >> diff --git a/drivers/gpu/drm/i915/display/intel_psr_regs.h b/drivers/gpu/drm/i915/display/intel_psr_regs.h
> >> index 5fd4f875ade0..a4f785bcf605 100644
> >> --- a/drivers/gpu/drm/i915/display/intel_psr_regs.h
> >> +++ b/drivers/gpu/drm/i915/display/intel_psr_regs.h
> >> @@ -86,7 +86,7 @@
> >> #define HSW_SRD_AUX_CTL _MMIO(0x64810)
> >> #define _SRD_AUX_CTL_A 0x60810
> >> #define _SRD_AUX_CTL_EDP 0x6f810
> >> -#define EDP_PSR_AUX_CTL(tran) _MMIO_TRANS2(dev_priv, tran, _SRD_AUX_CTL_A)
> >> +#define EDP_PSR_AUX_CTL(dev_priv, tran) _MMIO_TRANS2(dev_priv, tran, _SRD_AUX_CTL_A)
> >> #define EDP_PSR_AUX_CTL_TIME_OUT_MASK DP_AUX_CH_CTL_TIME_OUT_MASK
> >> #define EDP_PSR_AUX_CTL_MESSAGE_SIZE_MASK DP_AUX_CH_CTL_MESSAGE_SIZE_MASK
> >> #define EDP_PSR_AUX_CTL_PRECHARGE_2US_MASK DP_AUX_CH_CTL_PRECHARGE_2US_MASK
> >> --
> >> 2.39.2
> >>
>
> --
> Jani Nikula, Intel
next prev parent reply other threads:[~2024-05-02 12:56 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 10:09 [PATCH 00/19] drm/i915/psr: implicit dev_priv removal Jani Nikula
2024-04-30 10:09 ` [PATCH 01/19] drm/i915: pass dev_priv explicitly to TRANS_EXITLINE Jani Nikula
2024-05-01 2:05 ` Rodrigo Vivi
2024-04-30 10:09 ` [PATCH 02/19] drm/i915: pass dev_priv explicitly to EDP_PSR_CTL Jani Nikula
2024-05-01 2:05 ` Rodrigo Vivi
2024-04-30 10:09 ` [PATCH 03/19] drm/i915: pass dev_priv explicitly to TRANS_PSR_IMR Jani Nikula
2024-05-01 2:14 ` Rodrigo Vivi
2024-04-30 10:09 ` [PATCH 04/19] drm/i915: pass dev_priv explicitly to TRANS_PSR_IIR Jani Nikula
2024-05-01 2:15 ` Rodrigo Vivi
2024-04-30 10:09 ` [PATCH 05/19] drm/i915: pass dev_priv explicitly to EDP_PSR_AUX_CTL Jani Nikula
2024-05-01 2:18 ` Rodrigo Vivi
2024-05-02 9:28 ` Jani Nikula
2024-05-02 12:56 ` Rodrigo Vivi [this message]
2024-04-30 10:10 ` [PATCH 06/19] drm/i915: pass dev_priv explicitly to EDP_PSR_AUX_DATA Jani Nikula
2024-05-01 2:18 ` Rodrigo Vivi
2024-04-30 10:10 ` [PATCH 07/19] drm/i915: pass dev_priv explicitly to EDP_PSR_STATUS Jani Nikula
2024-05-01 2:19 ` Rodrigo Vivi
2024-04-30 10:10 ` [PATCH 08/19] drm/i915: pass dev_priv explicitly to EDP_PSR_PERF_CNT Jani Nikula
2024-05-01 2:19 ` Rodrigo Vivi
2024-04-30 10:10 ` [PATCH 09/19] drm/i915: pass dev_priv explicitly to EDP_PSR_DEBUG Jani Nikula
2024-05-01 2:19 ` Rodrigo Vivi
2024-04-30 10:10 ` [PATCH 10/19] drm/i915: pass dev_priv explicitly to EDP_PSR2_CTL Jani Nikula
2024-05-01 2:20 ` Rodrigo Vivi
2024-04-30 10:10 ` [PATCH 11/19] drm/i915: pass dev_priv explicitly to PSR_EVENT Jani Nikula
2024-05-01 2:20 ` Rodrigo Vivi
2024-04-30 10:10 ` [PATCH 12/19] drm/i915: pass dev_priv explicitly to EDP_PSR2_STATUS Jani Nikula
2024-05-01 2:21 ` Rodrigo Vivi
2024-04-30 10:10 ` [PATCH 13/19] drm/i915: pass dev_priv explicitly to _PSR2_SU_STATUS Jani Nikula
2024-05-01 2:23 ` Rodrigo Vivi
2024-05-02 9:30 ` Jani Nikula
2024-05-02 10:39 ` [PATCH v2] drm/i915: pass dev_priv explicitly to PSR2_SU_STATUS Jani Nikula
2024-05-02 12:55 ` Rodrigo Vivi
2024-04-30 10:10 ` [PATCH 14/19] drm/i915: pass dev_priv explicitly to PSR2_MAN_TRK_CTL Jani Nikula
2024-05-01 2:23 ` Rodrigo Vivi
2024-04-30 10:10 ` [PATCH 15/19] drm/i915: pass dev_priv explicitly to PIPE_SRCSZ_ERLY_TPT Jani Nikula
2024-05-01 2:24 ` Rodrigo Vivi
2024-04-30 10:10 ` [PATCH 16/19] drm/i915: pass dev_priv explicitly to ALPM_CTL Jani Nikula
2024-05-01 2:24 ` Rodrigo Vivi
2024-04-30 10:10 ` [PATCH 17/19] drm/i915: pass dev_priv explicitly to ALPM_CTL2 Jani Nikula
2024-05-01 2:25 ` Rodrigo Vivi
2024-05-02 10:40 ` Jani Nikula
2024-05-06 7:34 ` Hogander, Jouni
2024-05-06 8:28 ` Jani Nikula
2024-04-30 10:10 ` [PATCH 18/19] drm/i915: pass dev_priv explicitly to PORT_ALPM_CTL Jani Nikula
2024-05-01 2:26 ` Rodrigo Vivi
2024-04-30 10:10 ` [PATCH 19/19] drm/i915: pass dev_priv explicitly to PORT_ALPM_LFPS_CTL Jani Nikula
2024-05-01 2:26 ` Rodrigo Vivi
2024-04-30 12:09 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/psr: implicit dev_priv removal Patchwork
2024-04-30 12:09 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-04-30 12:16 ` ✓ Fi.CI.BAT: success " Patchwork
2024-04-30 16:31 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-05-02 11:36 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/psr: implicit dev_priv removal (rev2) Patchwork
2024-05-02 11:40 ` ✗ Fi.CI.BAT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZjONdzJ2cu601TFI@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=jouni.hogander@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox