linux-sunxi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/panel-simple: Add Vivax TPC-9150 panel v4
@ 2021-08-18 14:46 Nikola Pavlica
  2021-08-18 14:46 ` [PATCH 2/3] dt-bindings: display: simple: Add Vivax TPC-9150 panel Nikola Pavlica
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Nikola Pavlica @ 2021-08-18 14:46 UTC (permalink / raw)
  To: dri-devel
  Cc: thierry.reding, sam, airlied, daniel, linux-arm-kernel,
	linux-sunxi, linux-sunxi, linux-kernel, Nikola Pavlica

The model and make of the LCD panel of the Vivax TPC-9150 is unknown,
hence the panel settings that were retrieved with a FEX dump are named
after the device NOT the actual panel.

The LCD in question is a 50 pin MISO TFT LCD panel of the resolution
1024x600 used by the aforementioned device.

Version 2, as Thierry kindly suggested that I fix the order in which the
panel was ordered compared to others.

Version 3, filling in the required info suggested by Sam. Plus some
factual issues that I've corrected myself (tested working)

Version 4, rearranged the display parameters and fix invalid bit format
issue. (Thanks Sam)

Thanks,
Nikola

Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
---
 drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 4e2dad314c79..9e06c375f8a0 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -3989,6 +3989,32 @@ static const struct panel_desc urt_umsh_8596md_parallel = {
 	.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
 };

+static const struct drm_display_mode vivax_tpc9150_panel_mode = {
+	.clock = 60000,
+	.hdisplay = 1024,
+	.hsync_start = 1024 + 160,
+	.hsync_end = 1024 + 160 + 100,
+	.htotal = 1024 + 160 + 100 + 60,
+	.vdisplay = 600,
+	.vsync_start = 600 + 12,
+	.vsync_end = 600 + 12 + 10,
+	.vtotal = 600 + 12 + 10 + 13,
+};
+
+static const struct panel_desc vivax_tpc9150_panel = {
+	.modes = &vivax_tpc9150_panel_mode,
+	.num_modes = 1,
+	.bpc = 6,
+	.size = {
+		.width = 200,
+		.height = 115,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH,
+	.connector_type = DRM_MODE_CONNECTOR_LVDS,
+};
+
+
 static const struct drm_display_mode vl050_8048nt_c01_mode = {
 	.clock = 33333,
 	.hdisplay = 800,
@@ -4490,6 +4516,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "urt,umsh-8596md-20t",
 		.data = &urt_umsh_8596md_parallel,
+	}, {
+		.compatible = "vivax,tpc9150-panel",
+		.data = &vivax_tpc9150_panel,
 	}, {
 		.compatible = "vxt,vl050-8048nt-c01",
 		.data = &vl050_8048nt_c01,
--
2.32.0


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

* [PATCH 2/3] dt-bindings: display: simple: Add Vivax TPC-9150 panel
  2021-08-18 14:46 [PATCH 1/3] drm/panel-simple: Add Vivax TPC-9150 panel v4 Nikola Pavlica
@ 2021-08-18 14:46 ` Nikola Pavlica
  2021-08-18 18:24   ` Sam Ravnborg
  2021-08-18 14:46 ` [PATCH 3/3] dt-bindings: add vendor prefix for Vivax Nikola Pavlica
  2021-08-18 18:21 ` [PATCH 1/3] drm/panel-simple: Add Vivax TPC-9150 panel v4 Sam Ravnborg
  2 siblings, 1 reply; 7+ messages in thread
From: Nikola Pavlica @ 2021-08-18 14:46 UTC (permalink / raw)
  To: dri-devel
  Cc: thierry.reding, sam, airlied, daniel, linux-arm-kernel,
	linux-sunxi, linux-sunxi, linux-kernel, Nikola Pavlica

This tablet display is unique and hence must be added to documentation.
Unfortunately, it's real make and number is not known due to obscure and
missing documentation and lack of writing on the display assembly
itself.

So the natural alternative that came to mind is to name the panel after
the device that contained it (an Android tablet). Hopefully that isn't
an issue.

I can confirm that the parameters that I've obtained are correct since
they came from a dump of the original Android OS.

Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
---
 .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
index 62b0d54d87b7..d0efefa5a820 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
@@ -285,6 +285,8 @@ properties:
       - urt,umsh-8596md-11t
       - urt,umsh-8596md-19t
       - urt,umsh-8596md-20t
+        # Vivax TPC-9150 tablet 9.0" WSVGA TFT LCD panel
+      - vivax,tpc9150-panel
         # VXT 800x480 color TFT LCD panel
       - vxt,vl050-8048nt-c01
         # Winstar Display Corporation 3.5" QVGA (320x240) TFT LCD panel
-- 
2.32.0


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

* [PATCH 3/3] dt-bindings: add vendor prefix for Vivax
  2021-08-18 14:46 [PATCH 1/3] drm/panel-simple: Add Vivax TPC-9150 panel v4 Nikola Pavlica
  2021-08-18 14:46 ` [PATCH 2/3] dt-bindings: display: simple: Add Vivax TPC-9150 panel Nikola Pavlica
