dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND 0/1] drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
@ 2024-01-28  2:10 Ao Zhong
  2024-01-28  2:10 ` [PATCH RESEND 1/1] " Ao Zhong
  0 siblings, 1 reply; 9+ messages in thread
From: Ao Zhong @ 2024-01-28  2:10 UTC (permalink / raw)
  To: Guido Günther; +Cc: Ao Zhong, Ondrej Jirman, Purism Kernel Team, dri-devel

Due to parameter errors, the Anbernic RG353V-V2 screen couldn't be 
properly initialized, resulting in a black screen and unable to
display anything. After correcting these parameters by referencing the
device tree in JELOS (which uses the BSP kernel for RK3566), the panel
started to work properly.

Fixes: 0ed9208cb120 ("drm/panel: st7703: Add Anbernic RG353V-V2 Panel Support")

Ao Zhong (1):
  drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2

 drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH RESEND 1/1] drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
  2024-01-28  2:10 [PATCH RESEND 0/1] drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2 Ao Zhong
@ 2024-01-28  2:10 ` Ao Zhong
  2024-02-09 10:08   ` Guido Günther
  0 siblings, 1 reply; 9+ messages in thread
From: Ao Zhong @ 2024-01-28  2:10 UTC (permalink / raw)
  To: Guido Günther; +Cc: Ao Zhong, Ondrej Jirman, Purism Kernel Team, dri-devel

This patch resolves the issue with the panel initialization of the
Anbernic RG353V-V2 caused by incorrect parameters.

Signed-off-by: Ao Zhong <hacc1225@gmail.com>
---
 drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
index b55bafd1a8be..a346d6c3d283 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
@@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx)
 			       0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);
 	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
 	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
-	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x92, 0x92);
-	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22,
+	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x7f, 0x7f);
+	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x26, 0x62,
 			       0xf0, 0x63);
 	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05,
 			       0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH RESEND 1/1] drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
  2024-01-28  2:10 ` [PATCH RESEND 1/1] " Ao Zhong
@ 2024-02-09 10:08   ` Guido Günther
  2024-02-09 21:34     ` Chris Morgan
  2024-02-10  0:24     ` [PATCH v3] " Ao Zhong
  0 siblings, 2 replies; 9+ messages in thread
From: Guido Günther @ 2024-02-09 10:08 UTC (permalink / raw)
  To: Ao Zhong; +Cc: Purism Kernel Team, Ondrej Jirman, dri-devel, Chris Morgan

Hi Ao,

this doesn't say why that was changed but your cover letter
has that information:

> After correcting these parameters by referencing the
> device tree in JELOS (which uses the BSP kernel for RK3566), the panel
> started to work properly.

Can you add that to the commit message and maybe add an URL as
reference please?

I've added Chris to the cc: list. He submitted the original rg353v2
and we don't want to break other devices. Chris, do you have any means
to check these values?

Cheers,
 -- Guido

On Sun, Jan 28, 2024 at 03:10:48AM +0100, Ao Zhong wrote:
> This patch resolves the issue with the panel initialization of the
> Anbernic RG353V-V2 caused by incorrect parameters.
> 
> Signed-off-by: Ao Zhong <hacc1225@gmail.com>
> ---
>  drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> index b55bafd1a8be..a346d6c3d283 100644
> --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> @@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx)
>  			       0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);
>  	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
>  	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
> -	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x92, 0x92);
> -	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22,
> +	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x7f, 0x7f);
> +	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x26, 0x62,
>  			       0xf0, 0x63);
>  	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05,
>  			       0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH RESEND 1/1] drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
  2024-02-09 10:08   ` Guido Günther
