diff mbox series

[v3,08/11] drm/panel: simple: Add BOE HB140WX1-501 panel support

Message ID 20190215050957.20755-9-anarsoul@gmail.com (mailing list archive)
State New, archived
Headers show
Series Analogix ANX6345 RGB-(e)DP bridge support | expand

Commit Message

Vasily Khoruzhick Feb. 15, 2019, 5:09 a.m. UTC
This commit adds support for the BOE HB140WX1-501 14" WXGA TFT LCD
panel.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 .../display/panel/boe,hb140wx1-501.txt        |  7 +++++
 drivers/gpu/drm/panel/panel-simple.c          | 26 +++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/boe,hb140wx1-501.txt

Comments

Sam Ravnborg Feb. 16, 2019, 8:43 p.m. UTC | #1
Hi Vasily.

On Thu, Feb 14, 2019 at 09:09:54PM -0800, Vasily Khoruzhick via dri-devel wrote:
> This commit adds support for the BOE HB140WX1-501 14" WXGA TFT LCD
> panel.
> 
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> ---
>  .../display/panel/boe,hb140wx1-501.txt        |  7 +++++
>  drivers/gpu/drm/panel/panel-simple.c          | 26 +++++++++++++++++++
>  2 files changed, 33 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/display/panel/boe,hb140wx1-501.txt
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/boe,hb140wx1-501.txt b/Documentation/devicetree/bindings/display/panel/boe,hb140wx1-501.txt
> new file mode 100644
> index 000000000000..fc6f085eb8d1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/boe,hb140wx1-501.txt
> @@ -0,0 +1,7 @@
> +BOE HB140WX1-501 14" WXGA (1366x768) TFT LCD panel
> +
> +Required properties:
> +- compatible: should be "boe,hb140wx1-501"
> +
> +This binding is compatible with the simple-panel binding, which is specified
> +in simple-panel.txt in this directory.

boe must be added to vendor-prefixes.txt
(It is not present in the file I checked, but I may have been added later)


It is usual practice to split the patch in a dt-bindings: patch and a driver patch.
And for the dt-bindings patch follow the submission rules laid out
in Documentation/devicetree/bindings/submitting-patches.txt

> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 9c69e739a524..9a4c9dd02c6c 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -828,6 +828,29 @@ static const struct panel_desc bananapi_s070wv20_ct16 = {
>  	},
>  };
>  
> +static const struct drm_display_mode boe_hb140wx1_mode = {
> +	.clock = 72300,
> +	.hdisplay = 1366,
> +	.hsync_start = 1366 + 48,
> +	.hsync_end = 1366 + 48 + 32,
> +	.htotal = 1366 + 48 + 32 + 80,
> +	.vdisplay = 768,
> +	.vsync_start = 768 + 3,
> +	.vsync_end = 768 + 3 + 6,
> +	.vtotal = 768 + 3 + 6 + 13,
> +	.vrefresh = 60,
> +	.flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC,

+1 for specifying .flags.

> +};
> +
> +static const struct panel_desc boe_hb140wx1 = {
> +	.modes = &boe_hb140wx1_mode,
> +	.num_modes = 1,
> +	.size = {
> +		.width = 310,
> +		.height = 170,
> +	},
> +};
No .bus_format and no .bus_flags specified.
Are they not used by this panel or are you lucky and the default works?