@ 2021-08-18 14:46 ` Nikola Pavlica
  2021-08-18 18:22   ` Sam Ravnborg
  2021-08-18 18:26   ` Sam Ravnborg
  2021-08-18 18:21 ` [PATCH 1/3] drm/panel-simple: Add Vivax TPC-9150 panel v4 Sam Ravnborg
  2 siblings, 2 replies; 7+ messages in thread
From: Nikola Pavlica @ 2021-08-18 14:46 UTC (permalink / raw)
  To: dri-devel
  Cc: thierry.reding, sam, airlied, daniel, linux-arm-kernel,
	linux-sunxi, linux-sunxi, linux-kernel, Nikola Pavlica

Add vendor prefix for the Vivax brand by M SAN Grupa d.o.o.

Source (in Croatian): https://www.vivax.com/hr/o-nama.aspx

Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index f6064d84a424..c234c392538d 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -1206,6 +1206,8 @@ patternProperties:
     description: Vitesse Semiconductor Corporation
   "^vivante,.*":
     description: Vivante Corporation
+  "^vivax,.*":
+    description: Vivax brand by M SAN Grupa d.o.o.
   "^vocore,.*":
     description: VoCore Studio
   "^voipac,.*":
-- 
2.32.0


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

* Re: [PATCH 1/3] drm/panel-simple: Add Vivax TPC-9150 panel v4
  2021-08-18 14:46 [PATCH 1/3] drm/panel-simple: Add Vivax TPC-9150 panel v4 Nikola Pavlica
  2021-08-18 14:46 ` [PATCH 2/3] dt-bindings: display: simple: Add Vivax TPC-9150 panel Nikola Pavlica
  2021-08-18 14:46 ` [PATCH 3/3] dt-bindings: add vendor prefix for Vivax Nikola Pavlica
