Re: [PATCH 04/14] drm/i915: Move drrs hardware bit frobbing to small helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 27 Jan 2022, Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> wrote:
> On Thu, Jan 27, 2022 at 01:24:05PM +0200, Jani Nikula wrote:
>> On Thu, 27 Jan 2022, Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx> wrote:
>> > On Thu, 27 Jan 2022, Ville Syrjala <ville.syrjala@xxxxxxxxxxxxxxx> wrote:
>> >> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>> >>
>> >> Split the drrs code that actually changes the refresh rate
>> >> (via PIPECONF or M/N values) to small helper functions that
>> >> only deal with the hardware details an nothing else. We'll
>> >> soon have a third way of doing this, and it's less confusing
>> >> when each difference method lives in its own funciton.
>> >>
>> >> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>> >> ---
>> >>  drivers/gpu/drm/i915/display/intel_drrs.c | 67 ++++++++++++-----------
>> >>  1 file changed, 36 insertions(+), 31 deletions(-)
>> >>
>> >> diff --git a/drivers/gpu/drm/i915/display/intel_drrs.c b/drivers/gpu/drm/i915/display/intel_drrs.c
>> >> index 46be46f2c47e..0cacdb174fd0 100644
>> >> --- a/drivers/gpu/drm/i915/display/intel_drrs.c
>> >> +++ b/drivers/gpu/drm/i915/display/intel_drrs.c
>> >> @@ -87,6 +87,38 @@ intel_drrs_compute_config(struct intel_dp *intel_dp,
>> >>  		pipe_config->dp_m2_n2.data_m *= pipe_config->splitter.link_count;
>> >>  }
>> >>  
>> >> +static void
>> >> +intel_drrs_set_refresh_rate_pipeconf(const struct intel_crtc_state *crtc_state,
>> >> +				     enum drrs_refresh_rate_type refresh_type)
>> >
>> > Side note, for future, does this really need to be an enum? Could it
>> > just be a bool "reduced" or something?
>> 
>> And I mean throughout the driver, not just right here.
>
> I suppose a bool would suffice. I was going to rename it to
> at least have a bit more consistent namespace, but perhaps
> we could just nuke it entirely.

Also, should be done in follow-up, let's not complicate this set any
more.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Graphics Center




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux