At the jt240mhqs_hwt_ek_e3 panel, noticeable flickering occurs. This is
addressed by patch 1, which adjusts the vertical timing. Patch 2 and 3 are
two more minor fixes for timing and dimension.
Signed-off-by: Gerald Loacker <[email protected]>
---
Gerald Loacker (3):
drm/panel: sitronix-st7789v: fix timing for jt240mhqs_hwt_ek_e3 panel
drm/panel: sitronix-st7789v: tweak timing for jt240mhqs_hwt_ek_e3 panel
drm/panel: sitronix-st7789v: fix display size for jt240mhqs_hwt_ek_e3 panel
drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
base-commit: fec50db7033ea478773b159e0e2efb135270e3b7
change-id: 20240409-bugfix-jt240mhqs_hwt_ek_e3-timing-d26983703b27
Best regards,
--
Gerald Loacker <[email protected]>
Use the default timing parameters to get a refresh rate of about 60 Hz for
a clock of 6 MHz.
Signed-off-by: Gerald Loacker <[email protected]>
---
drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
index 32e5c0348038..c7e3f1280404 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
@@ -282,9 +282,9 @@ static const struct drm_display_mode et028013dma_mode = {
static const struct drm_display_mode jt240mhqs_hwt_ek_e3_mode = {
.clock = 6000,
.hdisplay = 240,
- .hsync_start = 240 + 28,
- .hsync_end = 240 + 28 + 10,
- .htotal = 240 + 28 + 10 + 10,
+ .hsync_start = 240 + 38,
+ .hsync_end = 240 + 38 + 10,
+ .htotal = 240 + 38 + 10 + 10,
.vdisplay = 280,
.vsync_start = 280 + 48,
.vsync_end = 280 + 48 + 4,
--
2.37.2
This is a portrait mode display. Change the dimensions accordingly.
Signed-off-by: Gerald Loacker <[email protected]>
---
drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
index c7e3f1280404..e8f385b9c618 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
@@ -289,8 +289,8 @@ static const struct drm_display_mode jt240mhqs_hwt_ek_e3_mode = {
.vsync_start = 280 + 48,
.vsync_end = 280 + 48 + 4,
.vtotal = 280 + 48 + 4 + 4,
- .width_mm = 43,
- .height_mm = 37,
+ .width_mm = 37,
+ .height_mm = 43,
.flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
};
--
2.37.2
Flickering was observed when using partial mode. Moving the vsync to the
same position as used by the default sitronix-st7789v timing resolves this
issue.
Signed-off-by: Gerald Loacker <[email protected]>
---
drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
index 88e80fe98112..32e5c0348038 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
@@ -286,9 +286,9 @@ static const struct drm_display_mode jt240mhqs_hwt_ek_e3_mode = {
.hsync_end = 240 + 28 + 10,
.htotal = 240 + 28 + 10 + 10,
.vdisplay = 280,
- .vsync_start = 280 + 8,
- .vsync_end = 280 + 8 + 4,
- .vtotal = 280 + 8 + 4 + 4,
+ .vsync_start = 280 + 48,
+ .vsync_end = 280 + 48 + 4,
+ .vtotal = 280 + 48 + 4 + 4,
.width_mm = 43,
.height_mm = 37,
.flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
--
2.37.2
On 5/28/2024 1:32 AM, Gerald Loacker wrote:
> Flickering was observed when using partial mode. Moving the vsync to the
> same position as used by the default sitronix-st7789v timing resolves this
> issue.
>
> Signed-off-by: Gerald Loacker <[email protected]>
Hi Gerald,
Just wondering, are these new timing values taken from the panel specs?
If the timing in the original patch was wrong, maybe we need a fixes tag.
Acked-by: Jessica Zhang <[email protected]>
Thanks,
Jessica Zhang
> ---
> drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
> index 88e80fe98112..32e5c0348038 100644
> --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
> +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
> @@ -286,9 +286,9 @@ static const struct drm_display_mode jt240mhqs_hwt_ek_e3_mode = {
> .hsync_end = 240 + 28 + 10,
> .htotal = 240 + 28 + 10 + 10,
> .vdisplay = 280,
> - .vsync_start = 280 + 8,
> - .vsync_end = 280 + 8 + 4,
> - .vtotal = 280 + 8 + 4 + 4,
> + .vsync_start = 280 + 48,
> + .vsync_end = 280 + 48 + 4,
> + .vtotal = 280 + 48 + 4 + 4,
> .width_mm = 43,
> .height_mm = 37,
> .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
>
> --
> 2.37.2
>
Hi Jessica,
Am 28.05.2024 um 19:36 schrieb Jessica Zhang:
>
>
> On 5/28/2024 1:32 AM, Gerald Loacker wrote:
>> Flickering was observed when using partial mode. Moving the vsync to the
>> same position as used by the default sitronix-st7789v timing resolves
>> this
>> issue.
>>
>> Signed-off-by: Gerald Loacker <[email protected]>
>
> Hi Gerald,
>
> Just wondering, are these new timing values taken from the panel specs?
> If the timing in the original patch was wrong, maybe we need a fixes tag.
>
Both, the old and the new timing specs, are within the specified range
defined in the data sheet. But as the new values achieve a better result
adding a fixes tag is a good point.
Regards,
Gerald
> Acked-by: Jessica Zhang <[email protected]>
>
> Thanks,
>
> Jessica Zhang
>
>> ---
>> drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
>> b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
>> index 88e80fe98112..32e5c0348038 100644
>> --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
>> +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
>> @@ -286,9 +286,9 @@ static const struct drm_display_mode
>> jt240mhqs_hwt_ek_e3_mode = {
>> .hsync_end = 240 + 28 + 10,
>> .htotal = 240 + 28 + 10 + 10,
>> .vdisplay = 280,
>> - .vsync_start = 280 + 8,
>> - .vsync_end = 280 + 8 + 4,
>> - .vtotal = 280 + 8 + 4 + 4,
>> + .vsync_start = 280 + 48,
>> + .vsync_end = 280 + 48 + 4,
>> + .vtotal = 280 + 48 + 4 + 4,
>> .width_mm = 43,
>> .height_mm = 37,
>> .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
>>
>> --
>> 2.37.2
>>