@ 2021-08-18 18:21 ` Sam Ravnborg
  2 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2021-08-18 18:21 UTC (permalink / raw)
  To: Nikola Pavlica
  Cc: dri-devel, thierry.reding, airlied, daniel, linux-arm-kernel,
	linux-sunxi, linux-sunxi, linux-kernel

Hi Nikola,

On Wed, Aug 18, 2021 at 04:46:46PM +0200, Nikola Pavlica wrote:
> The model and make of the LCD panel of the Vivax TPC-9150 is unknown,
> hence the panel settings that were retrieved with a FEX dump are named
> after the device NOT the actual panel.
> 
> The LCD in question is a 50 pin MISO TFT LCD panel of the resolution
> 1024x600 used by the aforementioned device.
> 
> Version 2, as Thierry kindly suggested that I fix the order in which the
> panel was ordered compared to others.
> 
> Version 3, filling in the required info suggested by Sam. Plus some
> factual issues that I've corrected myself (tested working)
> 
> Version 4, rearranged the display parameters and fix invalid bit format
> issue. (Thanks Sam)
> 
> Thanks,
> Nikola
> 
> Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
> ---
>  drivers/gpu/drm/panel/panel-simple.c | 29 ++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 4e2dad314c79..9e06c375f8a0 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -3989,6 +3989,32 @@ static const struct panel_desc urt_umsh_8596md_parallel = {
>  	.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
>  };
> 
> +static const struct drm_display_mode vivax_tpc9150_panel_mode = {
> +	.clock = 60000,
> +	.hdisplay = 1024,
> +	.hsync_start = 1024 + 160,
> +	.hsync_end = 1024 + 160 + 100,
> +	.htotal = 1024 + 160 + 100 + 60,
> +	.vdisplay = 600,
> +	.vsync_start = 600 + 12,
> +	.vsync_end = 600 + 12 + 10,
> +	.vtotal = 600 + 12 + 10 + 13,
> +};
> +
> +static const struct panel_desc vivax_tpc9150_panel = {
> +	.modes = &vivax_tpc9150_panel_mode,
> +	.num_modes = 1,
> +	.bpc = 6,
> +	.size = {
> +		.width = 200,
> +		.height = 115,
> +	},
> +	.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
> +	.bus_flags = DRM_BUS_FLAG_DE_HIGH,
> +	.connector_type = DRM_MODE_CONNECTOR_LVDS,

The bus_format is not right. If you look at your logging this panel
will result in a warning.

Look at the following code:
       case DRM_MODE_CONNECTOR_LVDS:
                WARN_ON(desc->bus_flags &
                        ~(DRM_BUS_FLAG_DE_LOW |
                          DRM_BUS_FLAG_DE_HIGH |
                          DRM_BUS_FLAG_DATA_MSB_TO_LSB |
                          DRM_BUS_FLAG_DATA_LSB_TO_MSB));
                WARN_ON(desc->bus_format != MEDIA_BUS_FMT_RGB666_1X7X3_SPWG &&
                        desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_SPWG &&
                        desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA);
                WARN_ON(desc->bus_format == MEDIA_BUS_FMT_RGB666_1X7X3_SPWG &&
                        desc->bpc != 6);
                WARN_ON((desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_SPWG ||
                         desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA) &&
                        desc->bpc != 8);
                break;

Here you see that for an LVDS connector we expect at least one bus_flag
- this is OK.
You can also see that for bus_format only a selected few are valid.
You need to investigate and pick the right one here.

One way to find out is to check the driver default as this is likely
selected when you specify an invalid bus_format like in the patch.

If you look for example in Documentation/devicetree/bindings/display/panel/lvds.yaml
then you can see a graphical representation of the formats. This should
help you pick the right one.

	Sam

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

* Re: [PATCH 3/3] dt-bindings: add vendor prefix for Vivax
  2021-08-18 14:46 ` [PATCH 3/3] dt-bindings: add vendor prefix for Vivax Nikola Pavlica
@ 2021-08-18 18:22   ` Sam Ravnborg
  2021-08-18 18:26   ` Sam Ravnborg
  1 sibling, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2021-08-18 18:22 UTC (permalink / raw)
  To: Nikola Pavlica
  Cc: dri-devel, thierry.reding, airlied, daniel, linux-arm-kernel,
	linux-sunxi, linux-sunxi, linux-kernel

On Wed, Aug 18, 2021 at 04:46:48PM +0200, Nikola Pavlica wrote:
> Add vendor prefix for the Vivax brand by M SAN Grupa d.o.o.
> 
> Source (in Croatian): https://www.vivax.com/hr/o-nama.aspx
> 
> Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

I like this as the first in the series, as we cannot apply the patch to
the panel-simple binding before the vendor prefix is present.

	Sam

> ---
>  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index f6064d84a424..c234c392538d 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -1206,6 +1206,8 @@ patternProperties:
>      description: Vitesse Semiconductor Corporation
>    "^vivante,.*":
>      description: Vivante Corporation
> +  "^vivax,.*":
> +    description: Vivax brand by M SAN Grupa d.o.o.
>    "^vocore,.*":
>      description: VoCore Studio
>    "^voipac,.*":
> -- 
> 2.32.0

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

