Re: [PATCH] drm/i915/display: Fixed a screen flickering when turning on display from off

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

 



On Wed, 06 Mar 2024, gareth.yu@xxxxxxxxx wrote:
> From: Gareth Yu <gareth.yu@xxxxxxxxx>
>
> Turn on the panel from zero brightness of the last state, the panel was set
> a maximum PWM in the flow. Once the panel initialization is completed, the
> backlight is restored to zero brightness. There is a flckering generated.

Please be more precise in describing what exactly happens and
when. Driver probe? Modeset? What restores backlight to zero brightness?

Better yet, please file a bug at fdo gitlab, attach full dmesg with
debugs, etc.

Before we had the concept of minimum brightness, the minimum was always
0. And the check was:

	if (level == 0)
		level = max;

Historically, the point was, if you're enabling the display and
backlight, you don't want it to be at 0 brightness, because for most
displays that means a black screen.

BR,
Jani.


> Set the brightness to the minimum value when the brightness is less or equal
> to the minimum value to fix this flickering
>
> Cc : Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@xxxxxxxxx>
> Cc : Matt Roper <matthew.d.roper@xxxxxxxxx>
> Cc : Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Signed-off-by: Gareth Yu <gareth.yu@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_backlight.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_backlight.c b/drivers/gpu/drm/i915/display/intel_backlight.c
> index 3f3cd944a1c5..855d6ead905c 100644
> --- a/drivers/gpu/drm/i915/display/intel_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_backlight.c
> @@ -762,7 +762,7 @@ static void __intel_backlight_enable(const struct intel_crtc_state *crtc_state,
>  	WARN_ON(panel->backlight.max == 0);
>  
>  	if (panel->backlight.level <= panel->backlight.min) {
> -		panel->backlight.level = panel->backlight.max;
> +		panel->backlight.level = panel->backlight.min;
>  		if (panel->backlight.device)
>  			panel->backlight.device->props.brightness =
>  				scale_hw_to_user(connector,

-- 
Jani Nikula, Intel




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

  Powered by Linux