drm/bridge/synopsys: dsi: allows LP commands in video mode
Subsystems (3)
PATCH 1/1 drm/bridge/synopsys: dsi: allows LP commands in video mode
From: Antonio Borneo <[email protected]>
Current code only sends LP commands in command mode.
Allows sending LP commands also in video mode by setting the proper flag in DSI_VID_MODE_CFG.
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/153242
--- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +7 -0
@@ -367,6 +367,13 @@ static void dw_mipi_message_config(struct dw_mipi_dsi *dsi,dsi_write (dsi,DSI_LPCLK_CTRL , lpm ?0 :PHY_TXREQUESTCLKHS );dsi_write (dsi,DSI_CMD_MODE_CFG , val); + + val =dsi_read (dsi,DSI_VID_MODE_CFG ); +if (lpm) + val |=ENABLE_LOW_POWER_CMD ; +else + val &= ~ENABLE_LOW_POWER_CMD ; +dsi_write (dsi,DSI_VID_MODE_CFG , val); }static int dw_mipi_dsi_gen_pkt_hdr_write (struct dw_mipi_dsi *dsi,u32 hdr_val)
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Yannick.
Quoted 10 lines · Yannick Fertre
From: Antonio Borneo <[email protected]>
Current code only sends LP commands in command mode.
Allows sending LP commands also in video mode by setting the proper flag in
DSI_VID_MODE_CFG.Signed-off-by Antonio Borneo <[email protected]>Change-Id: Ib78fa37bcc7559ce63017acd6ee0bbf00c61a397
Change-Id is not used in kernel patches to my best knowledge.
Quoted 3 lines
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/153242
Reviewed-by CITOOLS <[email protected]>Reviewed-by CIBUILD <[email protected]>
Reviews by humans, not machines..
Quoted 13 lines
Reviewed-by Yannick FERTRE <[email protected]>Reviewed-by Philippe CORNU <[email protected]>Tested-by Yannick FERTRE <[email protected]>--- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +0
-0@@ -367,6 +367,13 @@ static void dw_mipi_message_config(struct dw_mipi_dsi *dsi,
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c static void dw_mipi_message_config(struct dw_mipi_dsi *dsi, · line 377
Quoted 10 lines
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +7
-0dsi_write (dsi,DSI_LPCLK_CTRL , lpm ?0 :PHY_TXREQUESTCLKHS );dsi_write (dsi,DSI_CMD_MODE_CFG , val); + + val =dsi_read (dsi,DSI_VID_MODE_CFG ); +if (lpm) + val |=ENABLE_LOW_POWER_CMD ; +else + val &= ~ENABLE_LOW_POWER_CMD ; +dsi_write (dsi,DSI_VID_MODE_CFG , val); }
We have following code:
static void dw_mipi_dsi_set_mode(struct dw_mipi_dsi *dsi,
unsigned long mode_flags)
{
dsi_write(dsi, DSI_PWR_UP, RESET);
if (mode_flags & MIPI_DSI_MODE_VIDEO) {
dsi_write(dsi, DSI_MODE_CFG, ENABLE_VIDEO_MODE);
dw_mipi_dsi_video_mode_config(dsi);
dsi_write(dsi, DSI_LPCLK_CTRL, PHY_TXREQUESTCLKHS);
} else {
dsi_write(dsi, DSI_MODE_CFG, ENABLE_CMD_MODE);
}
dsi_write(dsi, DSI_PWR_UP, POWERUP);
}Here DSI_MODE_CFG is used to set vidoe mode or not.
But the code snip above checks DSI_VID_MODE_CFG.
It looks inconsistent.
I do not know the HW - and just stumbled over this.
Sam
Quoted 9 lines
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +0
-0static int dw_mipi_dsi_gen_pkt_hdr_write (struct dw_mipi_dsi *dsi,u32 hdr_val)Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel