2024-01-09 07:27:45

by Shengyang Chen

[permalink] [raw]
Subject: [PATCH v2 2/2] gpu: drm: panel: panel-simple: add new display mode for waveshare 7inch touchscreen panel

The waveshare 7" 800x480 panel is a clone of Raspberry Pi 7" 800x480 panel
It also uses a Toshiba TC358762 DSI to DPI bridge chip but it needs different
timing from Raspberry Pi panel. Add new timing for it.

Signed-off-by: Keith Zhao <[email protected]>
Signed-off-by: Shengyang Chen <[email protected]>
---
drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 9367a4572dcf..e0896873ea33 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -4110,6 +4110,31 @@ static const struct panel_desc vl050_8048nt_c01 = {
.bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
};

+static const struct drm_display_mode waveshare_7inch_mode = {
+ .clock = 29700000 / 1000,
+ .hdisplay = 800,
+ .hsync_start = 800 + 90,
+ .hsync_end = 800 + 90 + 5,
+ .htotal = 800 + 90 + 5 + 5,
+ .vdisplay = 480,
+ .vsync_start = 480 + 60,
+ .vsync_end = 480 + 60 + 5,
+ .vtotal = 480 + 60 + 5 + 5,
+ .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+};
+
+static const struct panel_desc waveshare_7inch = {
+ .modes = &waveshare_7inch_mode,
+ .num_modes = 1,
+ .bpc = 8,
+ .size = {
+ .width = 154,
+ .height = 86,
+ },
+ .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
+ .connector_type = DRM_MODE_CONNECTOR_DSI,
+};
+
static const struct drm_display_mode winstar_wf35ltiacd_mode = {
.clock = 6410,
.hdisplay = 320,
@@ -4592,6 +4617,9 @@ static const struct of_device_id platform_of_match[] = {
}, {
.compatible = "vxt,vl050-8048nt-c01",
.data = &vl050_8048nt_c01,
+ }, {
+ .compatible = "waveshare,7inch-touchscreen",
+ .data = &waveshare_7inch,
}, {
.compatible = "winstar,wf35ltiacd",
.data = &winstar_wf35ltiacd,
--
2.17.1



2024-01-09 18:28:11

by Jessica Zhang

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] gpu: drm: panel: panel-simple: add new display mode for waveshare 7inch touchscreen panel



On 1/8/2024 11:09 PM, Shengyang Chen wrote:
> The waveshare 7" 800x480 panel is a clone of Raspberry Pi 7" 800x480 panel
> It also uses a Toshiba TC358762 DSI to DPI bridge chip but it needs different
> timing from Raspberry Pi panel. Add new timing for it.

Hi Shengyang,

The patch itself LGTM, but in case you have to put out a new revision,
can you please use the "drm/panel: <driver name>:" prefix format that
other drm/panel commits use?

Reviewed-by: Jessica Zhang <[email protected]>

Thanks,

Jessica Zhang

>
> Signed-off-by: Keith Zhao <[email protected]>
> Signed-off-by: Shengyang Chen <[email protected]>
> ---
> drivers/gpu/drm/panel/panel-simple.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 9367a4572dcf..e0896873ea33 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -4110,6 +4110,31 @@ static const struct panel_desc vl050_8048nt_c01 = {
> .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
> };
>
> +static const struct drm_display_mode waveshare_7inch_mode = {
> + .clock = 29700000 / 1000,
> + .hdisplay = 800,
> + .hsync_start = 800 + 90,
> + .hsync_end = 800 + 90 + 5,
> + .htotal = 800 + 90 + 5 + 5,
> + .vdisplay = 480,
> + .vsync_start = 480 + 60,
> + .vsync_end = 480 + 60 + 5,
> + .vtotal = 480 + 60 + 5 + 5,
> + .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
> +};
> +
> +static const struct panel_desc waveshare_7inch = {
> + .modes = &waveshare_7inch_mode,
> + .num_modes = 1,
> + .bpc = 8,
> + .size = {
> + .width = 154,
> + .height = 86,
> + },
> + .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
> + .connector_type = DRM_MODE_CONNECTOR_DSI,
> +};
> +
> static const struct drm_display_mode winstar_wf35ltiacd_mode = {
> .clock = 6410,
> .hdisplay = 320,
> @@ -4592,6 +4617,9 @@ static const struct of_device_id platform_of_match[] = {
> }, {
> .compatible = "vxt,vl050-8048nt-c01",
> .data = &vl050_8048nt_c01,
> + }, {
> + .compatible = "waveshare,7inch-touchscreen",
> + .data = &waveshare_7inch,
> }, {
> .compatible = "winstar,wf35ltiacd",
> .data = &winstar_wf35ltiacd,
> --
> 2.17.1
>

2024-01-16 10:00:03

by Shengyang Chen

[permalink] [raw]
Subject: RE: [PATCH v2 2/2] gpu: drm: panel: panel-simple: add new display mode for waveshare 7inch touchscreen panel

Hi, Jessica

Thanks for your comment and review

> -----Original Message-----
> From: Jessica Zhang <[email protected]>
> Sent: 2024年1月10日 2:26
> To: Shengyang Chen <[email protected]>;
> [email protected]; [email protected]
> Cc: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; Changhuang
> Liang <[email protected]>; Keith Zhao
> <[email protected]>; Jack Zhu <[email protected]>;
> [email protected]
> Subject: Re: [PATCH v2 2/2] gpu: drm: panel: panel-simple: add new display
> mode for waveshare 7inch touchscreen panel
>
>
>
> On 1/8/2024 11:09 PM, Shengyang Chen wrote:
> > The waveshare 7" 800x480 panel is a clone of Raspberry Pi 7" 800x480
> > panel It also uses a Toshiba TC358762 DSI to DPI bridge chip but it
> > needs different timing from Raspberry Pi panel. Add new timing for it.
>
> Hi Shengyang,
>
> The patch itself LGTM, but in case you have to put out a new revision, can you
> please use the "drm/panel: <driver name>:" prefix format that other drm/panel
> commits use?
>

Thanks for your suggestion. The prefix format will be used if we have next version.
btw, referring to the suggestions, we are going to try other timing from panel-simple
in our platform. Maybe we are not necessary to submit new version.
Thanks a lot

> Reviewed-by: Jessica Zhang <[email protected]>
>
> Thanks,
>
> Jessica Zhang
>
> >
> > Signed-off-by: Keith Zhao <[email protected]>
> > Signed-off-by: Shengyang Chen <[email protected]>
> > ---
> > drivers/gpu/drm/panel/panel-simple.c | 28
> ++++++++++++++++++++++++++++
> > 1 file changed, 28 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-simple.c
> > b/drivers/gpu/drm/panel/panel-simple.c
> > index 9367a4572dcf..e0896873ea33 100644
> > --- a/drivers/gpu/drm/panel/panel-simple.c
> > +++ b/drivers/gpu/drm/panel/panel-simple.c
> > @@ -4110,6 +4110,31 @@ static const struct panel_desc vl050_8048nt_c01
> = {
> > .bus_flags = DRM_BUS_FLAG_DE_HIGH |
> DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
> > };
> >
> > +static const struct drm_display_mode waveshare_7inch_mode = {
> > + .clock = 29700000 / 1000,
> > + .hdisplay = 800,
> > + .hsync_start = 800 + 90,
> > + .hsync_end = 800 + 90 + 5,
> > + .htotal = 800 + 90 + 5 + 5,
> > + .vdisplay = 480,
> > + .vsync_start = 480 + 60,
> > + .vsync_end = 480 + 60 + 5,
> > + .vtotal = 480 + 60 + 5 + 5,
> > + .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC, };
> > +
> > +static const struct panel_desc waveshare_7inch = {
> > + .modes = &waveshare_7inch_mode,
> > + .num_modes = 1,
> > + .bpc = 8,
> > + .size = {
> > + .width = 154,
> > + .height = 86,
> > + },
> > + .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
> > + .connector_type = DRM_MODE_CONNECTOR_DSI, };
> > +
> > static const struct drm_display_mode winstar_wf35ltiacd_mode = {
> > .clock = 6410,
> > .hdisplay = 320,
> > @@ -4592,6 +4617,9 @@ static const struct of_device_id
> platform_of_match[] = {
> > }, {
> > .compatible = "vxt,vl050-8048nt-c01",
> > .data = &vl050_8048nt_c01,
> > + }, {
> > + .compatible = "waveshare,7inch-touchscreen",
> > + .data = &waveshare_7inch,
> > }, {
> > .compatible = "winstar,wf35ltiacd",
> > .data = &winstar_wf35ltiacd,
> > --
> > 2.17.1
> >

thanks

Best Regards,
Shengyang