[PATCH 13/19] drm/i915: pass dev_priv explicitly to _PSR2_SU_STATUS

Jani Nikula jani.nikula at intel.com
Thu May 2 09:30:23 UTC 2024


On Tue, 30 Apr 2024, Rodrigo Vivi <rodrigo.vivi at intel.com> wrote:
> On Tue, Apr 30, 2024 at 01:10:07PM +0300, Jani Nikula wrote:
>> Avoid the implicit dev_priv local variable use, and pass dev_priv
>> explicitly to the _PSR2_SU_STATUS register macro.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>
> why aren't we going one level up here already?

Oh, good catch. Because it's a dumb script. If I were to run the script
another time, it would spot that PSR2_SU_STATUS() now depends on
dev_priv, and would fix that in a separate commit.

I guess I'll do that and squash it here.

Thanks,
Jani.

>
>> ---
>>  drivers/gpu/drm/i915/display/intel_psr_regs.h | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_psr_regs.h b/drivers/gpu/drm/i915/display/intel_psr_regs.h
>> index e6c62512512f..762fc0ad7eb5 100644
>> --- a/drivers/gpu/drm/i915/display/intel_psr_regs.h
>> +++ b/drivers/gpu/drm/i915/display/intel_psr_regs.h
>> @@ -221,8 +221,8 @@
>>  
>>  #define _PSR2_SU_STATUS_A		0x60914
>>  #define _PSR2_SU_STATUS_EDP		0x6f914
>> -#define _PSR2_SU_STATUS(tran, index)	_MMIO_TRANS2(dev_priv, tran, _PSR2_SU_STATUS_A + (index) * 4)
>> -#define PSR2_SU_STATUS(tran, frame)	(_PSR2_SU_STATUS(tran, (frame) / 3))
>> +#define _PSR2_SU_STATUS(dev_priv, tran, index)	_MMIO_TRANS2(dev_priv, tran, _PSR2_SU_STATUS_A + (index) * 4)
>> +#define PSR2_SU_STATUS(tran, frame)	(_PSR2_SU_STATUS(dev_priv, tran, (frame) / 3))
>>  #define PSR2_SU_STATUS_SHIFT(frame)	(((frame) % 3) * 10)
>>  #define PSR2_SU_STATUS_MASK(frame)	(0x3ff << PSR2_SU_STATUS_SHIFT(frame))
>>  #define PSR2_SU_STATUS_FRAMES		8
>> -- 
>> 2.39.2
>> 

-- 
Jani Nikula, Intel


More information about the Intel-gfx mailing list