[RESEND,6/6] drm/i915/pm: use intel de functions for forcewake register access
diff mbox series

Message ID 20200123140004.14136-6-jani.nikula@intel.com
State New
Headers show
Series
  • [RESEND,1/6] drm/i915/dmc: use intel uncore functions for forcewake register access
Related show

Commit Message

Jani Nikula Jan. 23, 2020, 2 p.m. UTC
Move away from I915_READ_FW() and I915_WRITE_FW() in display code, and
switch to using intel_de_read_fw() and intel_de_write_fw(),
respectively.

No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Ville Syrjälä Jan. 23, 2020, 2:16 p.m. UTC | #1
On Thu, Jan 23, 2020 at 04:00:04PM +0200, Jani Nikula wrote:
> Move away from I915_READ_FW() and I915_WRITE_FW() in display code, and
> switch to using intel_de_read_fw() and intel_de_write_fw(),
> respectively.
> 
> No functional changes.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Only a few oddities spotted. Overall series lgtm
For all
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_pm.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 36d158d6c5b2..1cf909d8347b 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -5061,9 +5061,10 @@ static void skl_ddb_entry_write(struct drm_i915_private *dev_priv,
>  				const struct skl_ddb_entry *entry)
>  {
>  	if (entry->end)
> -		I915_WRITE_FW(reg, (entry->end - 1) << 16 | entry->start);
> +		intel_de_write_fw(dev_priv, reg,
> +				  (entry->end - 1) << 16 | entry->start);
>  	else
> -		I915_WRITE_FW(reg, 0);
> +		intel_de_write_fw(dev_priv, reg, 0);
>  }
>  
>  static void skl_write_wm_level(struct drm_i915_private *dev_priv,
> @@ -5079,7 +5080,7 @@ static void skl_write_wm_level(struct drm_i915_private *dev_priv,
>  	val |= level->plane_res_b;
>  	val |= level->plane_res_l << PLANE_WM_LINES_SHIFT;
>  
> -	I915_WRITE_FW(reg, val);
> +	intel_de_write_fw(dev_priv, reg, val);
>  }
>  
>  void skl_write_plane_wm(struct intel_plane *plane,
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Chris Wilson Jan. 23, 2020, 2:34 p.m. UTC | #2
Quoting Ville Syrjälä (2020-01-23 14:16:46)
> On Thu, Jan 23, 2020 at 04:00:04PM +0200, Jani Nikula wrote:
> > Move away from I915_READ_FW() and I915_WRITE_FW() in display code, and
> > switch to using intel_de_read_fw() and intel_de_write_fw(),
> > respectively.
> > 
> > No functional changes.
> > 
> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> 
> Only a few oddities spotted. Overall series lgtm

Concurred, checkpatch is going to have some very stern words regarding
some of those lines!

> For all
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

+1
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Jani Nikula Jan. 27, 2020, 9:18 a.m. UTC | #3
On Thu, 23 Jan 2020, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Ville Syrjälä (2020-01-23 14:16:46)
>> On Thu, Jan 23, 2020 at 04:00:04PM +0200, Jani Nikula wrote:
>> > Move away from I915_READ_FW() and I915_WRITE_FW() in display code, and
>> > switch to using intel_de_read_fw() and intel_de_write_fw(),
>> > respectively.
>> > 
>> > No functional changes.
>> > 
>> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> 
>> Only a few oddities spotted. Overall series lgtm
>
> Concurred, checkpatch is going to have some very stern words regarding
> some of those lines!
>
>> For all
>> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> +1
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Thanks for the reviews, I pushed the ones *not* in display/ with hopes
we'll do the mass conversion there (the other series).

BR,
Jani.

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 36d158d6c5b2..1cf909d8347b 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5061,9 +5061,10 @@  static void skl_ddb_entry_write(struct drm_i915_private *dev_priv,
 				const struct skl_ddb_entry *entry)
 {
 	if (entry->end)
-		I915_WRITE_FW(reg, (entry->end - 1) << 16 | entry->start);
+		intel_de_write_fw(dev_priv, reg,
+				  (entry->end - 1) << 16 | entry->start);
 	else
-		I915_WRITE_FW(reg, 0);
+		intel_de_write_fw(dev_priv, reg, 0);
 }
 
 static void skl_write_wm_level(struct drm_i915_private *dev_priv,
@@ -5079,7 +5080,7 @@  static void skl_write_wm_level(struct drm_i915_private *dev_priv,
 	val |= level->plane_res_b;
 	val |= level->plane_res_l << PLANE_WM_LINES_SHIFT;
 
-	I915_WRITE_FW(reg, val);
+	intel_de_write_fw(dev_priv, reg, val);
 }
 
 void skl_write_plane_wm(struct intel_plane *plane,