[RESEND,1/6] drm/i915/dmc: use intel uncore functions for forcewake register access
diff mbox series

Message ID 20200123140004.14136-1-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, 1:59 p.m. UTC
Move away from I915_READ_FW() and I915_WRITE_FW() and switch to using
intel_uncore_read_fw() and intel_uncore_write_fw(), respectively.

No functional changes.

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

Comments

Ville Syrjala Jan. 23, 2020, 2:10 p.m. UTC | #1
On Thu, Jan 23, 2020 at 03:59:59PM +0200, Jani Nikula wrote:
> Move away from I915_READ_FW() and I915_WRITE_FW() and switch to using
> intel_uncore_read_fw() and intel_uncore_write_fw(), respectively.
> 
> No functional changes.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_csr.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
> index ae25960f74e0..6a408e11a3de 100644
> --- a/drivers/gpu/drm/i915/intel_csr.c
> +++ b/drivers/gpu/drm/i915/intel_csr.c
> @@ -315,7 +315,8 @@ void intel_csr_load_program(struct drm_i915_private *dev_priv)
>  	preempt_disable();
>  
>  	for (i = 0; i < fw_size; i++)
> -		I915_WRITE_FW(CSR_PROGRAM(i), payload[i]);
> +		intel_uncore_write_fw(&dev_priv->uncore, CSR_PROGRAM(i),
> +				      payload[i]);

Why uncore instead of de?

>  
>  	preempt_enable();
>  
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula Jan. 23, 2020, 2:18 p.m. UTC | #2
On Thu, 23 Jan 2020, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Thu, Jan 23, 2020 at 03:59:59PM +0200, Jani Nikula wrote:
>> Move away from I915_READ_FW() and I915_WRITE_FW() and switch to using
>> intel_uncore_read_fw() and intel_uncore_write_fw(), respectively.
>> 
>> No functional changes.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_csr.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
>> index ae25960f74e0..6a408e11a3de 100644
>> --- a/drivers/gpu/drm/i915/intel_csr.c
>> +++ b/drivers/gpu/drm/i915/intel_csr.c
>> @@ -315,7 +315,8 @@ void intel_csr_load_program(struct drm_i915_private *dev_priv)
>>  	preempt_disable();
>>  
>>  	for (i = 0; i < fw_size; i++)
>> -		I915_WRITE_FW(CSR_PROGRAM(i), payload[i]);
>> +		intel_uncore_write_fw(&dev_priv->uncore, CSR_PROGRAM(i),
>> +				      payload[i]);
>
> Why uncore instead of de?

Good question! :)

BR,
Jani.


>
>>  
>>  	preempt_enable();
>>  
>> -- 
>> 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:33 p.m. UTC | #3
Quoting Ville Syrjälä (2020-01-23 14:10:34)
> On Thu, Jan 23, 2020 at 03:59:59PM +0200, Jani Nikula wrote:
> > Move away from I915_READ_FW() and I915_WRITE_FW() and switch to using
> > intel_uncore_read_fw() and intel_uncore_write_fw(), respectively.
> > 
> > No functional changes.
> > 
> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_csr.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
> > index ae25960f74e0..6a408e11a3de 100644
> > --- a/drivers/gpu/drm/i915/intel_csr.c
> > +++ b/drivers/gpu/drm/i915/intel_csr.c
> > @@ -315,7 +315,8 @@ void intel_csr_load_program(struct drm_i915_private *dev_priv)
> >       preempt_disable();
> >  
> >       for (i = 0; i < fw_size; i++)
> > -             I915_WRITE_FW(CSR_PROGRAM(i), payload[i]);
> > +             intel_uncore_write_fw(&dev_priv->uncore, CSR_PROGRAM(i),
> > +                                   payload[i]);
> 
> Why uncore instead of de?

Outside of display/

It might be very well worth moving intel_csr.c under the auspices of
display powermanagement.
-Chris

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index ae25960f74e0..6a408e11a3de 100644
--- a/drivers/gpu/drm/i915/intel_csr.c
+++ b/drivers/gpu/drm/i915/intel_csr.c
@@ -315,7 +315,8 @@  void intel_csr_load_program(struct drm_i915_private *dev_priv)
 	preempt_disable();
 
 	for (i = 0; i < fw_size; i++)
-		I915_WRITE_FW(CSR_PROGRAM(i), payload[i]);
+		intel_uncore_write_fw(&dev_priv->uncore, CSR_PROGRAM(i),
+				      payload[i]);
 
 	preempt_enable();