diff mbox series

[v5,2/2] drm/i915/display: Use struct intel_display instead of struct drm_i915_private

Message ID 20241105131732.331436-3-mika.kahola@intel.com (mailing list archive)
State New
Headers show
Series drm/i915/display: Power request asserting/deasserting | expand

Commit Message

Kahola, Mika Nov. 5, 2024, 1:17 p.m. UTC
Let's start using struct intel_display instead of struct drm_i915_private
when introducing new code. No functional changes.

v2: Drop tc_to_intel_display() helper funtion (Jani)

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 drivers/gpu/drm/i915/display/intel_tc.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Borah, Chaitanya Kumar Nov. 26, 2024, 9:03 a.m. UTC | #1
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Mika
> Kahola
> Sent: Tuesday, November 5, 2024 6:48 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: jani.nikula@linux.intel.com; Sousa, Gustavo <gustavo.sousa@intel.com>;
> Jadav, Raag <raag.jadav@intel.com>; Kahola, Mika <mika.kahola@intel.com>
> Subject: [PATCH v5 2/2] drm/i915/display: Use struct intel_display instead of
> struct drm_i915_private
> 
> Let's start using struct intel_display instead of struct drm_i915_private when
> introducing new code. No functional changes.
> 
> v2: Drop tc_to_intel_display() helper funtion (Jani)
> 

LGTM. Should we also send this series to xe to get CI results?


Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>

> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_tc.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_tc.c
> b/drivers/gpu/drm/i915/display/intel_tc.c
> index e40d55f4c0c4..d78f57190f3c 100644
> --- a/drivers/gpu/drm/i915/display/intel_tc.c
> +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> @@ -1039,9 +1039,9 @@ static void wa_14020908590(struct intel_display
> *display, bool enable)
> 
>  static void __xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool
> enable)  {
> -	struct drm_i915_private *i915 = tc_to_i915(tc);
> +	struct intel_display *display = to_intel_display(tc->dig_port);
>  	enum port port = tc->dig_port->base.port;
> -	i915_reg_t reg = XELPDP_PORT_BUF_CTL1(i915, port);
> +	i915_reg_t reg = XELPDP_PORT_BUF_CTL1(display, port);
>  	u32 val;
> 
>  	assert_tc_cold_blocked(tc);
> @@ -1050,15 +1050,15 @@ static void
> __xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool ena
>  	 * Gfx driver WA 14020908590 for PTL tcss_rxdetect_clkswb_req/ack
>  	 * handshake violation when pwwreq= 0->1 during TC7/10 entry
>  	 */
> -	if (DISPLAY_VER(i915) == 30)
> -		wa_14020908590(&i915->display, enable);
> +	if (DISPLAY_VER(display) == 30)
> +		wa_14020908590(display, enable);
> 
> -	val = intel_de_read(i915, reg);
> +	val = intel_de_read(display, reg);
>  	if (enable)
>  		val |= XELPDP_TCSS_POWER_REQUEST;
>  	else
>  		val &= ~XELPDP_TCSS_POWER_REQUEST;
> -	intel_de_write(i915, reg, val);
> +	intel_de_write(display, reg, val);
>  }
> 
>  static bool xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool
> enable)
> --
> 2.43.0
Kahola, Mika Nov. 26, 2024, 11:18 a.m. UTC | #2
> -----Original Message-----
> From: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>
> Sent: Tuesday, 26 November 2024 11.04
> To: Kahola, Mika <mika.kahola@intel.com>; intel-gfx@lists.freedesktop.org
> Cc: jani.nikula@linux.intel.com; Sousa, Gustavo <gustavo.sousa@intel.com>;
> Jadav, Raag <raag.jadav@intel.com>; Kahola, Mika <mika.kahola@intel.com>
> Subject: RE: [PATCH v5 2/2] drm/i915/display: Use struct intel_display instead of
> struct drm_i915_private
> 
> 
> 
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of
> > Mika Kahola
> > Sent: Tuesday, November 5, 2024 6:48 PM
> > To: intel-gfx@lists.freedesktop.org
> > Cc: jani.nikula@linux.intel.com; Sousa, Gustavo
> > <gustavo.sousa@intel.com>; Jadav, Raag <raag.jadav@intel.com>; Kahola,
> > Mika <mika.kahola@intel.com>
> > Subject: [PATCH v5 2/2] drm/i915/display: Use struct intel_display
> > instead of struct drm_i915_private
> >
> > Let's start using struct intel_display instead of struct
> > drm_i915_private when introducing new code. No functional changes.
> >
> > v2: Drop tc_to_intel_display() helper funtion (Jani)
> >
> 
> LGTM. Should we also send this series to xe to get CI results?

