* [PATCH] drm/panel: chipwealth-ch13726a: Fix dark grays rendering green at 120 Hz
@ 2026-10-28 2:01 Matthew Schwartz
2026-10-28 4:57 ` Aaron Kling
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Schwartz @ 2026-10-28 2:01 UTC (permalink / raw)
To: Neil Armstrong, Aaron Kling
Cc: Teguh Sobirin, Jessica Zhang, Dmitry Baryshkov, Maxime Ripard,
Thomas Zimmermann, Maarten Lankhorst, dri-devel, linux-kernel,
Matthew Schwartz
The init sequence writes 0xf0 0x50 followed by 0xb9 0x00. The panel
configuration in the Thor's stock Android firmware (decompiled from its
devicetree overlay, dtbo.img) has two runtime command sequences that
differ only in the 0xb9 value, both "display off; f0 50; b9 xx; display
on":
qcom,mdss-dsi-ram-command: b9 11
qcom,mdss-dsi-bypass-ram-command: b9 00
With 0x00, in the 120 Hz mode, a full-screen gray ramp from black to
white, shown with identity color management, renders black as green and
the darkest grays as bright green, both at maximum and at reduced
brightness, and the tint is more noticeable at lower brightness. The
60 Hz mode renders it correctly. With 0x11 the ramp renders correctly in
both modes and the panel dims without a color shift.
Use 0x11, the value from the vendor's ram-command sequence, instead.
Fixes: 3ee01b8647b5 ("drm/panel: Add panel driver for ChipWealth CH13726A based panels")
Reported-by: Aaron Kling <webgeek1234@gmail.com>
Link: https://lore.kernel.org/all/20260727-ch13726a-washout-v1-1-bf869ddfc5cf@gmail.com/
Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
---
Aaron, this should be the 120 Hz issue from your washout patch; could
you give it a try on your Thor? I found the issue here separately and
saw your patch as I was prepping for submission, and I bet I was seeing
the same bug you originally saw.
drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c b/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c
index 562dc573528d..0832e49b77a9 100644
--- a/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c
+++ b/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c
@@ -65,7 +65,8 @@ static int ch13726a_on(struct ch13726a_panel *ctx)
ctx->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xf0, 0x50);
- mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb9, 0x00);
+ /* 0x00 (the vendor "bypass ram" sequence) renders near-black as green */
+ mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb9, 0x11);
mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
base-commit: 8ef66514d7b993c9fb96a5886f001e3556610c1c
--
2.56.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/panel: chipwealth-ch13726a: Fix dark grays rendering green at 120 Hz
2026-10-28 2:01 [PATCH] drm/panel: chipwealth-ch13726a: Fix dark grays rendering green at 120 Hz Matthew Schwartz
@ 2026-10-28 4:57 ` Aaron Kling
2026-10-28 5:46 ` Matthew Schwartz
0 siblings, 1 reply; 4+ messages in thread
From: Aaron Kling @ 2026-10-28 4:57 UTC (permalink / raw)
To: Matthew Schwartz
Cc: Neil Armstrong, Teguh Sobirin, Jessica Zhang, Dmitry Baryshkov,
Maxime Ripard, Thomas Zimmermann, Maarten Lankhorst, dri-devel,
linux-kernel
On Tue, Oct 27, 2026 at 9:02 PM Matthew Schwartz
<matthew.schwartz@linux.dev> wrote:
>
> The init sequence writes 0xf0 0x50 followed by 0xb9 0x00. The panel
> configuration in the Thor's stock Android firmware (decompiled from its
> devicetree overlay, dtbo.img) has two runtime command sequences that
> differ only in the 0xb9 value, both "display off; f0 50; b9 xx; display
> on":
>
> qcom,mdss-dsi-ram-command: b9 11
> qcom,mdss-dsi-bypass-ram-command: b9 00
>
> With 0x00, in the 120 Hz mode, a full-screen gray ramp from black to
> white, shown with identity color management, renders black as green and
> the darkest grays as bright green, both at maximum and at reduced
> brightness, and the tint is more noticeable at lower brightness. The
> 60 Hz mode renders it correctly. With 0x11 the ramp renders correctly in
> both modes and the panel dims without a color shift.
>
> Use 0x11, the value from the vendor's ram-command sequence, instead.
>
> Fixes: 3ee01b8647b5 ("drm/panel: Add panel driver for ChipWealth CH13726A based panels")
> Reported-by: Aaron Kling <webgeek1234@gmail.com>
> Link: https://lore.kernel.org/all/20260727-ch13726a-washout-v1-1-bf869ddfc5cf@gmail.com/
> Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
> ---
> Aaron, this should be the 120 Hz issue from your washout patch; could
> you give it a try on your Thor? I found the issue here separately and
> saw your patch as I was prepping for submission, and I bet I was seeing
> the same bug you originally saw.
This is something we tried before. And best we can tell, enabling gram
limits frame rate to 60hz on this panel. Framerate tests such as the
ufo test were reporting 60 when set up like this. Can you verify the
refresh rate on your device?
Aaron
> drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c b/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c
> index 562dc573528d..0832e49b77a9 100644
> --- a/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c
> +++ b/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c
> @@ -65,7 +65,8 @@ static int ch13726a_on(struct ch13726a_panel *ctx)
> ctx->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
>
> mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xf0, 0x50);
> - mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb9, 0x00);
> + /* 0x00 (the vendor "bypass ram" sequence) renders near-black as green */
> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb9, 0x11);
>
> mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
>
>
> base-commit: 8ef66514d7b993c9fb96a5886f001e3556610c1c
> --
> 2.56.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/panel: chipwealth-ch13726a: Fix dark grays rendering green at 120 Hz
2026-10-28 4:57 ` Aaron Kling
@ 2026-10-28 5:46 ` Matthew Schwartz
2026-10-28 5:54 ` Aaron Kling
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Schwartz @ 2026-10-28 5:46 UTC (permalink / raw)
To: Aaron Kling
Cc: Neil Armstrong, Teguh Sobirin, Jessica Zhang, Dmitry Baryshkov,
Maxime Ripard, Thomas Zimmermann, Maarten Lankhorst, dri-devel,
linux-kernel
On 10/27/26 9:57 PM, Aaron Kling wrote:
> On Tue, Oct 27, 2026 at 9:02 PM Matthew Schwartz
> <matthew.schwartz@linux.dev> wrote:
>>
>> The init sequence writes 0xf0 0x50 followed by 0xb9 0x00. The panel
>> configuration in the Thor's stock Android firmware (decompiled from its
>> devicetree overlay, dtbo.img) has two runtime command sequences that
>> differ only in the 0xb9 value, both "display off; f0 50; b9 xx; display
>> on":
>>
>> qcom,mdss-dsi-ram-command: b9 11
>> qcom,mdss-dsi-bypass-ram-command: b9 00
>>
>> With 0x00, in the 120 Hz mode, a full-screen gray ramp from black to
>> white, shown with identity color management, renders black as green and
>> the darkest grays as bright green, both at maximum and at reduced
>> brightness, and the tint is more noticeable at lower brightness. The
>> 60 Hz mode renders it correctly. With 0x11 the ramp renders correctly in
>> both modes and the panel dims without a color shift.
>>
>> Use 0x11, the value from the vendor's ram-command sequence, instead.
>>
>> Fixes: 3ee01b8647b5 ("drm/panel: Add panel driver for ChipWealth CH13726A based panels")
>> Reported-by: Aaron Kling <webgeek1234@gmail.com>
>> Link: https://lore.kernel.org/all/20260727-ch13726a-washout-v1-1-bf869ddfc5cf@gmail.com/
>> Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
>> ---
>> Aaron, this should be the 120 Hz issue from your washout patch; could
>> you give it a try on your Thor? I found the issue here separately and
>> saw your patch as I was prepping for submission, and I bet I was seeing
>> the same bug you originally saw.
>
> This is something we tried before. And best we can tell, enabling gram
> limits frame rate to 60hz on this panel. Framerate tests such as the
> ufo test were reporting 60 when set up like this. Can you verify the
> refresh rate on your device?
Hmm, yeah, it was a bit hard to tell until instrumenting it but it
seems to use a panel refresh rate of ~63 Hz. I do wonder if this panel
is just not meant to be driven at 120 Hz though, since it seems like a
very poor choice to expose as a mode with color issues like this.
It might make more sense to just not expose it if it isn't fixable.
- Matt
>
> Aaron
>
>> drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c b/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c
>> index 562dc573528d..0832e49b77a9 100644
>> --- a/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c
>> +++ b/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c
>> @@ -65,7 +65,8 @@ static int ch13726a_on(struct ch13726a_panel *ctx)
>> ctx->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
>>
>> mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xf0, 0x50);
>> - mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb9, 0x00);
>> + /* 0x00 (the vendor "bypass ram" sequence) renders near-black as green */
>> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb9, 0x11);
>>
>> mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
>>
>>
>> base-commit: 8ef66514d7b993c9fb96a5886f001e3556610c1c
>> --
>> 2.56.0
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/panel: chipwealth-ch13726a: Fix dark grays rendering green at 120 Hz
2026-10-28 5:46 ` Matthew Schwartz
@ 2026-10-28 5:54 ` Aaron Kling
0 siblings, 0 replies; 4+ messages in thread
From: Aaron Kling @ 2026-10-28 5:54 UTC (permalink / raw)
To: Matthew Schwartz
Cc: Neil Armstrong, Teguh Sobirin, Jessica Zhang, Dmitry Baryshkov,
Maxime Ripard, Thomas Zimmermann, Maarten Lankhorst, dri-devel,
linux-kernel
On Wed, Oct 28, 2026 at 12:46 AM Matthew Schwartz
<matthew.schwartz@linux.dev> wrote:
>
> On 10/27/26 9:57 PM, Aaron Kling wrote:
> > On Tue, Oct 27, 2026 at 9:02 PM Matthew Schwartz
> > <matthew.schwartz@linux.dev> wrote:
> >>
> >> The init sequence writes 0xf0 0x50 followed by 0xb9 0x00. The panel
> >> configuration in the Thor's stock Android firmware (decompiled from its
> >> devicetree overlay, dtbo.img) has two runtime command sequences that
> >> differ only in the 0xb9 value, both "display off; f0 50; b9 xx; display
> >> on":
> >>
> >> qcom,mdss-dsi-ram-command: b9 11
> >> qcom,mdss-dsi-bypass-ram-command: b9 00
> >>
> >> With 0x00, in the 120 Hz mode, a full-screen gray ramp from black to
> >> white, shown with identity color management, renders black as green and
> >> the darkest grays as bright green, both at maximum and at reduced
> >> brightness, and the tint is more noticeable at lower brightness. The
> >> 60 Hz mode renders it correctly. With 0x11 the ramp renders correctly in
> >> both modes and the panel dims without a color shift.
> >>
> >> Use 0x11, the value from the vendor's ram-command sequence, instead.
> >>
> >> Fixes: 3ee01b8647b5 ("drm/panel: Add panel driver for ChipWealth CH13726A based panels")
> >> Reported-by: Aaron Kling <webgeek1234@gmail.com>
> >> Link: https://lore.kernel.org/all/20260727-ch13726a-washout-v1-1-bf869ddfc5cf@gmail.com/
> >> Signed-off-by: Matthew Schwartz <matthew.schwartz@linux.dev>
> >> ---
> >> Aaron, this should be the 120 Hz issue from your washout patch; could
> >> you give it a try on your Thor? I found the issue here separately and
> >> saw your patch as I was prepping for submission, and I bet I was seeing
> >> the same bug you originally saw.
> >
> > This is something we tried before. And best we can tell, enabling gram
> > limits frame rate to 60hz on this panel. Framerate tests such as the
> > ufo test were reporting 60 when set up like this. Can you verify the
> > refresh rate on your device?
>
> Hmm, yeah, it was a bit hard to tell until instrumenting it but it
> seems to use a panel refresh rate of ~63 Hz. I do wonder if this panel
> is just not meant to be driven at 120 Hz though, since it seems like a
> very poor choice to expose as a mode with color issues like this.
>
> It might make more sense to just not expose it if it isn't fixable.
I had hoped to be able to fix it with color profiles or something,
since this as is does appear to push pixels fast enough, just with
gamma issues. But so far none of us have been able to find a way to do
so. Which is sad. But there may not be any other reasonable choice but
to drop the 120hz mode. And if that has to happen, might as well
switch to cmd mode and enable gram at the same time.
Aaron
> - Matt
>
> >
> > Aaron
> >
> >> drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c | 3 ++-
> >> 1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c b/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c
> >> index 562dc573528d..0832e49b77a9 100644
> >> --- a/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c
> >> +++ b/drivers/gpu/drm/panel/panel-chipwealth-ch13726a.c
> >> @@ -65,7 +65,8 @@ static int ch13726a_on(struct ch13726a_panel *ctx)
> >> ctx->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
> >>
> >> mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xf0, 0x50);
> >> - mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb9, 0x00);
> >> + /* 0x00 (the vendor "bypass ram" sequence) renders near-black as green */
> >> + mipi_dsi_generic_write_seq_multi(&dsi_ctx, 0xb9, 0x11);
> >>
> >> mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> >>
> >>
> >> base-commit: 8ef66514d7b993c9fb96a5886f001e3556610c1c
> >> --
> >> 2.56.0
> >>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-28 5:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-28 2:01 [PATCH] drm/panel: chipwealth-ch13726a: Fix dark grays rendering green at 120 Hz Matthew Schwartz
2026-10-28 4:57 ` Aaron Kling
2026-10-28 5:46 ` Matthew Schwartz
2026-10-28 5:54 ` Aaron Kling
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®