@ 2024-02-09 21:34     ` Chris Morgan
  2024-02-09 21:40       ` Ao Zhong
  2024-02-10  0:24     ` [PATCH v3] " Ao Zhong
  1 sibling, 1 reply; 9+ messages in thread
From: Chris Morgan @ 2024-02-09 21:34 UTC (permalink / raw)
  To: Guido Günther; +Cc: Ao Zhong, Purism Kernel Team, Ondrej Jirman, dri-devel

On Fri, Feb 09, 2024 at 11:08:22AM +0100, Guido Günther wrote:
> Hi Ao,
> 
> this doesn't say why that was changed but your cover letter
> has that information:
> 
> > After correcting these parameters by referencing the
> > device tree in JELOS (which uses the BSP kernel for RK3566), the panel
> > started to work properly.
> 
> Can you add that to the commit message and maybe add an URL as
> reference please?
> 
> I've added Chris to the cc: list. He submitted the original rg353v2
> and we don't want to break other devices. Chris, do you have any means
> to check these values?

I checked. I'm not sure exactly how but when I fired up the most recent
kernel this panel appeared to have problems with the init sequence as
defined. After making the changes from this patch series it seems to be
back to normal. So these changes appear to be needed for existing
devices, and I'm not sure what could have caused the regression...

Note the previous settings did still appear to work, the panel just
took much longer to start working after the init sequence (as much
as 20 seconds on cold boot, clearly indicating a problem).

Thank you for the fix!

Tested-by: Chris Morgan <macromorgan@hotmail.com>

> 
> Cheers,
>  -- Guido
> 
> On Sun, Jan 28, 2024 at 03:10:48AM +0100, Ao Zhong wrote:
> > This patch resolves the issue with the panel initialization of the
> > Anbernic RG353V-V2 caused by incorrect parameters.
> > 
> > Signed-off-by: Ao Zhong <hacc1225@gmail.com>
> > ---
> >  drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> > index b55bafd1a8be..a346d6c3d283 100644
> > --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> > @@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx)
> >  			       0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);
> >  	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
> >  	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
> > -	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x92, 0x92);
> > -	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22,
> > +	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x7f, 0x7f);
> > +	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x26, 0x62,
> >  			       0xf0, 0x63);
> >  	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05,
> >  			       0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,
> > -- 
> > 2.43.0
> > 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH RESEND 1/1] drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
  2024-02-09 21:34     ` Chris Morgan
@ 2024-02-09 21:40       ` Ao Zhong
  2024-02-09 22:51         ` [PATCH v2] " Ao Zhong
  0 siblings, 1 reply; 9+ messages in thread
From: Ao Zhong @ 2024-02-09 21:40 UTC (permalink / raw)
  To: Chris Morgan, Guido Günther
  Cc: Purism Kernel Team, Ondrej Jirman, dri-devel

Hello Chris Morgan, Guido Günther,

I will post a v2 patch. I will supplement the commit information and
attach the reference links I used when modifying the init sequence.

Ao Zhong

Am Fr., 9. Feb. 2024 um 22:35 Uhr schrieb Chris Morgan
<macromorgan@hotmail.com>:
>
> On Fri, Feb 09, 2024 at 11:08:22AM +0100, Guido Günther wrote:
> > Hi Ao,
> >
> > this doesn't say why that was changed but your cover letter
> > has that information:
> >
> > > After correcting these parameters by referencing the
> > > device tree in JELOS (which uses the BSP kernel for RK3566), the panel
> > > started to work properly.
> >
> > Can you add that to the commit message and maybe add an URL as
> > reference please?
> >
> > I've added Chris to the cc: list. He submitted the original rg353v2
> > and we don't want to break other devices. Chris, do you have any means
> > to check these values?
>
> I checked. I'm not sure exactly how but when I fired up the most recent
> kernel this panel appeared to have problems with the init sequence as
> defined. After making the changes from this patch series it seems to be
> back to normal. So these changes appear to be needed for existing
> devices, and I'm not sure what could have caused the regression...
>
> Note the previous settings did still appear to work, the panel just
> took much longer to start working after the init sequence (as much
> as 20 seconds on cold boot, clearly indicating a problem).
>
> Thank you for the fix!
>
> Tested-by: Chris Morgan <macromorgan@hotmail.com>
>
> >
> > Cheers,
> >  -- Guido
> >
> > On Sun, Jan 28, 2024 at 03:10:48AM +0100, Ao Zhong wrote:
> > > This patch resolves the issue with the panel initialization of the
> > > Anbernic RG353V-V2 caused by incorrect parameters.
> > >
> > > Signed-off-by: Ao Zhong <hacc1225@gmail.com>
> > > ---
> > >  drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> > > index b55bafd1a8be..a346d6c3d283 100644
> > > --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> > > +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> > > @@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx)
> > >                            0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);
> > >     mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
> > >     mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
> > > -   mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x92, 0x92);
> > > -   mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22,
> > > +   mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x7f, 0x7f);
> > > +   mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x26, 0x62,
> > >                            0xf0, 0x63);
> > >     mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05,
> > >                            0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,
> > > --
> > > 2.43.0
> > >

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
  2024-02-09 21:40       ` Ao Zhong
@ 2024-02-09 22:51         ` Ao Zhong
  0 siblings, 0 replies; 9+ messages in thread
