[PATCH 07/11] drm/i915/pps: pass intel_dp to pps_name()

Jani Nikula jani.nikula at intel.com
Tue Sep 3 14:32:35 UTC 2024


On Tue, 03 Sep 2024, Ville Syrjälä <ville.syrjala at linux.intel.com> wrote:
> On Fri, Aug 30, 2024 at 01:15:44PM +0300, Jani Nikula wrote:
>> Currently all of intel_pps.c passes struct intel_dp around. Do the same
>> with pps_name() instead of passing both struct drm_i915_private and
>> struct intel_pps.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>> ---
>>  drivers/gpu/drm/i915/display/intel_pps.c | 61 +++++++++++++-----------
>>  1 file changed, 32 insertions(+), 29 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_pps.c b/drivers/gpu/drm/i915/display/intel_pps.c
>> index 68141af4da54..1e87ce95c85d 100644
>> --- a/drivers/gpu/drm/i915/display/intel_pps.c
>> +++ b/drivers/gpu/drm/i915/display/intel_pps.c
>> @@ -24,9 +24,12 @@ static void vlv_steal_power_sequencer(struct drm_i915_private *dev_priv,
>>  static void pps_init_delays(struct intel_dp *intel_dp);
>>  static void pps_init_registers(struct intel_dp *intel_dp, bool force_disable_vdd);
>>  
>> -static const char *pps_name(struct drm_i915_private *i915,
>> -			    struct intel_pps *pps)
>> +static const char *pps_name(struct intel_dp *intel_dp)
>>  {
>> +	struct intel_display *display = to_intel_display(intel_dp);
>> +	struct drm_i915_private *i915 = to_i915(display->drm);
>> +	struct intel_pps *pps = &intel_dp->pps;
>> +
>
> I've been thinking that we'd eventually turn intel_pps into some kind of
> proper object with a 1:1 relationship to the corresponding hw block.
> This is sort of going in the opposite direction, but looks trivial
> enough to deal with if/when we get to reworking intel_pps.

Right. I think there are more problematic cases than this one.

> Series is
> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Thanks, appreciated. Pushed the lot to drm-intel-next.

BR,
Jani.

-- 
Jani Nikula, Intel


More information about the Intel-gfx mailing list