Noted.  Thanks for your consideration, Jani.

Regards
William

-----Original Message-----
From: Jani Nikula <[email protected]> 
Sent: Wednesday, November 10, 2021 6:45 PM
To: Tseng, William <[email protected]>; [email protected]
Cc: Tseng, William <[email protected]>; Ville Syrjala 
<[email protected]>; Kulkarni, Vandita 
<[email protected]>; Lee, Shawn C <[email protected]>; Chiou, 
Cooper <[email protected]>
Subject: Re: [PATCH v3] drm/i915/dsi: transmit brightness command in HS state

On Wed, 10 Nov 2021, William Tseng <[email protected]> wrote:
> In Video Mode, if DSI transcoder is set to transmit packets in LP 
> Escape mode, screen flickering would be obseved when brightness 
> commands are continuously and quickly transmitted to a panel.
>
> The problem may be resolved by changing the mode to transmit packets 
> from Low Power to HS.
>
> Cc: Ville Syrjala <[email protected]>
> Cc: Jani Nikula <[email protected]>
> Cc: Vandita Kulkarni <[email protected]>
> Cc: Lee Shawn C <[email protected]>
> Cc: Cooper Chiou <[email protected]>
> Signed-off-by: William Tseng <[email protected]>
> ---
>  drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c 
> b/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c
> index f61ed82e8867..7d234429e71e 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c
> @@ -71,6 +71,7 @@ static void dcs_set_backlight(const struct 
> drm_connector_state *conn_state, u32
>       u8 data[2] = {};
>       enum port port;
>       size_t len = panel->backlight.max > U8_MAX ? 2 : 1;
> +     unsigned long mode_flags;
>  
>       if (len == 1) {
>               data[0] = level;
> @@ -81,8 +82,11 @@ static void dcs_set_backlight(const struct 
> drm_connector_state *conn_state, u32
>  
>       for_each_dsi_port(port, intel_dsi->dcs_backlight_ports) {
>               dsi_device = intel_dsi->dsi_hosts[port]->device;
> +             mode_flags = dsi_device->mode_flags;
> +             dsi_device->mode_flags &= ~MIPI_DSI_MODE_LPM;
>               mipi_dsi_dcs_write(dsi_device, MIPI_DCS_SET_DISPLAY_BRIGHTNESS,
>                                  &data, len);
> +             dsi_device->mode_flags = mode_flags;

I realize we don't really have a clear picture how to manage
->mode_flags or MIPI_DSI_MODE_LPM in particular, but this seems like the
safest option for now.

Reviewed-by: Jani Nikula <[email protected]>

I'll push once CI results are in; had to request a re-run.



>       }
>  }

--
Jani Nikula, Intel Open Source Graphics Center

Reply via email to