From: Ao Zhong @ 2024-02-09 22:51 UTC (permalink / raw)
  To: Guido Günther
  Cc: Purism Kernel Team, Ondrej Jirman, dri-devel, Chris Morgan, Ao Zhong

This patch addresses an issue with the Anbernic RG353V-V2 panel
initialization that was caused by incorrect parameter. The correct
initialization sequence was derived by referencing the JELOS (Just
Enough Linux OS) BSP kernel's device tree for the V2 panel, which is
identified by the ID "38 21". The relevant device tree can be found at:

https://github.com/JustEnoughLinuxOS/rk356x-kernel/blob/d4d7335a5ca18fc216a29712d5c6cecfb86147d2/arch/arm64/boot/dts/rockchip/rk3568-evb-rg353v.dtsi#L582

The proper initialization sequence was further informed by dissecting
instructions as outlined in the "Rockchip_DRM_Panel_Porting_Guide",
starting from page 18 of the document.

https://web.archive.org/web/20240209211932/http://download.t-firefly.com/product/Board/Common/Document/Developer/Rockchip_Developer_Guide_DRM_Panel_Porting_CN.pdf

Upon comparing the initialization sequence within the
rg353v2_init_sequence function against the device tree in the BSP
kernel, discrepancies were identified in two instructions. The relevant
instructions in the device tree are:

1. 15 00 03 b6 7f 7f corresponding to the ST7703_CMD_SETVCOM command
   with parameters 7f 7f
2. 39 00 05 b8 26 62 f0 63 corresponding to the ST7703_CMD_SETPOWER_EXT
   command with parameters 26 62 f0 63

Adjusting the parameters to match those specified in the BSP kernel's
device tree allow the panel to initialize correctly.

Signed-off-by: Ao Zhong <hacc1225@gmail.com>
---
 drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
index b55bafd1a8be..a346d6c3d283 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
@@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx)
 			       0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);
 	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
 	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
-	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x92, 0x92);
-	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22,
+	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x7f, 0x7f);
+	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x26, 0x62,
 			       0xf0, 0x63);
 	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05,
 			       0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v3] drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
  2024-02-09 10:08   ` Guido Günther
  2024-02-09 21:34     ` Chris Morgan
