2021-01-16 11:45:54

by aleksandr.o.makarov

[permalink] [raw]
Subject: drm: panel: panel-raydium68200 driver fails to write MIPI DSI init commands

I need to bring up my MIPI DSI 1280x720 EDT ETML0500F3DHA panel on a
RockPro64 V2.1 board.

There is no completely suitable in-tree driver for that panel yet, but
for the purpose of reproducing the issue that I face, the
gpu/drm/panel/panel-raydium-rm68200.c can do just fine.

To reproduce:

- Get the same Linux 5.9.14 as on my RockPro64 board (with Armbian
20.11.6 on it)

- Patch the rk3399-rockpro64.dts to add a panel node that is compatible
with "raydium,rm68200" driver on MIPI interface (rockpro64-
rm68200.patch attached)

- Compile and put the resulting rk3399-rockpro64.dtb on the target
system. The panel driver shall then get probed at next boot.

The kernel log shall contain following errors:

[ 10.139957] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.139988] [drm:rm68200_dcs_write_cmd.isra.4
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write failed: -110
[ 10.160972] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.161000] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.181929] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.181953] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.202923] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.202947] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.223064] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.223094] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.226104] zram1: detected capacity change from 0 to 52428800
[ 10.244027] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.244073] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.265024] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.265064] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.285711] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.285746] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.305926] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.305955] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.326996] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.327039] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.348030] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.348074] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110

It's remarkable that if to pull the module panel-rm682000 out and then
back in, there are no errors mentioned. I can for sure say that those
commands become effective - I start seeing colourful stripes on the
display after. That is, if I would send the correct command set to the
panel, then it would bring up just fine. the panel, then it would bring
up just fine.


Attachments:
dmesg-2021-01-15T16:36:02+02:00 (73.47 kB)
rockpro64-rm68200.patch (2.66 kB)
Download all attachments

2021-01-19 17:10:15

by Philippe Cornu

[permalink] [raw]
Subject: RE: panel: panel-raydium68200 driver fails to write MIPI DSI init commands

Dear Aleksandr,

We use the raydium68200 ic driver in a dsi 720p 2dl panel module mounted on the MB1230 board [1], mounted on the STM32MP157 eval board [2].

According to your email, you are using the EDT ETML0500F3DHA panel module, probably composed of a raydium68200+a touchscreen+a glass+backlight+....

Could you please double check if your panel module has the same characteristics as the one described in panel-raydium68200.c (pixel clock, blanking values, resolutions, number of dsi data lanes, enable & reset gpios, backlight...).

Moreover, maybe your panel embeds a non-volatile ram which contains nice default values ("fused" during production) allowing to reduce a lot the panel init sequence... allowing then to use panel-simple.c instead of panel-raydium68200.c (that could explain why you can see "colors" without sending any init sequence).

The issues you encountered may come from (starting with the highest probability):
* bad lcd hw vs sw configuration (see description above).
* bad pixel clock frequency, bad blanking values...
* bad dsi internal Rockchip ip programming (pll and clock trees in dt...)

Hope it helps,

[1] https://wiki.st.com/stm32mpu/wiki/MB1230
[2] https://www.st.com/en/evaluation-tools/stm32mp157a-ev1.html

Philippe :-)

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Saturday, January 16, 2021 12:40
To: Andrzej Hajda <[email protected]>; Neil Armstrong <[email protected]>; Laurent Pinchart <[email protected]>; Jonas Karlman <[email protected]>; Jernej Skrabec <[email protected]>; David Airlie <[email protected]>; Daniel Vetter <[email protected]>; Sam Ravnborg <[email protected]>; Philippe CORNU <[email protected]>; Antonio BORNEO <[email protected]>; <[email protected]> <[email protected]>
Subject: drm: panel: panel-raydium68200 driver fails to write MIPI DSI init commands

I need to bring up my MIPI DSI 1280x720 EDT ETML0500F3DHA panel on a
RockPro64 V2.1 board.

There is no completely suitable in-tree driver for that panel yet, but for the purpose of reproducing the issue that I face, the gpu/drm/panel/panel-raydium-rm68200.c can do just fine.

To reproduce:

- Get the same Linux 5.9.14 as on my RockPro64 board (with Armbian
20.11.6 on it)

- Patch the rk3399-rockpro64.dts to add a panel node that is compatible with "raydium,rm68200" driver on MIPI interface (rockpro64- rm68200.patch attached)

- Compile and put the resulting rk3399-rockpro64.dtb on the target system. The panel driver shall then get probed at next boot.

The kernel log shall contain following errors:

[ 10.139957] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.139988] [drm:rm68200_dcs_write_cmd.isra.4
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write failed: -110
[ 10.160972] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.161000] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.181929] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.181953] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.202923] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.202947] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.223064] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.223094] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.226104] zram1: detected capacity change from 0 to 52428800
[ 10.244027] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.244073] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.265024] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.265064] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.285711] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.285746] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.305926] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.305955] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.326996] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.327039] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
[ 10.348030] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
command FIFO
[ 10.348074] [drm:rm68200_dcs_write_buf.isra.5
[panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110

It's remarkable that if to pull the module panel-rm682000 out and then back in, there are no errors mentioned. I can for sure say that those commands become effective - I start seeing colourful stripes on the display after. That is, if I would send the correct command set to the panel, then it would bring up just fine. the panel, then it would bring up just fine.

2021-01-27 19:51:14

by aleksandr.o.makarov

[permalink] [raw]
Subject: Re: panel: panel-raydium68200 driver fails to write MIPI DSI init commands

В Вт, 19/01/2021 в 16:24 +0000, Philippe CORNU пишет:
> Dear Aleksandr,
>
> We use the raydium68200 ic driver in a dsi 720p 2dl panel module mounted on the MB1230 board [1], mounted on the STM32MP157 eval board [2].
>
> According to your email, you are using the EDT ETML0500F3DHA panel module, probably composed of a raydium68200+a touchscreen+a glass+backlight+....
>
> Could you please double check if your panel module has the same characteristics as the one described in panel-raydium68200.c (pixel clock, blanking values, resolutions, number of dsi data lanes, enable & reset gpios, backlight...).
>
> Moreover, maybe your panel embeds a non-volatile ram which contains nice default values ("fused" during production) allowing to reduce a lot the panel init sequence... allowing then to use panel-simple.c instead of panel-raydium68200.c (that could explain why you can see "colors" without sending any init sequence).
>
> The issues you encountered may come from (starting with the highest probability):
> * bad lcd hw vs sw configuration (see description above).
> * bad pixel clock frequency, bad blanking values...
> * bad dsi internal Rockchip ip programming (pll and clock trees in dt...)
>
> Hope it helps,
>
> [1] https://wiki.st.com/stm32mpu/wiki/MB1230
> [2] https://www.st.com/en/evaluation-tools/stm32mp157a-ev1.html
>
> Philippe :-)
>
I've fixed errors related to writing to DSI after applying this [1]
patch.

With the panel timings and other parameters all left intact in device
tree, I only had to apply that patch to start to see video.

After doing some testing, I found an issue with patch. With it applied,
you must keep your driver as module with DRM_PANEL_RAYDIUM_RM68200=m.
Otherwise, if DRM_PANEL_RAYDIUM_RM68200=y is set, the issues with
writing to DSI from prepare() shall persist.

[1] https://patchwork.kernel.org/project/dri-
devel/patch/95f16906d654057c912f089d286bd51856ee3bdf.1607892237.git.tom
[email protected]/
> -----Original Message-----
> From: [email protected] <[email protected]>
> Sent: Saturday, January 16, 2021 12:40
> To: Andrzej Hajda <[email protected]>; Neil Armstrong <[email protected]>; Laurent Pinchart <[email protected]>; Jonas Karlman <[email protected]>; Jernej Skrabec <[email protected]>; David Airlie <[email protected]>; Daniel Vetter <[email protected]>; Sam Ravnborg <[email protected]>; Philippe CORNU <[email protected]>; Antonio BORNEO <[email protected]>; <[email protected]> <[email protected]>
> Subject: drm: panel: panel-raydium68200 driver fails to write MIPI DSI init commands
>
> I need to bring up my MIPI DSI 1280x720 EDT ETML0500F3DHA panel on a
> RockPro64 V2.1 board.
>
> There is no completely suitable in-tree driver for that panel yet, but for the purpose of reproducing the issue that I face, the gpu/drm/panel/panel-raydium-rm68200.c can do just fine.
>
> To reproduce:
>
> - Get the same Linux 5.9.14 as on my RockPro64 board (with Armbian
> 20.11.6 on it)
>
> - Patch the rk3399-rockpro64.dts to add a panel node that is compatible with "raydium,rm68200" driver on MIPI interface (rockpro64- rm68200.patch attached)
>
> - Compile and put the resulting rk3399-rockpro64.dtb on the target system. The panel driver shall then get probed at next boot.
>
> The kernel log shall contain following errors:
>
> [ 10.139957] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
> command FIFO
> [ 10.139988] [drm:rm68200_dcs_write_cmd.isra.4
> [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write failed: -110
> [ 10.160972] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
> command FIFO
> [ 10.161000] [drm:rm68200_dcs_write_buf.isra.5
> [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
> [ 10.181929] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
> command FIFO
> [ 10.181953] [drm:rm68200_dcs_write_buf.isra.5
> [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
> [ 10.202923] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
> command FIFO
> [ 10.202947] [drm:rm68200_dcs_write_buf.isra.5
> [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
> [ 10.223064] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
> command FIFO
> [ 10.223094] [drm:rm68200_dcs_write_buf.isra.5
> [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
> [ 10.226104] zram1: detected capacity change from 0 to 52428800
> [ 10.244027] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
> command FIFO
> [ 10.244073] [drm:rm68200_dcs_write_buf.isra.5
> [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
> [ 10.265024] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
> command FIFO
> [ 10.265064] [drm:rm68200_dcs_write_buf.isra.5
> [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
> [ 10.285711] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
> command FIFO
> [ 10.285746] [drm:rm68200_dcs_write_buf.isra.5
> [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
> [ 10.305926] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
> command FIFO
> [ 10.305955] [drm:rm68200_dcs_write_buf.isra.5
> [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
> [ 10.326996] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
> command FIFO
> [ 10.327039] [drm:rm68200_dcs_write_buf.isra.5
> [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
> [ 10.348030] dw-mipi-dsi-rockchip ff960000.mipi: failed to write
> command FIFO
> [ 10.348074] [drm:rm68200_dcs_write_buf.isra.5
> [panel_raydium_rm68200]] *ERROR* MIPI DSI DCS write buffer failed: -110
>
> It's remarkable that if to pull the module panel-rm682000 out and then back in, there are no errors mentioned. I can for sure say that those commands become effective - I start seeing colourful stripes on the display after. That is, if I would send the correct command set to the panel, then it would bring up just fine. the panel, then it would bring up just fine.