From: Xinlei Lee xinlei.lee@mediatek.com
In upstream-v5.8, dsi_enable will operate panel_enable, but this modification has been moved in v5.9. In order to ensure the timing of dsi_power_on/off and the timing of pulling up/down the MIPI signal, the modification of v5.9 is synchronized in this series of patches.
Changes since v1: 1. Dsi sequence marked with patch adjustment 2. Fixes: mtk_dsi: Use the drm_panel_bridge
Jitao Shi (3): drm/mediatek: Adjust the timing of mipi signal from LP00 to LP11 drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs drm/mediatek: keep dsi as LP00 before dcs cmds transfer
Xinlei Lee (1): drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
drivers/gpu/drm/mediatek/mtk_dsi.c | 73 ++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 24 deletions(-)
From: Jitao Shi jitao.shi@mediatek.com
Old sequence: 1. Pull the MIPI signal high 2. Delay & Dsi_reset 3. Set the dsi timing register 4. dsi clk & lanes leave ulp mode and enter hs mode
New sequence: 1. Set the dsi timing register 2. Pull the MIPI signal high 3. Delay & Dsi_reset 4. dsi clk & lanes leave ulp mode and enter hs mode
In the new sequence 2 & 3 & 4 will be moved to dsi_enbale in later patch.
Signed-off-by: Jitao Shi jitao.shi@mediatek.com Signed-off-by: Xinlei Lee xinlei.lee@mediatek.com --- drivers/gpu/drm/mediatek/mtk_dsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 5d90d2eb0019..6d7b66d5da42 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -649,14 +649,14 @@ static int mtk_dsi_poweron(struct mtk_dsi *dsi) mtk_dsi_reset_engine(dsi); mtk_dsi_phy_timconfig(dsi);
- mtk_dsi_rxtx_control(dsi); - usleep_range(30, 100); - mtk_dsi_reset_dphy(dsi); mtk_dsi_ps_control_vact(dsi); mtk_dsi_set_vm_cmd(dsi); mtk_dsi_config_vdo_timing(dsi); mtk_dsi_set_interrupt_enable(dsi);
+ mtk_dsi_rxtx_control(dsi); + usleep_range(30, 100); + mtk_dsi_reset_dphy(dsi); mtk_dsi_clk_ulp_mode_leave(dsi); mtk_dsi_lane0_ulp_mode_leave(dsi); mtk_dsi_clk_hs_mode(dsi, 0);
From: Jitao Shi jitao.shi@mediatek.com
In order to match the changes of "Use the drm_panel_bridge API", the poweron/poweroff of dsi is extracted from enable/disable and defined as new funcs (pre_enable/post_disable).
Fixes: 2dd8075d2185 ("drm/mediatek: mtk_dsi: Use the drm_panel_bridge API")
Signed-off-by: Jitao Shi jitao.shi@mediatek.com Signed-off-by: Xinlei Lee xinlei.lee@mediatek.com --- drivers/gpu/drm/mediatek/mtk_dsi.c | 45 +++++++++++++++++------------- 1 file changed, 26 insertions(+), 19 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 6d7b66d5da42..e47c338a7c22 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -679,16 +679,6 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi) if (--dsi->refcount != 0) return;
- /* - * mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since - * mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(), - * which needs irq for vblank, and mtk_dsi_stop() will disable irq. - * mtk_dsi_start() needs to be called in mtk_output_dsi_enable(), - * after dsi is fully set. - */ - mtk_dsi_stop(dsi); - - mtk_dsi_switch_to_cmd_mode(dsi, VM_DONE_INT_FLAG, 500); mtk_dsi_reset_engine(dsi); mtk_dsi_lane0_ulp_mode_enter(dsi); mtk_dsi_clk_ulp_mode_enter(dsi); @@ -703,17 +693,9 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi)
static void mtk_output_dsi_enable(struct mtk_dsi *dsi) { - int ret; - if (dsi->enabled) return;
- ret = mtk_dsi_poweron(dsi); - if (ret < 0) { - DRM_ERROR("failed to power on dsi\n"); - return; - } - mtk_dsi_set_mode(dsi); mtk_dsi_clk_hs_mode(dsi, 1);
@@ -727,7 +709,16 @@ static void mtk_output_dsi_disable(struct mtk_dsi *dsi) if (!dsi->enabled) return;
- mtk_dsi_poweroff(dsi); + /* + * mtk_dsi_stop() and mtk_dsi_start() is asymmetric, since + * mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(), + * which needs irq for vblank, and mtk_dsi_stop() will disable irq. + * mtk_dsi_start() needs to be called in mtk_output_dsi_enable(), + * after dsi is fully set. + */ + mtk_dsi_stop(dsi); + + mtk_dsi_switch_to_cmd_mode(dsi, VM_DONE_INT_FLAG, 500);
dsi->enabled = false; } @@ -765,10 +756,26 @@ static void mtk_dsi_bridge_enable(struct drm_bridge *bridge) mtk_output_dsi_enable(dsi); }
+static void mtk_dsi_bridge_pre_enable(struct drm_bridge *bridge) +{ + struct mtk_dsi *dsi = bridge_to_dsi(bridge); + + mtk_dsi_poweron(dsi); +} + +static void mtk_dsi_bridge_post_disable(struct drm_bridge *bridge) +{ + struct mtk_dsi *dsi = bridge_to_dsi(bridge); + + mtk_dsi_poweroff(dsi); +} + static const struct drm_bridge_funcs mtk_dsi_bridge_funcs = { .attach = mtk_dsi_bridge_attach, .disable = mtk_dsi_bridge_disable, .enable = mtk_dsi_bridge_enable, + .pre_enable = mtk_dsi_bridge_pre_enable, + .post_disable = mtk_dsi_bridge_post_disable, .mode_set = mtk_dsi_bridge_mode_set, };
From: Jitao Shi jitao.shi@mediatek.com
To comply with the panel sequence, hold the mipi signal to LP00 before the dcs cmds transmission, and pull the mipi signal high from LP00 to LP11 until the start of the dcs cmds transmission. If dsi is not in cmd mode, then dsi will pull the mipi signal high in the mtk_output_dsi_enable function.
Fixes: 2dd8075d2185 ("drm/mediatek: mtk_dsi: Use the drm_panel_bridge API")
Signed-off-by: Jitao Shi jitao.shi@mediatek.com Signed-off-by: Xinlei Lee xinlei.lee@mediatek.com --- drivers/gpu/drm/mediatek/mtk_dsi.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index e47c338a7c22..62aa646602bb 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -203,6 +203,7 @@ struct mtk_dsi { struct mtk_phy_timing phy_timing; int refcount; bool enabled; + bool lanes_ready; u32 irq_data; wait_queue_head_t irq_wait_queue; const struct mtk_dsi_driver_data *driver_data; @@ -654,13 +655,6 @@ static int mtk_dsi_poweron(struct mtk_dsi *dsi) mtk_dsi_config_vdo_timing(dsi); mtk_dsi_set_interrupt_enable(dsi);
- mtk_dsi_rxtx_control(dsi); - usleep_range(30, 100); - mtk_dsi_reset_dphy(dsi); - mtk_dsi_clk_ulp_mode_leave(dsi); - mtk_dsi_lane0_ulp_mode_leave(dsi); - mtk_dsi_clk_hs_mode(dsi, 0); - return 0; err_disable_engine_clk: clk_disable_unprepare(dsi->engine_clk); @@ -689,6 +683,8 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi) clk_disable_unprepare(dsi->digital_clk);
phy_power_off(dsi->phy); + + dsi->lanes_ready = false; }
static void mtk_output_dsi_enable(struct mtk_dsi *dsi) @@ -696,6 +692,16 @@ static void mtk_output_dsi_enable(struct mtk_dsi *dsi) if (dsi->enabled) return;
+ if (!dsi->lanes_ready) { + dsi->lanes_ready = true; + mtk_dsi_rxtx_control(dsi); + usleep_range(30, 100); + mtk_dsi_reset_dphy(dsi); + mtk_dsi_clk_ulp_mode_leave(dsi); + mtk_dsi_lane0_ulp_mode_leave(dsi); + mtk_dsi_clk_hs_mode(dsi, 0); + } + mtk_dsi_set_mode(dsi); mtk_dsi_clk_hs_mode(dsi, 1);
@@ -907,6 +913,16 @@ static ssize_t mtk_dsi_host_transfer(struct mipi_dsi_host *host, if (MTK_DSI_HOST_IS_READ(msg->type)) irq_flag |= LPRX_RD_RDY_INT_FLAG;
+ if (!dsi->lanes_ready) { + dsi->lanes_ready = true; + mtk_dsi_rxtx_control(dsi); + usleep_range(30, 100); + mtk_dsi_reset_dphy(dsi); + mtk_dsi_clk_ulp_mode_leave(dsi); + mtk_dsi_lane0_ulp_mode_leave(dsi); + mtk_dsi_clk_hs_mode(dsi, 0); + msleep(20); + } if (mtk_dsi_host_send_cmd(dsi, msg, irq_flag) < 0) return -ETIME;
From: Xinlei Lee xinlei.lee@mediatek.com
In the dsi_enable function, mtk_dsi_rxtx_control is to pull up the MIPI signal operation. Before dsi_disable, MIPI should also be pulled down by writing a register instead of disabling dsi.
Signed-off-by: Jitao Shi jitao.shi@mediatek.com Signed-off-by: Xinlei Lee xinlei.lee@mediatek.com --- drivers/gpu/drm/mediatek/mtk_dsi.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 62aa646602bb..17a5270f6c56 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -676,6 +676,8 @@ static void mtk_dsi_poweroff(struct mtk_dsi *dsi) mtk_dsi_reset_engine(dsi); mtk_dsi_lane0_ulp_mode_enter(dsi); mtk_dsi_clk_ulp_mode_enter(dsi); + /* set the lane number as 0 */ + writel(0, dsi->regs + DSI_TXRX_CTRL);
mtk_dsi_disable(dsi);
Le 04/03/2022 à 11:15, xinlei.lee@mediatek.com a écrit :
From: Xinlei Lee xinlei.lee@mediatek.com
In upstream-v5.8, dsi_enable will operate panel_enable, but this modification has been moved in v5.9. In order to ensure the timing of dsi_power_on/off and the timing of pulling up/down the MIPI signal, the modification of v5.9 is synchronized in this series of patches.
Hello,
I'm trying to debug an issue on mt8183 kukui krane sku176 device. The problem is that boe-tv101wum-nl6 panel isn't working. At boot time I can see these logs: panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 panel-boe-tv101wum-nl6 14014000.dsi.0: failed to init panel: -62 and a DSI interrupt time out.
Since I believe the problem is link to DSI/panel enabling sequence I have try this series but that doesn't solve the issue. I notice that when going out of deep sleep mode panel is functional.
May you have any idea to debug/solve this problem ?
Regards, Benjamin
Changes since v1:
- Dsi sequence marked with patch adjustment
- Fixes: mtk_dsi: Use the drm_panel_bridge
Jitao Shi (3): drm/mediatek: Adjust the timing of mipi signal from LP00 to LP11 drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs drm/mediatek: keep dsi as LP00 before dcs cmds transfer
Xinlei Lee (1): drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
drivers/gpu/drm/mediatek/mtk_dsi.c | 73 ++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 24 deletions(-)
On Fri, Mar 4, 2022 at 7:25 PM Benjamin Gaignard benjamin.gaignard@collabora.com wrote:
Le 04/03/2022 à 11:15, xinlei.lee@mediatek.com a écrit :
From: Xinlei Lee xinlei.lee@mediatek.com
In upstream-v5.8, dsi_enable will operate panel_enable, but this modification has been moved in v5.9. In order to ensure the timing of dsi_power_on/off and the timing of pulling up/down the MIPI signal, the modification of v5.9 is synchronized in this series of patches.
Hello,
I'm trying to debug an issue on mt8183 kukui krane sku176 device. The problem is that boe-tv101wum-nl6 panel isn't working. At boot time I can see these logs: panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 panel-boe-tv101wum-nl6 14014000.dsi.0: failed to init panel: -62 and a DSI interrupt time out.
Since I believe the problem is link to DSI/panel enabling sequence I have try this series but that doesn't solve the issue. I notice that when going out of deep sleep mode panel is functional.
May you have any idea to debug/solve this problem ?
Hi Benjamin,
I think this might not be related to this series. Which kernel are you using? I tried the krane sku176 with linux-next 5.17-rc6 (519dd6c19986696f59847ff8bf930436ccffd9a1 (tag: next-20220307, linux-next/master) with or without this series, both can get the display on.
dsi related message: [ 0.206330] mediatek-drm mediatek-drm.1.auto: Adding component match for /soc/dsi@14014000 [ 4.567577] panel-boe-tv101wum-nl6 14014000.dsi.0: supply pp3300 not found, using dummy regulator [ 4.567732] panel-boe-tv101wum-nl6 14014000.dsi.0: GPIO lookup for consumer enable [ 4.567738] panel-boe-tv101wum-nl6 14014000.dsi.0: using device tree for GPIO lookup [ 4.567757] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/soc/dsi@14014000/panel@0[0]' - status (0) [ 4.585884] panel-boe-tv101wum-nl6 14014000.dsi.0: supply pp3300 not found, using dummy regulator [ 4.586037] panel-boe-tv101wum-nl6 14014000.dsi.0: GPIO lookup for consumer enable [ 4.586042] panel-boe-tv101wum-nl6 14014000.dsi.0: using device tree for GPIO lookup [ 4.586059] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/soc/dsi@14014000/panel@0[0]' - status (0) [ 4.587430] mediatek-drm mediatek-drm.1.auto: bound 14014000.dsi (ops 0xffffffd369a752b8)
Maybe some config is not enabled?
Regards, Benjamin
Changes since v1:
- Dsi sequence marked with patch adjustment
- Fixes: mtk_dsi: Use the drm_panel_bridge
Jitao Shi (3): drm/mediatek: Adjust the timing of mipi signal from LP00 to LP11 drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs drm/mediatek: keep dsi as LP00 before dcs cmds transfer
Xinlei Lee (1): drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
drivers/gpu/drm/mediatek/mtk_dsi.c | 73 ++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 24 deletions(-)
Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
Le 08/03/2022 à 10:12, Hsin-Yi Wang a écrit :
On Fri, Mar 4, 2022 at 7:25 PM Benjamin Gaignard benjamin.gaignard@collabora.com wrote:
Le 04/03/2022 à 11:15, xinlei.lee@mediatek.com a écrit :
From: Xinlei Lee xinlei.lee@mediatek.com
In upstream-v5.8, dsi_enable will operate panel_enable, but this modification has been moved in v5.9. In order to ensure the timing of dsi_power_on/off and the timing of pulling up/down the MIPI signal, the modification of v5.9 is synchronized in this series of patches.
Hello,
I'm trying to debug an issue on mt8183 kukui krane sku176 device. The problem is that boe-tv101wum-nl6 panel isn't working. At boot time I can see these logs: panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 panel-boe-tv101wum-nl6 14014000.dsi.0: failed to init panel: -62 and a DSI interrupt time out.
Since I believe the problem is link to DSI/panel enabling sequence I have try this series but that doesn't solve the issue. I notice that when going out of deep sleep mode panel is functional.
May you have any idea to debug/solve this problem ?
Hi Benjamin,
I think this might not be related to this series. Which kernel are you using? I tried the krane sku176 with linux-next 5.17-rc6 (519dd6c19986696f59847ff8bf930436ccffd9a1 (tag: next-20220307, linux-next/master) with or without this series, both can get the display on.
dsi related message: [ 0.206330] mediatek-drm mediatek-drm.1.auto: Adding component match for /soc/dsi@14014000 [ 4.567577] panel-boe-tv101wum-nl6 14014000.dsi.0: supply pp3300 not found, using dummy regulator [ 4.567732] panel-boe-tv101wum-nl6 14014000.dsi.0: GPIO lookup for consumer enable [ 4.567738] panel-boe-tv101wum-nl6 14014000.dsi.0: using device tree for GPIO lookup [ 4.567757] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/soc/dsi@14014000/panel@0[0]' - status (0) [ 4.585884] panel-boe-tv101wum-nl6 14014000.dsi.0: supply pp3300 not found, using dummy regulator [ 4.586037] panel-boe-tv101wum-nl6 14014000.dsi.0: GPIO lookup for consumer enable [ 4.586042] panel-boe-tv101wum-nl6 14014000.dsi.0: using device tree for GPIO lookup [ 4.586059] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/soc/dsi@14014000/panel@0[0]' - status (0) [ 4.587430] mediatek-drm mediatek-drm.1.auto: bound 14014000.dsi (ops 0xffffffd369a752b8)
Maybe some config is not enabled?
I using 5.17.0-rc1-next-20220127 kernel tag. The configs look similar.
I have the follow log at boot time:
[ 1.533384] phy phy-11e50000.dsi-phy.2: Looking up phy-supply from device tree [ 1.533402] phy phy-11e50000.dsi-phy.2: Looking up phy-supply property in node /soc/dsi-phy@11e50000 failed [ 3.173068] mediatek-drm mediatek-drm.1.auto: Adding component match for /soc/dsi@14014000 [ 4.671806] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avdd-supply from device tree [ 4.680348] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avee-supply from device tree [ 4.688784] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp3300-supply from device tree [ 4.697816] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp1800-supply from device tree [ 4.842346] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avdd-supply from device tree [ 4.854573] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avee-supply from device tree [ 4.862976] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp3300-supply from device tree [ 4.871568] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp1800-supply from device tree [ 4.964021] mediatek-drm mediatek-drm.1.auto: bound 14014000.dsi (ops mtk_dsi_component_ops) ... [ 38.273437] [drm] Wait DSI IRQ(0x00000002) Timeout [ 38.281584] panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 [ 38.288651] panel-boe-tv101wum-nl6 14014000.dsi.0: failed to init panel: -62 ... [ 70.113674] mediatek-drm mediatek-drm.1.auto: [drm] *ERROR* flip_done timed out [ 70.121054] mediatek-drm mediatek-drm.1.auto: [drm] *ERROR* [CRTC:45:crtc-0] commit wait timed out [ 70.130037] [drm:mtk_drm_crtc_atomic_begin] *ERROR* new event while there is still a pending event [ 70.241222] ------------[ cut here ]------------ [ 70.245898] [CRTC:45:crtc-0] vblank wait timed out [ 70.250729] WARNING: CPU: 7 PID: 397 at drivers/gpu/drm/drm_atomic_helper.c:1529 drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x24 [ 70.262815] Modules linked in: hci_uart btqca btbcm bluetooth cdc_ether usbnet r8152 mtk_mdp3 hid_multitouch mtk_jpeg panfrost cros_6 [ 70.309348] CPU: 7 PID: 397 Comm: gnome-shell Tainted: G W 5.17.0-rc1-next-20220127+ #57 [ 70.318731] Hardware name: MediaTek krane sku176 board (DT) [ 70.324293] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 70.331244] pc : drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.337762] lr : drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.344279] sp : ffff8000092339e0 [ 70.347583] x29: ffff8000092339e0 x28: 0000000000000001 x27: 0000000000000000 [ 70.354713] x26: 0000000000000000 x25: ffffc7e8feee4660 x24: 0000000000000038 [ 70.361842] x23: ffff6fe702b0d000 x22: 0000000000000001 x21: ffff6fe7030d5080 [ 70.368970] x20: ffff6fe709d7d700 x19: 0000000000000000 x18: 0000000000000030 [ 70.376099] x17: 000000040044ffff x16: 00400032b5503510 x15: ffffffffffffffff [ 70.383227] x14: ffffc7e8ffa99220 x13: 000000000000094b x12: 0000000000000319 [ 70.390354] x11: 6e616c6276205d30 x10: ffffc7e8ffb49220 x9 : 00000000ffffe000 [ 70.397483] x8 : ffffc7e8ffa99220 x7 : 0000000000000001 x6 : 0000000000000000 [ 70.404611] x5 : 0000000000000000 x4 : ffff6fe73b5e4cf8 x3 : ffff6fe73b5f0840 [ 70.411738] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff6fe702f20000 [ 70.418866] Call trace: [ 70.421301] drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.427472] drm_atomic_helper_commit_tail_rpm+0x88/0xac [ 70.432775] commit_tail+0xa0/0x17c [ 70.436254] drm_atomic_helper_commit+0x190/0x3a0 [ 70.440949] drm_atomic_commit+0x5c/0x6c [ 70.444864] drm_mode_gamma_set_ioctl+0x45c/0x640 [ 70.449560] drm_ioctl_kernel+0xc4/0x174 [ 70.453475] drm_ioctl+0x238/0x45c [ 70.456868] __arm64_sys_ioctl+0xac/0xf0 [ 70.460786] invoke_syscall+0x48/0x114 [ 70.464529] el0_svc_common.constprop.0+0x60/0x11c [ 70.469312] do_el0_svc+0x28/0x90 [ 70.472619] el0_svc+0x4c/0x100 [ 70.475754] el0t_64_sync_handler+0xec/0xf0 [ 70.479928] el0t_64_sync+0x1a0/0x1a4 [ 70.483582] irq event stamp: 0 [ 70.486625] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [ 70.492883] hardirqs last disabled at (0): [<ffffc7e8fd49383c>] copy_process+0x658/0x197c [ 70.501053] softirqs last enabled at (0): [<ffffc7e8fd49383c>] copy_process+0x658/0x197c [ 70.509219] softirqs last disabled at (0): [<0000000000000000>] 0x0 [ 70.515475] ---[ end trace 0000000000000000 ]---
Regards, Benjamin
Regards, Benjamin
Changes since v1:
- Dsi sequence marked with patch adjustment
- Fixes: mtk_dsi: Use the drm_panel_bridge
Jitao Shi (3): drm/mediatek: Adjust the timing of mipi signal from LP00 to LP11 drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs drm/mediatek: keep dsi as LP00 before dcs cmds transfer
Xinlei Lee (1): drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
drivers/gpu/drm/mediatek/mtk_dsi.c | 73 ++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 24 deletions(-)
Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
On Tue, Mar 8, 2022 at 6:00 PM Benjamin Gaignard benjamin.gaignard@collabora.com wrote:
Le 08/03/2022 à 10:12, Hsin-Yi Wang a écrit :
On Fri, Mar 4, 2022 at 7:25 PM Benjamin Gaignard benjamin.gaignard@collabora.com wrote:
Le 04/03/2022 à 11:15, xinlei.lee@mediatek.com a écrit :
From: Xinlei Lee xinlei.lee@mediatek.com
In upstream-v5.8, dsi_enable will operate panel_enable, but this modification has been moved in v5.9. In order to ensure the timing of dsi_power_on/off and the timing of pulling up/down the MIPI signal, the modification of v5.9 is synchronized in this series of patches.
Hello,
I'm trying to debug an issue on mt8183 kukui krane sku176 device. The problem is that boe-tv101wum-nl6 panel isn't working. At boot time I can see these logs: panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 panel-boe-tv101wum-nl6 14014000.dsi.0: failed to init panel: -62 and a DSI interrupt time out.
Since I believe the problem is link to DSI/panel enabling sequence I have try this series but that doesn't solve the issue. I notice that when going out of deep sleep mode panel is functional.
May you have any idea to debug/solve this problem ?
Hi Benjamin,
I think this might not be related to this series. Which kernel are you using? I tried the krane sku176 with linux-next 5.17-rc6 (519dd6c19986696f59847ff8bf930436ccffd9a1 (tag: next-20220307, linux-next/master) with or without this series, both can get the display on.
dsi related message: [ 0.206330] mediatek-drm mediatek-drm.1.auto: Adding component match for /soc/dsi@14014000 [ 4.567577] panel-boe-tv101wum-nl6 14014000.dsi.0: supply pp3300 not found, using dummy regulator [ 4.567732] panel-boe-tv101wum-nl6 14014000.dsi.0: GPIO lookup for consumer enable [ 4.567738] panel-boe-tv101wum-nl6 14014000.dsi.0: using device tree for GPIO lookup [ 4.567757] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/soc/dsi@14014000/panel@0[0]' - status (0) [ 4.585884] panel-boe-tv101wum-nl6 14014000.dsi.0: supply pp3300 not found, using dummy regulator [ 4.586037] panel-boe-tv101wum-nl6 14014000.dsi.0: GPIO lookup for consumer enable [ 4.586042] panel-boe-tv101wum-nl6 14014000.dsi.0: using device tree for GPIO lookup [ 4.586059] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/soc/dsi@14014000/panel@0[0]' - status (0) [ 4.587430] mediatek-drm mediatek-drm.1.auto: bound 14014000.dsi (ops 0xffffffd369a752b8)
Maybe some config is not enabled?
I using 5.17.0-rc1-next-20220127 kernel tag. The configs look similar.
I have the follow log at boot time:
Hi Xinlei,
Can you resend this patch to base on the latest rc? This patch no longer applies to rc6, I have to resolve conflict locally.
Thanks
[ 1.533384] phy phy-11e50000.dsi-phy.2: Looking up phy-supply from device tree [ 1.533402] phy phy-11e50000.dsi-phy.2: Looking up phy-supply property in node /soc/dsi-phy@11e50000 failed [ 3.173068] mediatek-drm mediatek-drm.1.auto: Adding component match for /soc/dsi@14014000 [ 4.671806] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avdd-supply from device tree [ 4.680348] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avee-supply from device tree [ 4.688784] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp3300-supply from device tree [ 4.697816] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp1800-supply from device tree [ 4.842346] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avdd-supply from device tree [ 4.854573] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avee-supply from device tree [ 4.862976] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp3300-supply from device tree [ 4.871568] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp1800-supply from device tree [ 4.964021] mediatek-drm mediatek-drm.1.auto: bound 14014000.dsi (ops mtk_dsi_component_ops) ... [ 38.273437] [drm] Wait DSI IRQ(0x00000002) Timeout [ 38.281584] panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 [ 38.288651] panel-boe-tv101wum-nl6 14014000.dsi.0: failed to init panel: -62 ... [ 70.113674] mediatek-drm mediatek-drm.1.auto: [drm] *ERROR* flip_done timed out [ 70.121054] mediatek-drm mediatek-drm.1.auto: [drm] *ERROR* [CRTC:45:crtc-0] commit wait timed out [ 70.130037] [drm:mtk_drm_crtc_atomic_begin] *ERROR* new event while there is still a pending event [ 70.241222] ------------[ cut here ]------------ [ 70.245898] [CRTC:45:crtc-0] vblank wait timed out [ 70.250729] WARNING: CPU: 7 PID: 397 at drivers/gpu/drm/drm_atomic_helper.c:1529 drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x24 [ 70.262815] Modules linked in: hci_uart btqca btbcm bluetooth cdc_ether usbnet r8152 mtk_mdp3 hid_multitouch mtk_jpeg panfrost cros_6 [ 70.309348] CPU: 7 PID: 397 Comm: gnome-shell Tainted: G W 5.17.0-rc1-next-20220127+ #57 [ 70.318731] Hardware name: MediaTek krane sku176 board (DT) [ 70.324293] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 70.331244] pc : drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.337762] lr : drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.344279] sp : ffff8000092339e0 [ 70.347583] x29: ffff8000092339e0 x28: 0000000000000001 x27: 0000000000000000 [ 70.354713] x26: 0000000000000000 x25: ffffc7e8feee4660 x24: 0000000000000038 [ 70.361842] x23: ffff6fe702b0d000 x22: 0000000000000001 x21: ffff6fe7030d5080 [ 70.368970] x20: ffff6fe709d7d700 x19: 0000000000000000 x18: 0000000000000030 [ 70.376099] x17: 000000040044ffff x16: 00400032b5503510 x15: ffffffffffffffff [ 70.383227] x14: ffffc7e8ffa99220 x13: 000000000000094b x12: 0000000000000319 [ 70.390354] x11: 6e616c6276205d30 x10: ffffc7e8ffb49220 x9 : 00000000ffffe000 [ 70.397483] x8 : ffffc7e8ffa99220 x7 : 0000000000000001 x6 : 0000000000000000 [ 70.404611] x5 : 0000000000000000 x4 : ffff6fe73b5e4cf8 x3 : ffff6fe73b5f0840 [ 70.411738] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff6fe702f20000 [ 70.418866] Call trace: [ 70.421301] drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.427472] drm_atomic_helper_commit_tail_rpm+0x88/0xac [ 70.432775] commit_tail+0xa0/0x17c [ 70.436254] drm_atomic_helper_commit+0x190/0x3a0 [ 70.440949] drm_atomic_commit+0x5c/0x6c [ 70.444864] drm_mode_gamma_set_ioctl+0x45c/0x640 [ 70.449560] drm_ioctl_kernel+0xc4/0x174 [ 70.453475] drm_ioctl+0x238/0x45c [ 70.456868] __arm64_sys_ioctl+0xac/0xf0 [ 70.460786] invoke_syscall+0x48/0x114 [ 70.464529] el0_svc_common.constprop.0+0x60/0x11c [ 70.469312] do_el0_svc+0x28/0x90 [ 70.472619] el0_svc+0x4c/0x100 [ 70.475754] el0t_64_sync_handler+0xec/0xf0 [ 70.479928] el0t_64_sync+0x1a0/0x1a4 [ 70.483582] irq event stamp: 0 [ 70.486625] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [ 70.492883] hardirqs last disabled at (0): [<ffffc7e8fd49383c>] copy_process+0x658/0x197c [ 70.501053] softirqs last enabled at (0): [<ffffc7e8fd49383c>] copy_process+0x658/0x197c [ 70.509219] softirqs last disabled at (0): [<0000000000000000>] 0x0 [ 70.515475] ---[ end trace 0000000000000000 ]---
Regards, Benjamin
Regards, Benjamin
Changes since v1:
- Dsi sequence marked with patch adjustment
- Fixes: mtk_dsi: Use the drm_panel_bridge
Jitao Shi (3): drm/mediatek: Adjust the timing of mipi signal from LP00 to LP11 drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs drm/mediatek: keep dsi as LP00 before dcs cmds transfer
Xinlei Lee (1): drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
drivers/gpu/drm/mediatek/mtk_dsi.c | 73 ++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 24 deletions(-)
Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
On Wed, 2022-03-09 at 13:55 +0800, Hsin-Yi Wang wrote:
On Tue, Mar 8, 2022 at 6:00 PM Benjamin Gaignard benjamin.gaignard@collabora.com wrote:
Le 08/03/2022 à 10:12, Hsin-Yi Wang a écrit :
On Fri, Mar 4, 2022 at 7:25 PM Benjamin Gaignard benjamin.gaignard@collabora.com wrote:
Le 04/03/2022 à 11:15, xinlei.lee@mediatek.com a écrit :
From: Xinlei Lee xinlei.lee@mediatek.com
In upstream-v5.8, dsi_enable will operate panel_enable, but this modification has been moved in v5.9. In order to ensure the timing of dsi_power_on/off and the timing of pulling up/down the MIPI signal, the modification of v5.9 is synchronized in this series of patches.
Hello,
I'm trying to debug an issue on mt8183 kukui krane sku176 device. The problem is that boe-tv101wum-nl6 panel isn't working. At boot time I can see these logs: panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 panel-boe-tv101wum-nl6 14014000.dsi.0: failed to init panel: -62 and a DSI interrupt time out.
Since I believe the problem is link to DSI/panel enabling sequence I have try this series but that doesn't solve the issue. I notice that when going out of deep sleep mode panel is functional.
May you have any idea to debug/solve this problem ?
Hi Benjamin,
I think this might not be related to this series. Which kernel are you using? I tried the krane sku176 with linux-next 5.17-rc6 (519dd6c19986696f59847ff8bf930436ccffd9a1 (tag: next-20220307, linux-next/master) with or without this series, both can get the display on.
dsi related message: [ 0.206330] mediatek-drm mediatek-drm.1.auto: Adding component match for /soc/dsi@14014000 [ 4.567577] panel-boe-tv101wum-nl6 14014000.dsi.0: supply pp3300 not found, using dummy regulator [ 4.567732] panel-boe-tv101wum-nl6 14014000.dsi.0: GPIO lookup for consumer enable [ 4.567738] panel-boe-tv101wum-nl6 14014000.dsi.0: using device tree for GPIO lookup [ 4.567757] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/soc/dsi@14014000/panel@0[0]' - status (0) [ 4.585884] panel-boe-tv101wum-nl6 14014000.dsi.0: supply pp3300 not found, using dummy regulator [ 4.586037] panel-boe-tv101wum-nl6 14014000.dsi.0: GPIO lookup for consumer enable [ 4.586042] panel-boe-tv101wum-nl6 14014000.dsi.0: using device tree for GPIO lookup [ 4.586059] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/soc/dsi@14014000/panel@0[0]' - status (0) [ 4.587430] mediatek-drm mediatek-drm.1.auto: bound 14014000.dsi (ops 0xffffffd369a752b8)
Maybe some config is not enabled?
I using 5.17.0-rc1-next-20220127 kernel tag. The configs look similar.
I have the follow log at boot time:
Hi Xinlei,
Can you resend this patch to base on the latest rc? This patch no longer applies to rc6, I have to resolve conflict locally.
Thanks
[ 1.533384] phy phy-11e50000.dsi-phy.2: Looking up phy-supply from device tree [ 1.533402] phy phy-11e50000.dsi-phy.2: Looking up phy-supply property in node /soc/dsi-phy@11e50000 failed [ 3.173068] mediatek-drm mediatek-drm.1.auto: Adding component match for /soc/dsi@14014000 [ 4.671806] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avdd-supply from device tree [ 4.680348] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avee-supply from device tree [ 4.688784] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp3300-supply from device tree [ 4.697816] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp1800-supply from device tree [ 4.842346] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avdd-supply from device tree [ 4.854573] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avee-supply from device tree [ 4.862976] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp3300-supply from device tree [ 4.871568] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp1800-supply from device tree [ 4.964021] mediatek-drm mediatek-drm.1.auto: bound 14014000.dsi (ops mtk_dsi_component_ops) ... [ 38.273437] [drm] Wait DSI IRQ(0x00000002) Timeout [ 38.281584] panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 [ 38.288651] panel-boe-tv101wum-nl6 14014000.dsi.0: failed to init panel: -62 ... [ 70.113674] mediatek-drm mediatek-drm.1.auto: [drm] *ERROR* flip_done timed out [ 70.121054] mediatek-drm mediatek-drm.1.auto: [drm] *ERROR* [CRTC:45:crtc-0] commit wait timed out [ 70.130037] [drm:mtk_drm_crtc_atomic_begin] *ERROR* new event while there is still a pending event [ 70.241222] ------------[ cut here ]------------ [ 70.245898] [CRTC:45:crtc-0] vblank wait timed out [ 70.250729] WARNING: CPU: 7 PID: 397 at drivers/gpu/drm/drm_atomic_helper.c:1529 drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x24 [ 70.262815] Modules linked in: hci_uart btqca btbcm bluetooth cdc_ether usbnet r8152 mtk_mdp3 hid_multitouch mtk_jpeg panfrost cros_6 [ 70.309348] CPU: 7 PID: 397 Comm: gnome-shell Tainted: G W 5.17.0-rc1-next-20220127+ #57 [ 70.318731] Hardware name: MediaTek krane sku176 board (DT) [ 70.324293] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 70.331244] pc : drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.337762] lr : drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.344279] sp : ffff8000092339e0 [ 70.347583] x29: ffff8000092339e0 x28: 0000000000000001 x27: 0000000000000000 [ 70.354713] x26: 0000000000000000 x25: ffffc7e8feee4660 x24: 0000000000000038 [ 70.361842] x23: ffff6fe702b0d000 x22: 0000000000000001 x21: ffff6fe7030d5080 [ 70.368970] x20: ffff6fe709d7d700 x19: 0000000000000000 x18: 0000000000000030 [ 70.376099] x17: 000000040044ffff x16: 00400032b5503510 x15: ffffffffffffffff [ 70.383227] x14: ffffc7e8ffa99220 x13: 000000000000094b x12: 0000000000000319 [ 70.390354] x11: 6e616c6276205d30 x10: ffffc7e8ffb49220 x9 : 00000000ffffe000 [ 70.397483] x8 : ffffc7e8ffa99220 x7 : 0000000000000001 x6 : 0000000000000000 [ 70.404611] x5 : 0000000000000000 x4 : ffff6fe73b5e4cf8 x3 : ffff6fe73b5f0840 [ 70.411738] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff6fe702f20000 [ 70.418866] Call trace: [ 70.421301] drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2 b4 [ 70.427472] drm_atomic_helper_commit_tail_rpm+0x88/0xac [ 70.432775] commit_tail+0xa0/0x17c [ 70.436254] drm_atomic_helper_commit+0x190/0x3a0 [ 70.440949] drm_atomic_commit+0x5c/0x6c [ 70.444864] drm_mode_gamma_set_ioctl+0x45c/0x640 [ 70.449560] drm_ioctl_kernel+0xc4/0x174 [ 70.453475] drm_ioctl+0x238/0x45c [ 70.456868] __arm64_sys_ioctl+0xac/0xf0 [ 70.460786] invoke_syscall+0x48/0x114 [ 70.464529] el0_svc_common.constprop.0+0x60/0x11c [ 70.469312] do_el0_svc+0x28/0x90 [ 70.472619] el0_svc+0x4c/0x100 [ 70.475754] el0t_64_sync_handler+0xec/0xf0 [ 70.479928] el0t_64_sync+0x1a0/0x1a4 [ 70.483582] irq event stamp: 0 [ 70.486625] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [ 70.492883] hardirqs last disabled at (0): [<ffffc7e8fd49383c>] copy_process+0x658/0x197c [ 70.501053] softirqs last enabled at (0): [<ffffc7e8fd49383c>] copy_process+0x658/0x197c [ 70.509219] softirqs last disabled at (0): [<0000000000000000>] 0x0 [ 70.515475] ---[ end trace 0000000000000000 ]---
Regards, Benjamin
Regards, Benjamin
Changes since v1:
- Dsi sequence marked with patch adjustment
- Fixes: mtk_dsi: Use the drm_panel_bridge
Jitao Shi (3): drm/mediatek: Adjust the timing of mipi signal from LP00 to LP11 drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs drm/mediatek: keep dsi as LP00 before dcs cmds transfer
Xinlei Lee (1): drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
drivers/gpu/drm/mediatek/mtk_dsi.c | 73 ++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 24 deletions(-)
Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
Hey Hsin-yi:
I will send the next version based on rc6 in the near future, thanks for your suggestion.
Best Regards! xinlei
On Tue, 2022-03-08 at 11:00 +0100, Benjamin Gaignard wrote:
Le 08/03/2022 à 10:12, Hsin-Yi Wang a écrit :
On Fri, Mar 4, 2022 at 7:25 PM Benjamin Gaignard benjamin.gaignard@collabora.com wrote:
Le 04/03/2022 à 11:15, xinlei.lee@mediatek.com a écrit :
From: Xinlei Lee xinlei.lee@mediatek.com
In upstream-v5.8, dsi_enable will operate panel_enable, but this modification has been moved in v5.9. In order to ensure the timing of dsi_power_on/off and the timing of pulling up/down the MIPI signal, the modification of v5.9 is synchronized in this series of patches.
Hello,
I'm trying to debug an issue on mt8183 kukui krane sku176 device. The problem is that boe-tv101wum-nl6 panel isn't working. At boot time I can see these logs: panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 panel-boe-tv101wum-nl6 14014000.dsi.0: failed to init panel: -62 and a DSI interrupt time out.
Since I believe the problem is link to DSI/panel enabling sequence I have try this series but that doesn't solve the issue. I notice that when going out of deep sleep mode panel is functional.
May you have any idea to debug/solve this problem ?
Hi Benjamin,
I think this might not be related to this series. Which kernel are you using? I tried the krane sku176 with linux-next 5.17-rc6 (519dd6c19986696f59847ff8bf930436ccffd9a1 (tag: next-20220307, linux-next/master) with or without this series, both can get the display on.
dsi related message: [ 0.206330] mediatek-drm mediatek-drm.1.auto: Adding component match for /soc/dsi@14014000 [ 4.567577] panel-boe-tv101wum-nl6 14014000.dsi.0: supply pp3300 not found, using dummy regulator [ 4.567732] panel-boe-tv101wum-nl6 14014000.dsi.0: GPIO lookup for consumer enable [ 4.567738] panel-boe-tv101wum-nl6 14014000.dsi.0: using device tree for GPIO lookup [ 4.567757] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/soc/dsi@14014000/panel@0[0]' - status (0) [ 4.585884] panel-boe-tv101wum-nl6 14014000.dsi.0: supply pp3300 not found, using dummy regulator [ 4.586037] panel-boe-tv101wum-nl6 14014000.dsi.0: GPIO lookup for consumer enable [ 4.586042] panel-boe-tv101wum-nl6 14014000.dsi.0: using device tree for GPIO lookup [ 4.586059] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/soc/dsi@14014000/panel@0[0]' - status (0) [ 4.587430] mediatek-drm mediatek-drm.1.auto: bound 14014000.dsi (ops 0xffffffd369a752b8)
Maybe some config is not enabled?
I using 5.17.0-rc1-next-20220127 kernel tag. The configs look similar.
I have the follow log at boot time:
[ 1.533384] phy phy-11e50000.dsi-phy.2: Looking up phy-supply from device tree [ 1.533402] phy phy-11e50000.dsi-phy.2: Looking up phy-supply property in node /soc/dsi-phy@11e50000 failed [ 3.173068] mediatek-drm mediatek-drm.1.auto: Adding component match for /soc/dsi@14014000 [ 4.671806] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avdd-supply from device tree [ 4.680348] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avee-supply from device tree [ 4.688784] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp3300-supply from device tree [ 4.697816] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp1800-supply from device tree [ 4.842346] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avdd-supply from device tree [ 4.854573] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avee-supply from device tree [ 4.862976] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp3300-supply from device tree [ 4.871568] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp1800-supply from device tree [ 4.964021] mediatek-drm mediatek-drm.1.auto: bound 14014000.dsi (ops mtk_dsi_component_ops) ... [ 38.273437] [drm] Wait DSI IRQ(0x00000002) Timeout [ 38.281584] panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 [ 38.288651] panel-boe-tv101wum-nl6 14014000.dsi.0: failed to init panel: -62 ... [ 70.113674] mediatek-drm mediatek-drm.1.auto: [drm] *ERROR* flip_done timed out [ 70.121054] mediatek-drm mediatek-drm.1.auto: [drm] *ERROR* [CRTC:45:crtc-0] commit wait timed out [ 70.130037] [drm:mtk_drm_crtc_atomic_begin] *ERROR* new event while there is still a pending event [ 70.241222] ------------[ cut here ]------------ [ 70.245898] [CRTC:45:crtc-0] vblank wait timed out [ 70.250729] WARNING: CPU: 7 PID: 397 at drivers/gpu/drm/drm_atomic_helper.c:1529 drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x24 [ 70.262815] Modules linked in: hci_uart btqca btbcm bluetooth cdc_ether usbnet r8152 mtk_mdp3 hid_multitouch mtk_jpeg panfrost cros_6 [ 70.309348] CPU: 7 PID: 397 Comm: gnome-shell Tainted: G W 5.17.0-rc1-next-20220127+ #57 [ 70.318731] Hardware name: MediaTek krane sku176 board (DT) [ 70.324293] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 70.331244] pc : drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.337762] lr : drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.344279] sp : ffff8000092339e0 [ 70.347583] x29: ffff8000092339e0 x28: 0000000000000001 x27: 0000000000000000 [ 70.354713] x26: 0000000000000000 x25: ffffc7e8feee4660 x24: 0000000000000038 [ 70.361842] x23: ffff6fe702b0d000 x22: 0000000000000001 x21: ffff6fe7030d5080 [ 70.368970] x20: ffff6fe709d7d700 x19: 0000000000000000 x18: 0000000000000030 [ 70.376099] x17: 000000040044ffff x16: 00400032b5503510 x15: ffffffffffffffff [ 70.383227] x14: ffffc7e8ffa99220 x13: 000000000000094b x12: 0000000000000319 [ 70.390354] x11: 6e616c6276205d30 x10: ffffc7e8ffb49220 x9 : 00000000ffffe000 [ 70.397483] x8 : ffffc7e8ffa99220 x7 : 0000000000000001 x6 : 0000000000000000 [ 70.404611] x5 : 0000000000000000 x4 : ffff6fe73b5e4cf8 x3 : ffff6fe73b5f0840 [ 70.411738] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff6fe702f20000 [ 70.418866] Call trace: [ 70.421301] drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.427472] drm_atomic_helper_commit_tail_rpm+0x88/0xac [ 70.432775] commit_tail+0xa0/0x17c [ 70.436254] drm_atomic_helper_commit+0x190/0x3a0 [ 70.440949] drm_atomic_commit+0x5c/0x6c [ 70.444864] drm_mode_gamma_set_ioctl+0x45c/0x640 [ 70.449560] drm_ioctl_kernel+0xc4/0x174 [ 70.453475] drm_ioctl+0x238/0x45c [ 70.456868] __arm64_sys_ioctl+0xac/0xf0 [ 70.460786] invoke_syscall+0x48/0x114 [ 70.464529] el0_svc_common.constprop.0+0x60/0x11c [ 70.469312] do_el0_svc+0x28/0x90 [ 70.472619] el0_svc+0x4c/0x100 [ 70.475754] el0t_64_sync_handler+0xec/0xf0 [ 70.479928] el0t_64_sync+0x1a0/0x1a4 [ 70.483582] irq event stamp: 0 [ 70.486625] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [ 70.492883] hardirqs last disabled at (0): [<ffffc7e8fd49383c>] copy_process+0x658/0x197c [ 70.501053] softirqs last enabled at (0): [<ffffc7e8fd49383c>] copy_process+0x658/0x197c [ 70.509219] softirqs last disabled at (0): [<0000000000000000>] 0x0 [ 70.515475] ---[ end trace 0000000000000000 ]---
Regards, Benjamin
Regards, Benjamin
Changes since v1:
- Dsi sequence marked with patch adjustment
- Fixes: mtk_dsi: Use the drm_panel_bridge
Jitao Shi (3): drm/mediatek: Adjust the timing of mipi signal from LP00 to LP11 drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs drm/mediatek: keep dsi as LP00 before dcs cmds transfer
Xinlei Lee (1): drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
drivers/gpu/drm/mediatek/mtk_dsi.c | 73 ++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 24 deletions(-)
Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
Hi Benjamin:
I confirmed with hsin-yi that if she doesn't add these patches, the screen of tv101 should work normally. My local test can also be displayed. panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 =>From this log, it can be seen that the initial code issued by the platform was unsuccessful, and it cannot be ruled out that the panel is no problem. It is recommended to grab the latest kukui kernel on google CPFE or try another platform to test.
Best Regards! xinlei
On Thu, Mar 10, 2022 at 11:33 AM xinlei.lee xinlei.lee@mediatek.com wrote:
On Tue, 2022-03-08 at 11:00 +0100, Benjamin Gaignard wrote:
Le 08/03/2022 à 10:12, Hsin-Yi Wang a écrit :
On Fri, Mar 4, 2022 at 7:25 PM Benjamin Gaignard benjamin.gaignard@collabora.com wrote:
Le 04/03/2022 à 11:15, xinlei.lee@mediatek.com a écrit :
From: Xinlei Lee xinlei.lee@mediatek.com
In upstream-v5.8, dsi_enable will operate panel_enable, but this modification has been moved in v5.9. In order to ensure the timing of dsi_power_on/off and the timing of pulling up/down the MIPI signal, the modification of v5.9 is synchronized in this series of patches.
Hello,
I'm trying to debug an issue on mt8183 kukui krane sku176 device. The problem is that boe-tv101wum-nl6 panel isn't working. At boot time I can see these logs: panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 panel-boe-tv101wum-nl6 14014000.dsi.0: failed to init panel: -62 and a DSI interrupt time out.
Since I believe the problem is link to DSI/panel enabling sequence I have try this series but that doesn't solve the issue. I notice that when going out of deep sleep mode panel is functional.
May you have any idea to debug/solve this problem ?
Hi Benjamin,
I think this might not be related to this series. Which kernel are you using? I tried the krane sku176 with linux-next 5.17-rc6 (519dd6c19986696f59847ff8bf930436ccffd9a1 (tag: next-20220307, linux-next/master) with or without this series, both can get the display on.
dsi related message: [ 0.206330] mediatek-drm mediatek-drm.1.auto: Adding component match for /soc/dsi@14014000 [ 4.567577] panel-boe-tv101wum-nl6 14014000.dsi.0: supply pp3300 not found, using dummy regulator [ 4.567732] panel-boe-tv101wum-nl6 14014000.dsi.0: GPIO lookup for consumer enable [ 4.567738] panel-boe-tv101wum-nl6 14014000.dsi.0: using device tree for GPIO lookup [ 4.567757] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/soc/dsi@14014000/panel@0[0]' - status (0) [ 4.585884] panel-boe-tv101wum-nl6 14014000.dsi.0: supply pp3300 not found, using dummy regulator [ 4.586037] panel-boe-tv101wum-nl6 14014000.dsi.0: GPIO lookup for consumer enable [ 4.586042] panel-boe-tv101wum-nl6 14014000.dsi.0: using device tree for GPIO lookup [ 4.586059] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/soc/dsi@14014000/panel@0[0]' - status (0) [ 4.587430] mediatek-drm mediatek-drm.1.auto: bound 14014000.dsi (ops 0xffffffd369a752b8)
Maybe some config is not enabled?
I using 5.17.0-rc1-next-20220127 kernel tag. The configs look similar.
I have the follow log at boot time:
[ 1.533384] phy phy-11e50000.dsi-phy.2: Looking up phy-supply from device tree [ 1.533402] phy phy-11e50000.dsi-phy.2: Looking up phy-supply property in node /soc/dsi-phy@11e50000 failed [ 3.173068] mediatek-drm mediatek-drm.1.auto: Adding component match for /soc/dsi@14014000 [ 4.671806] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avdd-supply from device tree [ 4.680348] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avee-supply from device tree [ 4.688784] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp3300-supply from device tree [ 4.697816] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp1800-supply from device tree [ 4.842346] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avdd-supply from device tree [ 4.854573] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up avee-supply from device tree [ 4.862976] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp3300-supply from device tree [ 4.871568] panel-boe-tv101wum-nl6 14014000.dsi.0: Looking up pp1800-supply from device tree [ 4.964021] mediatek-drm mediatek-drm.1.auto: bound 14014000.dsi (ops mtk_dsi_component_ops) ... [ 38.273437] [drm] Wait DSI IRQ(0x00000002) Timeout [ 38.281584] panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 [ 38.288651] panel-boe-tv101wum-nl6 14014000.dsi.0: failed to init panel: -62 ... [ 70.113674] mediatek-drm mediatek-drm.1.auto: [drm] *ERROR* flip_done timed out [ 70.121054] mediatek-drm mediatek-drm.1.auto: [drm] *ERROR* [CRTC:45:crtc-0] commit wait timed out [ 70.130037] [drm:mtk_drm_crtc_atomic_begin] *ERROR* new event while there is still a pending event [ 70.241222] ------------[ cut here ]------------ [ 70.245898] [CRTC:45:crtc-0] vblank wait timed out [ 70.250729] WARNING: CPU: 7 PID: 397 at drivers/gpu/drm/drm_atomic_helper.c:1529 drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x24 [ 70.262815] Modules linked in: hci_uart btqca btbcm bluetooth cdc_ether usbnet r8152 mtk_mdp3 hid_multitouch mtk_jpeg panfrost cros_6 [ 70.309348] CPU: 7 PID: 397 Comm: gnome-shell Tainted: G W 5.17.0-rc1-next-20220127+ #57 [ 70.318731] Hardware name: MediaTek krane sku176 board (DT) [ 70.324293] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 70.331244] pc : drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.337762] lr : drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.344279] sp : ffff8000092339e0 [ 70.347583] x29: ffff8000092339e0 x28: 0000000000000001 x27: 0000000000000000 [ 70.354713] x26: 0000000000000000 x25: ffffc7e8feee4660 x24: 0000000000000038 [ 70.361842] x23: ffff6fe702b0d000 x22: 0000000000000001 x21: ffff6fe7030d5080 [ 70.368970] x20: ffff6fe709d7d700 x19: 0000000000000000 x18: 0000000000000030 [ 70.376099] x17: 000000040044ffff x16: 00400032b5503510 x15: ffffffffffffffff [ 70.383227] x14: ffffc7e8ffa99220 x13: 000000000000094b x12: 0000000000000319 [ 70.390354] x11: 6e616c6276205d30 x10: ffffc7e8ffb49220 x9 : 00000000ffffe000 [ 70.397483] x8 : ffffc7e8ffa99220 x7 : 0000000000000001 x6 : 0000000000000000 [ 70.404611] x5 : 0000000000000000 x4 : ffff6fe73b5e4cf8 x3 : ffff6fe73b5f0840 [ 70.411738] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff6fe702f20000 [ 70.418866] Call trace: [ 70.421301] drm_atomic_helper_wait_for_vblanks.part.0+0x290/0x2b4 [ 70.427472] drm_atomic_helper_commit_tail_rpm+0x88/0xac [ 70.432775] commit_tail+0xa0/0x17c [ 70.436254] drm_atomic_helper_commit+0x190/0x3a0 [ 70.440949] drm_atomic_commit+0x5c/0x6c [ 70.444864] drm_mode_gamma_set_ioctl+0x45c/0x640 [ 70.449560] drm_ioctl_kernel+0xc4/0x174 [ 70.453475] drm_ioctl+0x238/0x45c [ 70.456868] __arm64_sys_ioctl+0xac/0xf0 [ 70.460786] invoke_syscall+0x48/0x114 [ 70.464529] el0_svc_common.constprop.0+0x60/0x11c [ 70.469312] do_el0_svc+0x28/0x90 [ 70.472619] el0_svc+0x4c/0x100 [ 70.475754] el0t_64_sync_handler+0xec/0xf0 [ 70.479928] el0t_64_sync+0x1a0/0x1a4 [ 70.483582] irq event stamp: 0 [ 70.486625] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [ 70.492883] hardirqs last disabled at (0): [<ffffc7e8fd49383c>] copy_process+0x658/0x197c [ 70.501053] softirqs last enabled at (0): [<ffffc7e8fd49383c>] copy_process+0x658/0x197c [ 70.509219] softirqs last disabled at (0): [<0000000000000000>] 0x0 [ 70.515475] ---[ end trace 0000000000000000 ]---
Regards, Benjamin
Regards, Benjamin
Changes since v1:
- Dsi sequence marked with patch adjustment
- Fixes: mtk_dsi: Use the drm_panel_bridge
Jitao Shi (3): drm/mediatek: Adjust the timing of mipi signal from LP00 to LP11 drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs drm/mediatek: keep dsi as LP00 before dcs cmds transfer
Xinlei Lee (1): drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
drivers/gpu/drm/mediatek/mtk_dsi.c | 73 ++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 24 deletions(-)
Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
Hi Benjamin:
I confirmed with hsin-yi that if she doesn't add these patches, the screen of tv101 should work normally. My local test can also be displayed. panel-boe-tv101wum-nl6 14014000.dsi.0: failed to write command 1 =>From this log, it can be seen that the initial code issued by the platform was unsuccessful, and it cannot be ruled out that the panel is no problem. It is recommended to grab the latest kukui kernel on google CPFE or try another platform to test.
hi Xinlei, Please test with linux-next as well besides testing on downstream kernel.
Best Regards! xinlei
Please also prefix cover letters with drm/mediatek if that's the only place you're touching.
BR, Jani.
On Fri, 04 Mar 2022, xinlei.lee@mediatek.com wrote:
From: Xinlei Lee xinlei.lee@mediatek.com
In upstream-v5.8, dsi_enable will operate panel_enable, but this modification has been moved in v5.9. In order to ensure the timing of dsi_power_on/off and the timing of pulling up/down the MIPI signal, the modification of v5.9 is synchronized in this series of patches.
Changes since v1:
- Dsi sequence marked with patch adjustment
- Fixes: mtk_dsi: Use the drm_panel_bridge
Jitao Shi (3): drm/mediatek: Adjust the timing of mipi signal from LP00 to LP11 drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs drm/mediatek: keep dsi as LP00 before dcs cmds transfer
Xinlei Lee (1): drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
drivers/gpu/drm/mediatek/mtk_dsi.c | 73 ++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 24 deletions(-)
On Fri, 2022-03-04 at 13:51 +0200, Jani Nikula wrote:
Please also prefix cover letters with drm/mediatek if that's the only place you're touching.
BR, Jani.
On Fri, 04 Mar 2022, xinlei.lee@mediatek.com wrote:
From: Xinlei Lee xinlei.lee@mediatek.com
In upstream-v5.8, dsi_enable will operate panel_enable, but this modification has been moved in v5.9. In order to ensure the timing of dsi_power_on/off and the timing of pulling up/down the MIPI signal, the modification of v5.9 is synchronized in this series of patches.
Changes since v1:
- Dsi sequence marked with patch adjustment
- Fixes: mtk_dsi: Use the drm_panel_bridge
Jitao Shi (3): drm/mediatek: Adjust the timing of mipi signal from LP00 to LP11 drm/mediatek: Separate poweron/poweroff from enable/disable and define new funcs drm/mediatek: keep dsi as LP00 before dcs cmds transfer
Xinlei Lee (1): drm/mediatek: Add pull-down MIPI operation in mtk_dsi_poweroff function
drivers/gpu/drm/mediatek/mtk_dsi.c | 73 ++++++++++++++++++++----
1 file changed, 49 insertions(+), 24 deletions(-)
Hi Jani:
Thanks for your review. Is your suggestion for me to put the fix id on the cover ?
Best Regards! xinlei
On Tue, 08 Mar 2022, xinlei.lee xinlei.lee@mediatek.com wrote:
On Fri, 2022-03-04 at 13:51 +0200, Jani Nikula wrote:
Please also prefix cover letters with drm/mediatek if that's the only place you're touching.
Thanks for your review. Is your suggestion for me to put the fix id on the cover ?
Heh, it's not really review, just something to ease me going through the dri-devel mails in the future.
The cover letter subject is "Cooperate with DSI RX devices to modify dsi funcs and delay mipi high to cooperate with panel sequence" and I don't know whether the thread is about drm dsi helpers or some drivers and what drivers. If the cover letter subject also had the prefix "drm/mediatek:" like all the patches, I could've just skipped it altogether.
Just something to consider in the future, no need to do anything here.
Thanks, Jani.
dri-devel@lists.freedesktop.org