@ 2024-02-10  0:24     ` Ao Zhong
  2024-02-10  3:24       ` Chris Morgan
  2024-02-10 10:09       ` Guido Günther
  1 sibling, 2 replies; 9+ messages in thread
From: Ao Zhong @ 2024-02-10  0:24 UTC (permalink / raw)
  To: Guido Günther
  Cc: Purism Kernel Team, Ondrej Jirman, Chris Morgan, dri-devel, Ao Zhong

This patch addresses an issue with the Anbernic RG353V-V2 panel
initialization that was caused by incorrect parameter. The correct
initialization sequence was derived by referencing the JELOS (Just
Enough Linux OS) BSP kernel's device tree for the V2 panel, which is
identified by the ID "38 21". The relevant device tree can be found at:

https://github.com/JustEnoughLinuxOS/rk356x-kernel/blob/d4d7335a5ca18fc216a29712d5c6cecfb86147d2/arch/arm64/boot/dts/rockchip/rk3568-evb-rg353v.dtsi#L582

The proper initialization sequence was further informed by dissecting
instructions as outlined in the "Rockchip_DRM_Panel_Porting_Guide",
specifically in Chapter 3.3 of the document.

https://web.archive.org/web/20240209211932if_/http://download.t-firefly.com/product/Board/Common/Document/Developer/Rockchip_Developer_Guide_DRM_Panel_Porting_CN.pdf

Upon comparing the initialization sequence within the
rg353v2_init_sequence function against the device tree in the BSP
kernel, discrepancies were identified in two instructions. The relevant
instructions in the device tree are:

1. 15 00 03 b6 7f 7f corresponding to the ST7703_CMD_SETVCOM command
   with parameters 7f 7f
2. 39 00 05 b8 26 62 f0 63 corresponding to the ST7703_CMD_SETPOWER_EXT
   command with parameters 26 62 f0 63

Adjusting the parameters to match those specified in the BSP kernel's
device tree allow the panel to initialize correctly.

Signed-off-by: Ao Zhong <hacc1225@gmail.com>
---
 drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
index b55bafd1a8be..a346d6c3d283 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
@@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx)
 			       0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);
 	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
 	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
-	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x92, 0x92);
-	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22,
+	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x7f, 0x7f);
+	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x26, 0x62,
 			       0xf0, 0x63);
 	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05,
 			       0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
  2024-02-10  0:24     ` [PATCH v3] " Ao Zhong
@ 2024-02-10  3:24       ` Chris Morgan
  2024-02-10 10:09       ` Guido Günther
  1 sibling, 0 replies; 9+ messages in thread
From: Chris Morgan @ 2024-02-10  3:24 UTC (permalink / raw)
  To: Ao Zhong; +Cc: Guido Günther, Purism Kernel Team, Ondrej Jirman, dri-devel

On Sat, Feb 10, 2024 at 01:24:43AM +0100, Ao Zhong wrote:
> This patch addresses an issue with the Anbernic RG353V-V2 panel
> initialization that was caused by incorrect parameter. The correct
> initialization sequence was derived by referencing the JELOS (Just
> Enough Linux OS) BSP kernel's device tree for the V2 panel, which is
> identified by the ID "38 21". The relevant device tree can be found at:
> 
> https://github.com/JustEnoughLinuxOS/rk356x-kernel/blob/d4d7335a5ca18fc216a29712d5c6cecfb86147d2/arch/arm64/boot/dts/rockchip/rk3568-evb-rg353v.dtsi#L582
> 
> The proper initialization sequence was further informed by dissecting
> instructions as outlined in the "Rockchip_DRM_Panel_Porting_Guide",
> specifically in Chapter 3.3 of the document.
> 
> https://web.archive.org/web/20240209211932if_/http://download.t-firefly.com/product/Board/Common/Document/Developer/Rockchip_Developer_Guide_DRM_Panel_Porting_CN.pdf
> 
> Upon comparing the initialization sequence within the
> rg353v2_init_sequence function against the device tree in the BSP
> kernel, discrepancies were identified in two instructions. The relevant
> instructions in the device tree are:
> 
> 1. 15 00 03 b6 7f 7f corresponding to the ST7703_CMD_SETVCOM command
>    with parameters 7f 7f
> 2. 39 00 05 b8 26 62 f0 63 corresponding to the ST7703_CMD_SETPOWER_EXT
>    command with parameters 26 62 f0 63
> 
> Adjusting the parameters to match those specified in the BSP kernel's
> device tree allow the panel to initialize correctly.
> 
> Signed-off-by: Ao Zhong <hacc1225@gmail.com>

Tested-by: Chris Morgan <macromorgan@hotmail.com>

