RE: [7/7] drm/i915/dp: Limit brightness level to vbt min brightness

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

 




> -----Original Message-----
> From: Sebastian Wick <sebastian.wick@xxxxxxxxxx>
> Sent: Friday, April 5, 2024 11:26 PM
> To: Kandpal, Suraj <suraj.kandpal@xxxxxxxxx>
> Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx; Borah, Chaitanya Kumar
> <chaitanya.kumar.borah@xxxxxxxxx>; Shankar, Uma
> <uma.shankar@xxxxxxxxx>; Nautiyal, Ankit K <ankit.k.nautiyal@xxxxxxxxx>;
> Murthy, Arun R <arun.r.murthy@xxxxxxxxx>; Nikula, Jani
> <jani.nikula@xxxxxxxxx>; Kumar, Naveen1 <naveen1.kumar@xxxxxxxxx>
> Subject: Re: [7/7] drm/i915/dp: Limit brightness level to vbt min brightness
> 
> On Fri, Apr 05, 2024 at 02:07:05PM +0530, Suraj Kandpal wrote:
> > Limit minimum brightness to vbt min brightness when using aux based
> > brightness control to avoid letting the screen from going completely
> > blank.
> > Sometimes vbt can have some bogus values hence clamping the value for
> > sanity in case of corner case.
> 
> So, you're completely ignoring the value from the EDID now instead?
> 

Yes we will be giving vbt value a preference but yes in case I can add a change wherein
If vbt value ends up being 0 to prefer edid val and if that too is 0 to take a min value of 20

Regards,
Suraj Kandpal
> >
> > --v2
> > -Use something same mechanism to limit minimum brightness that PWM
> > method uses [Jani]
> >
> > Signed-off-by: Suraj Kandpal <suraj.kandpal@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> > b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> > index 20dd5a6a0f3f..eb2a7225dfaa 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
> > @@ -411,6 +411,8 @@ intel_dp_aux_hdr_setup_backlight(struct
> intel_connector *connector, enum pipe pi
> >  	struct intel_panel *panel = &connector->panel;
> >  	struct drm_luminance_range_info *luminance_range =
> >  		&connector->base.display_info.luminance_range;
> > +	u32 min_level = clamp_t(u32,
> > +				connector-
> >panel.vbt.backlight.min_brightness, 0, 64);
> >  	int ret;
> >
> >  	drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] SDR backlight is
> > controlled through %s\n", @@ -427,14 +429,12 @@
> intel_dp_aux_hdr_setup_backlight(struct intel_connector *connector, enum
> pipe pi
> >  		}
> >  	}
> >
> > -	if (luminance_range->max_luminance) {
> > +	if (luminance_range->max_luminance)
> >  		panel->backlight.max = luminance_range->max_luminance;
> > -		panel->backlight.min = luminance_range->min_luminance;
> > -	} else {
> > +	else
> >  		panel->backlight.max = 512;
> > -		panel->backlight.min = 0;
> > -	}
> >
> > +	panel->backlight.min = min_level;
> >  	intel_dp_aux_write_panel_luminance_override(connector);
> >
> >  	drm_dbg_kms(&i915->drm, "[CONNECTOR:%d:%s] Using AUX HDR
> interface
> > for backlight control (range %d..%d)\n",





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

  Powered by Linux