Thanks for a review!

Jani had some comments as well, so I need to spin another series anyway and I will spin it through xe.

-Mika-
> 
> 
> Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
> 
> > Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_tc.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_tc.c
> > b/drivers/gpu/drm/i915/display/intel_tc.c
> > index e40d55f4c0c4..d78f57190f3c 100644
> > --- a/drivers/gpu/drm/i915/display/intel_tc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_tc.c
> > @@ -1039,9 +1039,9 @@ static void wa_14020908590(struct intel_display
> > *display, bool enable)
> >
> >  static void __xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port
> > *tc, bool
> > enable)  {
> > -	struct drm_i915_private *i915 = tc_to_i915(tc);
> > +	struct intel_display *display = to_intel_display(tc->dig_port);
> >  	enum port port = tc->dig_port->base.port;
> > -	i915_reg_t reg = XELPDP_PORT_BUF_CTL1(i915, port);
> > +	i915_reg_t reg = XELPDP_PORT_BUF_CTL1(display, port);
> >  	u32 val;
> >
> >  	assert_tc_cold_blocked(tc);
> > @@ -1050,15 +1050,15 @@ static void
> > __xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool ena
> >  	 * Gfx driver WA 14020908590 for PTL tcss_rxdetect_clkswb_req/ack
> >  	 * handshake violation when pwwreq= 0->1 during TC7/10 entry
> >  	 */
> > -	if (DISPLAY_VER(i915) == 30)
> > -		wa_14020908590(&i915->display, enable);
> > +	if (DISPLAY_VER(display) == 30)
> > +		wa_14020908590(display, enable);
> >
> > -	val = intel_de_read(i915, reg);
> > +	val = intel_de_read(display, reg);
> >  	if (enable)
> >  		val |= XELPDP_TCSS_POWER_REQUEST;
> >  	else
> >  		val &= ~XELPDP_TCSS_POWER_REQUEST;
> > -	intel_de_write(i915, reg, val);
> > +	intel_de_write(display, reg, val);
> >  }
> >
> >  static bool xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc,
> > bool
> > enable)
> > --
> > 2.43.0
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915/display/intel_tc.c
index e40d55f4c0c4..d78f57190f3c 100644
--- a/drivers/gpu/drm/i915/display/intel_tc.c
+++ b/drivers/gpu/drm/i915/display/intel_tc.c
@@ -1039,9 +1039,9 @@  static void wa_14020908590(struct intel_display *display, bool enable)
 
 static void __xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool enable)
 {
-	struct drm_i915_private *i915 = tc_to_i915(tc);
+	struct intel_display *display = to_intel_display(tc->dig_port);
 	enum port port = tc->dig_port->base.port;
-	i915_reg_t reg = XELPDP_PORT_BUF_CTL1(i915, port);
+	i915_reg_t reg = XELPDP_PORT_BUF_CTL1(display, port);
 	u32 val;
 
 	assert_tc_cold_blocked(tc);
@@ -1050,15 +1050,15 @@  static void __xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool ena
 	 * Gfx driver WA 14020908590 for PTL tcss_rxdetect_clkswb_req/ack
 	 * handshake violation when pwwreq= 0->1 during TC7/10 entry
 	 */
-	if (DISPLAY_VER(i915) == 30)
-		wa_14020908590(&i915->display, enable);
+	if (DISPLAY_VER(display) == 30)
+		wa_14020908590(display, enable);
 
-	val = intel_de_read(i915, reg);
+	val = intel_de_read(display, reg);
 	if (enable)
 		val |= XELPDP_TCSS_POWER_REQUEST;
 	else
 		val &= ~XELPDP_TCSS_POWER_REQUEST;
-	intel_de_write(i915, reg, val);
+	intel_de_write(display, reg, val);
 }
 
 static bool xelpdp_tc_phy_enable_tcss_power(struct intel_tc_port *tc, bool enable)