> ---
>  drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> index b55bafd1a8be..a346d6c3d283 100644
> --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> @@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx)
>  			       0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);
>  	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
>  	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
> -	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x92, 0x92);
> -	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22,
> +	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x7f, 0x7f);
> +	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x26, 0x62,
>  			       0xf0, 0x63);
>  	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05,
>  			       0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00, 0x00,
> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v3] drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2
  2024-02-10  0:24     ` [PATCH v3] " Ao Zhong
  2024-02-10  3:24       ` Chris Morgan
@ 2024-02-10 10:09       ` Guido Günther
  1 sibling, 0 replies; 9+ messages in thread
From: Guido Günther @ 2024-02-10 10:09 UTC (permalink / raw)
  To: Ao Zhong; +Cc: Purism Kernel Team, Ondrej Jirman, Chris Morgan, dri-devel

Hi,
On Sat, Feb 10, 2024 at 01:24:43AM +0100, Ao Zhong wrote:
> This patch addresses an issue with the Anbernic RG353V-V2 panel
> initialization that was caused by incorrect parameter. The correct
> initialization sequence was derived by referencing the JELOS (Just
> Enough Linux OS) BSP kernel's device tree for the V2 panel, which is
> identified by the ID "38 21". The relevant device tree can be found at:
> 
> https://github.com/JustEnoughLinuxOS/rk356x-kernel/blob/d4d7335a5ca18fc216a29712d5c6cecfb86147d2/arch/arm64/boot/dts/rockchip/rk3568-evb-rg353v.dtsi#L582
> 
> The proper initialization sequence was further informed by dissecting
> instructions as outlined in the "Rockchip_DRM_Panel_Porting_Guide",
> specifically in Chapter 3.3 of the document.
> 
> https://web.archive.org/web/20240209211932if_/http://download.t-firefly.com/product/Board/Common/Document/Developer/Rockchip_Developer_Guide_DRM_Panel_Porting_CN.pdf
> 
> Upon comparing the initialization sequence within the
> rg353v2_init_sequence function against the device tree in the BSP
> kernel, discrepancies were identified in two instructions. The relevant
> instructions in the device tree are:
> 
> 1. 15 00 03 b6 7f 7f corresponding to the ST7703_CMD_SETVCOM command
>    with parameters 7f 7f
> 2. 39 00 05 b8 26 62 f0 63 corresponding to the ST7703_CMD_SETPOWER_EXT
>    command with parameters 26 62 f0 63
> 
> Adjusting the parameters to match those specified in the BSP kernel's
> device tree allow the panel to initialize correctly.
> 
> Signed-off-by: Ao Zhong <hacc1225@gmail.com>
> ---
>  drivers/gpu/drm/panel/panel-sitronix-st7703.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> index b55bafd1a8be..a346d6c3d283 100644
> --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
> @@ -357,8 +357,8 @@ static int rg353v2_init_sequence(struct st7703 *ctx)
>  			       0x28, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00);
>  	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
>  	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x0a, 0x0a);
> -	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x92, 0x92);
> -	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x25, 0x22,
> +	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x7f, 0x7f);
> +	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT, 0x26, 0x62,
>  			       0xf0, 0x63);
>  	mipi_dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI, 0x33, 0x81, 0x05,
>  			       0xf9, 0x0e, 0x0e, 0x20, 0x00, 0x00, 0x00,
> 0x00,

Reviewed-by: Guido Günther <agx@sigxcpu.org>
 -- Guido

> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-02-10 10:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-28  2:10 [PATCH RESEND 0/1] drm/panel: st7703: Fix Panel Initialization for Anbernic RG353V-V2 Ao Zhong
2024-01-28  2:10 ` [PATCH RESEND 1/1] " Ao Zhong
2024-02-09 10:08   ` Guido Günther
2024-02-09 21:34     ` Chris Morgan
2024-02-09 21:40       ` Ao Zhong
2024-02-09 22:51         ` [PATCH v2] " Ao Zhong
2024-02-10  0:24     ` [PATCH v3] " Ao Zhong
2024-02-10  3:24       ` Chris Morgan
2024-02-10 10:09       ` Guido Günther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).