Skip to contentSkip to conversation

drm/panel/boe-tv101wum-nl6: set MIPI_DSI_MODE_LPM after sending panel disable cmds

PATCH In review Brady Norander 2 participants 3 messages Apr 21 – Apr 24

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/panel/boe-tv101wum-nl6: set MIPI_DSI_MODE_LPM after sending panel disable cmds

A recent change to Mediatek drm driver enabled HS mode support. With that change, my MT8183-based krane sku176 chromebook display's colors would look darker and desaturated after turning the display off and back on. Looking at other panel drivers, it seems common to enable HS mode to send the disable commands and to disable HS mode afterwards. However, the boe-tv101wum-nl6 driver would never disable HS mode, leading to this issue. Update the behavior of boe_panel_disable to match those other panel drivers. As a side note, I did also test removing the line which enables HS mode during panel_disable. This worked fine for my device, but just in case that doesn't work for other devices, I chose to keep that and instead disable HS mode after sending the panel disable commands.

drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +2 -0
index d5fe105bdbdd..f69b5bd776c0 100644
@@ -1326,6 +1326,8 @@ static int boe_panel_disable(struct drm_panel *panel)
 
 	mipi_dsi_msleep(&ctx, 150);
 
+	boe->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+
 	return ctx.accum_err;
 }
 
Signature · 1 line
2.52.0
maintainer
#1 lore raw
Quoted 18 lines · Brady Norander

A recent change to Mediatek drm driver enabled HS mode support. With that change, my MT8183-based krane sku176 chromebook display's colors would look darker and desaturated after turning the display off and back on. Looking at other panel drivers, it seems common to enable HS mode to send the disable commands and to disable HS mode afterwards. However, the boe-tv101wum-nl6 driver would never disable HS mode, leading to this issue. Update the behavior of boe_panel_disable to match those other panel drivers. As a side note, I did also test removing the line which enables HS mode during panel_disable. This worked fine for my device, but just in case that doesn't work for other devices, I chose to keep that and instead disable HS mode after sending the panel disable commands.

drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +0 -0
index d5fe105bdbdd..f69b5bd776c0 100644

drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c static int boe_panel_disable(struct drm_panel *panel) · line 1333

Quoted 8 lines
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +2 -0
@@ -1326,6 +1326,8 @@ static int boe_panel_disable(struct drm_panel *panel)
 
  	mipi_dsi_msleep(&ctx, 150);
 
+	boe->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+
  	return ctx.accum_err;
  }
 

Could you add a Fixes tag ?

Neil

#2 lore raw
Quoted 28 lines · Neil Armstrong
Quoted 18 lines · Brady Norander

A recent change to Mediatek drm driver enabled HS mode support. With that change, my MT8183-based krane sku176 chromebook display's colors would look darker and desaturated after turning the display off and back on. Looking at other panel drivers, it seems common to enable HS mode to send the disable commands and to disable HS mode afterwards. However, the boe-tv101wum-nl6 driver would never disable HS mode, leading to this issue. Update the behavior of boe_panel_disable to match those other panel drivers. As a side note, I did also test removing the line which enables HS mode during panel_disable. This worked fine for my device, but just in case that doesn't work for other devices, I chose to keep that and instead disable HS mode after sending the panel disable commands.

drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +0 -0
index d5fe105bdbdd..f69b5bd776c0 100644

drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c static int boe_panel_disable(struct drm_panel · line 1331

Quoted 6 lines
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c +2 -0
@@ -1326,6 +1326,8 @@ static int boe_panel_disable(struct drm_panel 
 *panel)
       mipi_dsi_msleep(&ctx, 150);
+    boe->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+
       return ctx.accum_err;
   }

Could you add a Fixes tag ?

Quoted 1 line

Neil

I can add a fixes tag and send a v2. Just one thing I'm not sure about, do I tag the mediatek drm commit which git bisect found, or do I tag the commit which added the panel driver since this faulty logic has existed since the driver was added?