* Re: [PATCH 2/3] dt-bindings: display: simple: Add Vivax TPC-9150 panel
  2021-08-18 14:46 ` [PATCH 2/3] dt-bindings: display: simple: Add Vivax TPC-9150 panel Nikola Pavlica
@ 2021-08-18 18:24   ` Sam Ravnborg
  0 siblings, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2021-08-18 18:24 UTC (permalink / raw)
  To: Nikola Pavlica
  Cc: dri-devel, thierry.reding, airlied, daniel, linux-arm-kernel,
	linux-sunxi, linux-sunxi, linux-kernel

Hi Nikola,

On Wed, Aug 18, 2021 at 04:46:47PM +0200, Nikola Pavlica wrote:
> This tablet display is unique and hence must be added to documentation.
> Unfortunately, it's real make and number is not known due to obscure and
> missing documentation and lack of writing on the display assembly
> itself.
> 
> So the natural alternative that came to mind is to name the panel after
> the device that contained it (an Android tablet). Hopefully that isn't
> an issue.
> 
> I can confirm that the parameters that I've obtained are correct since
> they came from a dump of the original Android OS.
> 
> Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

I like this to be *before* the patch to panel-simple.c, as we cannot
apply the panel-simple.c patch before the compatible is documented.

Or we can apply it, but checkpatch will complain and that will stop me
applying.

So in other words - reverse the order of the patches.

	Sam

> ---
>  .../devicetree/bindings/display/panel/panel-simple.yaml         | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> index 62b0d54d87b7..d0efefa5a820 100644
> --- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> @@ -285,6 +285,8 @@ properties:
>        - urt,umsh-8596md-11t
>        - urt,umsh-8596md-19t
>        - urt,umsh-8596md-20t
> +        # Vivax TPC-9150 tablet 9.0" WSVGA TFT LCD panel
> +      - vivax,tpc9150-panel
>          # VXT 800x480 color TFT LCD panel
>        - vxt,vl050-8048nt-c01
>          # Winstar Display Corporation 3.5" QVGA (320x240) TFT LCD panel
> -- 
> 2.32.0

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

* Re: [PATCH 3/3] dt-bindings: add vendor prefix for Vivax
  2021-08-18 14:46 ` [PATCH 3/3] dt-bindings: add vendor prefix for Vivax Nikola Pavlica
  2021-08-18 18:22   ` Sam Ravnborg
@ 2021-08-18 18:26   ` Sam Ravnborg
  1 sibling, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2021-08-18 18:26 UTC (permalink / raw)
  To: Nikola Pavlica
  Cc: dri-devel, thierry.reding, airlied, daniel, linux-arm-kernel,
	linux-sunxi, linux-sunxi, linux-kernel

Hi Nikola,

On Wed, Aug 18, 2021 at 04:46:48PM +0200, Nikola Pavlica wrote:
> Add vendor prefix for the Vivax brand by M SAN Grupa d.o.o.
> 
> Source (in Croatian): https://www.vivax.com/hr/o-nama.aspx
> 
> Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>

One other note, bindings patches should also be copied to the devicetree
mailing list. See the submitting-patches instructions.

	Sam

> ---
>  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index f6064d84a424..c234c392538d 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -1206,6 +1206,8 @@ patternProperties:
>      description: Vitesse Semiconductor Corporation
>    "^vivante,.*":
>      description: Vivante Corporation
> +  "^vivax,.*":
> +    description: Vivax brand by M SAN Grupa d.o.o.
>    "^vocore,.*":
>      description: VoCore Studio
>    "^voipac,.*":
> -- 
> 2.32.0

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

end of thread, other threads:[~2021-08-18 18:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 14:46 [PATCH 1/3] drm/panel-simple: Add Vivax TPC-9150 panel v4 Nikola Pavlica
2021-08-18 14:46 ` [PATCH 2/3] dt-bindings: display: simple: Add Vivax TPC-9150 panel Nikola Pavlica
2021-08-18 18:24   ` Sam Ravnborg
2021-08-18 14:46 ` [PATCH 3/3] dt-bindings: add vendor prefix for Vivax Nikola Pavlica
2021-08-18 18:22   ` Sam Ravnborg
2021-08-18 18:26   ` Sam Ravnborg
2021-08-18 18:21 ` [PATCH 1/3] drm/panel-simple: Add Vivax TPC-9150 panel v4 Sam Ravnborg

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).