> +
>  static const struct drm_display_mode boe_hv070wsa_mode = {
>  	.clock = 42105,
>  	.hdisplay = 1024,
> @@ -2541,6 +2564,9 @@ static const struct of_device_id platform_of_match[] = {
>  	}, {
>  		.compatible = "bananapi,s070wv20-ct16",
>  		.data = &bananapi_s070wv20_ct16,
> +	}, {
> +		.compatible = "boe,hb140wx1-501",
> +		.data = &boe_hb140wx1
It is common practice to end the line with a "," so one do not need to modify
this line if an extra line is required.


With the comments addressed you can add my:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Vasily Khoruzhick Feb. 16, 2019, 8:48 p.m. UTC | #2
On Sat, Feb 16, 2019 at 12:43 PM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> Hi Vasily.

Hi Sam,

> On Thu, Feb 14, 2019 at 09:09:54PM -0800, Vasily Khoruzhick via dri-devel wrote:
> > This commit adds support for the BOE HB140WX1-501 14" WXGA TFT LCD
> > panel.
> >
> > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> > ---
> >  .../display/panel/boe,hb140wx1-501.txt        |  7 +++++
> >  drivers/gpu/drm/panel/panel-simple.c          | 26 +++++++++++++++++++
> >  2 files changed, 33 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/display/panel/boe,hb140wx1-501.txt
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/boe,hb140wx1-501.txt b/Documentation/devicetree/bindings/display/panel/boe,hb140wx1-501.txt
> > new file mode 100644
> > index 000000000000..fc6f085eb8d1
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/panel/boe,hb140wx1-501.txt
> > @@ -0,0 +1,7 @@
> > +BOE HB140WX1-501 14" WXGA (1366x768) TFT LCD panel
> > +
> > +Required properties:
> > +- compatible: should be "boe,hb140wx1-501"
> > +
> > +This binding is compatible with the simple-panel binding, which is specified
> > +in simple-panel.txt in this directory.
>
> boe must be added to vendor-prefixes.txt
> (It is not present in the file I checked, but I may have been added later)

It's been there for quite a while, it's added in 27d23b30a561b which
was included
in 4.5.

> It is usual practice to split the patch in a dt-bindings: patch and a driver patch.
> And for the dt-bindings patch follow the submission rules laid out
> in Documentation/devicetree/bindings/submitting-patches.txt

I checked git log for drivers/gpu/drm/panel/panel-simple.c and looks
like recent commits
for this file added binding and timings in a single commit. I can
split it into separate file
if maintainers insist though.

> > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> > index 9c69e739a524..9a4c9dd02c6c 100644
> > --- a/drivers/gpu/drm/panel/panel-simple.c
> > +++ b/drivers/gpu/drm/panel/panel-simple.c
> > @@ -828,6 +828,29 @@ static const struct panel_desc bananapi_s070wv20_ct16 = {
> >       },
> >  };
> >
> > +static const struct drm_display_mode boe_hb140wx1_mode = {
> > +     .clock = 72300,
> > +     .hdisplay = 1366,
> > +     .hsync_start = 1366 + 48,
> > +     .hsync_end = 1366 + 48 + 32,
> > +     .htotal = 1366 + 48 + 32 + 80,
> > +     .vdisplay = 768,
> > +     .vsync_start = 768 + 3,
> > +     .vsync_end = 768 + 3 + 6,
> > +     .vtotal = 768 + 3 + 6 + 13,
> > +     .vrefresh = 60,
> > +     .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC,
>
> +1 for specifying .flags.
>
> > +};
> > +
> > +static const struct panel_desc boe_hb140wx1 = {
> > +     .modes = &boe_hb140wx1_mode,
> > +     .num_modes = 1,
> > +     .size = {
> > +             .width = 310,
> > +             .height = 170,
> > +     },
> > +};
> No .bus_format and no .bus_flags specified.
> Are they not used by this panel or are you lucky and the default works?

This is eDP panel, it doesn't need bus_format or bus_flags.

> > +
> >  static const struct drm_display_mode boe_hv070wsa_mode = {
> >       .clock = 42105,
> >       .hdisplay = 1024,
> > @@ -2541,6 +2564,9 @@ static const struct of_device_id platform_of_match[] = {
> >       }, {
> >               .compatible = "bananapi,s070wv20-ct16",
> >               .data = &bananapi_s070wv20_ct16,
> > +     }, {
> > +             .compatible = "boe,hb140wx1-501",
> > +             .data = &boe_hb140wx1
> It is common practice to end the line with a "," so one do not need to modify
> this line if an extra line is required.

OK, will do.

>
> With the comments addressed you can add my:
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
>
Sam Ravnborg Feb. 16, 2019, 9:12 p.m. UTC | #3
Hi Vasily

> >
> > boe must be added to vendor-prefixes.txt
> > (It is not present in the file I checked, but I may have been added later)
> 
> It's been there for quite a while, it's added in 27d23b30a561b which
> was included
> in 4.5.

Yep, at second look it was there in the file I looked at too.

	Sam
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/panel/boe,hb140wx1-501.txt b/Documentation/devicetree/bindings/display/panel/boe,hb140wx1-501.txt
new file mode 100644
index 000000000000..fc6f085eb8d1
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/boe,hb140wx1-501.txt
@@ -0,0 +1,7 @@ 
+BOE HB140WX1-501 14" WXGA (1366x768) TFT LCD panel
+
+Required properties:
+- compatible: should be "boe,hb140wx1-501"
+
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 9c69e739a524..9a4c9dd02c6c 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -828,6 +828,29 @@  static const struct panel_desc bananapi_s070wv20_ct16 = {
 	},
 };
 
+static const struct drm_display_mode boe_hb140wx1_mode = {
+	.clock = 72300,
+	.hdisplay = 1366,
+	.hsync_start = 1366 + 48,
+	.hsync_end = 1366 + 48 + 32,
+	.htotal = 1366 + 48 + 32 + 80,
+	.vdisplay = 768,
+	.vsync_start = 768 + 3,
+	.vsync_end = 768 + 3 + 6,
+	.vtotal = 768 + 3 + 6 + 13,
+	.vrefresh = 60,
+	.flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC,
+};
+
+static const struct panel_desc boe_hb140wx1 = {
+	.modes = &boe_hb140wx1_mode,
+	.num_modes = 1,
+	.size = {
+		.width = 310,
+		.height = 170,
+	},
+};
+
 static const struct drm_display_mode boe_hv070wsa_mode = {
 	.clock = 42105,
 	.hdisplay = 1024,
@@ -2541,6 +2564,9 @@  static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "bananapi,s070wv20-ct16",
 		.data = &bananapi_s070wv20_ct16,
+	}, {
+		.compatible = "boe,hb140wx1-501",
+		.data = &boe_hb140wx1
 	}, {
 		.compatible = "boe,hv070wsa-100",
 		.data = &boe_hv070wsa