linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/3] dt-bindings: display: Add Sharp LS020B1DD01D panel documentation
@ 2019-04-25 23:18 Paul Cercueil
  2019-04-25 23:18 ` [PATCH v3 2/3] drm: Add bus flag for Sharp-specific signals Paul Cercueil
  2019-04-25 23:18 ` [PATCH v3 3/3] drm/panel: simple: Add Sharp LS020B1DD01D panel support Paul Cercueil
  0 siblings, 2 replies; 5+ messages in thread
From: Paul Cercueil @ 2019-04-25 23:18 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg
  Cc: od, dri-devel, devicetree, linux-kernel, Paul Cercueil, Rob Herring

The LS020B1DD01D is a 2.0" 240x160 16-bit TFT LCD panel.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Rob Herring <robh@kernel.org>
---

Notes:
    v2: New patch
    
    v3: Add Rob's Reviewed-by

 .../bindings/display/panel/sharp,ls020b1dd01d.txt    | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/panel/sharp,ls020b1dd01d.txt

diff --git a/Documentation/devicetree/bindings/display/panel/sharp,ls020b1dd01d.txt b/Documentation/devicetree/bindings/display/panel/sharp,ls020b1dd01d.txt
new file mode 100644
index 000000000000..e45edbc565a3
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/sharp,ls020b1dd01d.txt
@@ -0,0 +1,12 @@
+Sharp 2.0" (240x160 pixels) 16-bit TFT LCD panel
+
+Required properties:
+- compatible: should be "sharp,ls020b1dd01d"
+- power-supply: as specified in the base binding
+
+Optional properties:
+- backlight: as specified in the base binding
+- enable-gpios: as specified in the base binding
+
+This binding is compatible with the simple-panel binding, which is specified
+in simple-panel.txt in this directory.
-- 
2.21.0.593.g511ec345e18


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

* [PATCH v3 2/3] drm: Add bus flag for Sharp-specific signals
  2019-04-25 23:18 [PATCH v3 1/3] dt-bindings: display: Add Sharp LS020B1DD01D panel documentation Paul Cercueil
@ 2019-04-25 23:18 ` Paul Cercueil
  2019-04-27  6:32   ` Sam Ravnborg
  2019-05-27 20:29   ` Extend drm_bus_flags? [Was: [PATCH v3 2/3] drm: Add bus flag for Sharp-specific signals] Sam Ravnborg
  2019-04-25 23:18 ` [PATCH v3 3/3] drm/panel: simple: Add Sharp LS020B1DD01D panel support Paul Cercueil
  1 sibling, 2 replies; 5+ messages in thread
From: Paul Cercueil @ 2019-04-25 23:18 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg
  Cc: od, dri-devel, devicetree, linux-kernel, Paul Cercueil

Add the DRM_BUS_FLAG_SHARP_SIGNALS to the drm_bus_flags enum.

This flags can be used when the display must be driven with the
Sharp-specific signals SPL, CLS, REV, PS.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---

Notes:
    v3: New patch

 include/drm/drm_connector.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 02a131202add..ac7d58fd1e03 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -323,6 +323,8 @@ enum drm_panel_orientation {
  *					edge of the pixel clock
  * @DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE:	Sync signals are sampled on the falling
  *					edge of the pixel clock
+ * @DRM_BUS_FLAG_SHARP_SIGNALS:		Set if the Sharp-specific signals
+ *					(SPL, CLS, PS, REV) must be used
  */
 enum drm_bus_flags {
 	DRM_BUS_FLAG_DE_LOW = BIT(0),
@@ -341,6 +343,7 @@ enum drm_bus_flags {
 	DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE = DRM_BUS_FLAG_SYNC_NEGEDGE,
 	DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE = DRM_BUS_FLAG_SYNC_NEGEDGE,
 	DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE = DRM_BUS_FLAG_SYNC_POSEDGE,
+	DRM_BUS_FLAG_SHARP_SIGNALS = BIT(8),
 };
 
 /**
-- 
2.21.0.593.g511ec345e18


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

* [PATCH v3 3/3] drm/panel: simple: Add Sharp LS020B1DD01D panel support
  2019-04-25 23:18 [PATCH v3 1/3] dt-bindings: display: Add Sharp LS020B1DD01D panel documentation Paul Cercueil
  2019-04-25 23:18 ` [PATCH v3 2/3] drm: Add bus flag for Sharp-specific signals Paul Cercueil
@ 2019-04-25 23:18 ` Paul Cercueil
  1 sibling, 0 replies; 5+ messages in thread
From: Paul Cercueil @ 2019-04-25 23:18 UTC (permalink / raw)
  To: Thierry Reding, Sam Ravnborg
  Cc: od, dri-devel, devicetree, linux-kernel, Paul Cercueil, Artur Rojek

The Sharp LS020B1DD01D is a simple 2.0" 240x160 16-bit TFT panel.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: Artur Rojek <contact@artur-rojek.eu>
---

Notes:
    v2: No change
    
    v3: Add DRM_BUS_FLAG_SHARP_SIGNALS to the bus flags

 drivers/gpu/drm/panel/panel-simple.c | 30 ++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index f5fb9fec88e3..803b91f18248 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -2381,6 +2381,33 @@ static const struct panel_desc sharp_lq150x1lg11 = {
 	.bus_format = MEDIA_BUS_FMT_RGB565_1X16,
 };
 
+static const struct display_timing sharp_ls020b1dd01d_timing = {
+	.pixelclock = { 2000000, 4200000, 5000000 },
+	.hactive = { 240, 240, 240 },
+	.hfront_porch = { 66, 66, 66 },
+	.hback_porch = { 1, 1, 1 },
+	.hsync_len = { 1, 1, 1 },
+	.vactive = { 160, 160, 160 },
+	.vfront_porch = { 52, 52, 52 },
+	.vback_porch = { 6, 6, 6 },
+	.vsync_len = { 10, 10, 10 },
+	.flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_LOW,
+};
+
+static const struct panel_desc sharp_ls020b1dd01d = {
+	.timings = &sharp_ls020b1dd01d_timing,
+	.num_timings = 1,
+	.bpc = 6,
+	.size = {
+		.width = 42,
+		.height = 28,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB565_1X16,
+	.bus_flags = DRM_BUS_FLAG_DE_HIGH
+		   | DRM_BUS_FLAG_PIXDATA_NEGEDGE
+		   | DRM_BUS_FLAG_SHARP_SIGNALS,
+};
+
 static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = {
 	.clock = 33300,
 	.hdisplay = 800,
@@ -2932,6 +2959,9 @@ static const struct of_device_id platform_of_match[] = {
 	}, {
 		.compatible = "sharp,lq150x1lg11",
 		.data = &sharp_lq150x1lg11,
+	}, {
+		.compatible = "sharp,ls020b1dd01d",
+		.data = &sharp_ls020b1dd01d,
 	}, {
 		.compatible = "shelly,sca07010-bfn-lnn",
 		.data = &shelly_sca07010_bfn_lnn,
-- 
2.21.0.593.g511ec345e18


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

* Re: [PATCH v3 2/3] drm: Add bus flag for Sharp-specific signals
  2019-04-25 23:18 ` [PATCH v3 2/3] drm: Add bus flag for Sharp-specific signals Paul Cercueil
@ 2019-04-27  6:32   ` Sam Ravnborg
  2019-05-27 20:29   ` Extend drm_bus_flags? [Was: [PATCH v3 2/3] drm: Add bus flag for Sharp-specific signals] Sam Ravnborg
  1 sibling, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2019-04-27  6:32 UTC (permalink / raw)
  To: Paul Cercueil, Thierry Reding
  Cc: Thierry Reding, od, dri-devel, devicetree, linux-kernel

Hi Paul

On Fri, Apr 26, 2019 at 01:18:53AM +0200, Paul Cercueil wrote:
> Add the DRM_BUS_FLAG_SHARP_SIGNALS to the drm_bus_flags enum.
> 
> This flags can be used when the display must be driven with the
> Sharp-specific signals SPL, CLS, REV, PS.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
> 
> Notes:
>     v3: New patch
> 
>  include/drm/drm_connector.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 02a131202add..ac7d58fd1e03 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -323,6 +323,8 @@ enum drm_panel_orientation {
>   *					edge of the pixel clock
>   * @DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE:	Sync signals are sampled on the falling
>   *					edge of the pixel clock
> + * @DRM_BUS_FLAG_SHARP_SIGNALS:		Set if the Sharp-specific signals
> + *					(SPL, CLS, PS, REV) must be used
>   */
>  enum drm_bus_flags {
>  	DRM_BUS_FLAG_DE_LOW = BIT(0),
> @@ -341,6 +343,7 @@ enum drm_bus_flags {
>  	DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE = DRM_BUS_FLAG_SYNC_NEGEDGE,
>  	DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE = DRM_BUS_FLAG_SYNC_NEGEDGE,
>  	DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE = DRM_BUS_FLAG_SYNC_POSEDGE,
> +	DRM_BUS_FLAG_SHARP_SIGNALS = BIT(8),
>  };

This solutions looks very good to me.
Now the panel can report to the display driver that is needs the
DRM_BUS_FLAG_SHARP_SIGNALS, so the display driver can adapt to the
connected display.
Obviously not many display drivers will support DRM_BUS_FLAG_SHARP_SIGNALS
but the one that does now no longer need to include panel configuration.

You can add:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

But we need Thierry or someone else with more knowledge in this
area to comment on this before we can apply it.
drm_bus_flag is today only timing related config, and there be a better
way to do this.

Thierry?

	Sam

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

* Extend drm_bus_flags? [Was: [PATCH v3 2/3] drm: Add bus flag for Sharp-specific signals]
  2019-04-25 23:18 ` [PATCH v3 2/3] drm: Add bus flag for Sharp-specific signals Paul Cercueil
  2019-04-27  6:32   ` Sam Ravnborg
@ 2019-05-27 20:29   ` Sam Ravnborg
  1 sibling, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2019-05-27 20:29 UTC (permalink / raw)
  To: Paul Cercueil; +Cc: Thierry Reding, devicetree, od, linux-kernel, dri-devel

Hi all.

Please see mail below - is it OK to extend drm_bus_flags to
represent "SHARP signals"?

Paul (and I) could not find any better way to let the panel tell the
display driver that it requires the special SHARP signals.

This has been pending almost a month now and it would only be fair
to either accept the solution or to give Paul guidiance how to move
forward.

There is a display driver that awaits the resilutions of this issue.

	Sam

On Fri, Apr 26, 2019 at 01:18:53AM +0200, Paul Cercueil wrote:
> Add the DRM_BUS_FLAG_SHARP_SIGNALS to the drm_bus_flags enum.
> 
> This flags can be used when the display must be driven with the
> Sharp-specific signals SPL, CLS, REV, PS.
> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
> ---
> 
> Notes:
>     v3: New patch
> 
>  include/drm/drm_connector.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 02a131202add..ac7d58fd1e03 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -323,6 +323,8 @@ enum drm_panel_orientation {
>   *					edge of the pixel clock
>   * @DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE:	Sync signals are sampled on the falling
>   *					edge of the pixel clock
> + * @DRM_BUS_FLAG_SHARP_SIGNALS:		Set if the Sharp-specific signals
> + *					(SPL, CLS, PS, REV) must be used
>   */
>  enum drm_bus_flags {
>  	DRM_BUS_FLAG_DE_LOW = BIT(0),
> @@ -341,6 +343,7 @@ enum drm_bus_flags {
>  	DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE = DRM_BUS_FLAG_SYNC_NEGEDGE,
>  	DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE = DRM_BUS_FLAG_SYNC_NEGEDGE,
>  	DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE = DRM_BUS_FLAG_SYNC_POSEDGE,
> +	DRM_BUS_FLAG_SHARP_SIGNALS = BIT(8),
>  };
>  
>  /**
> -- 
> 2.21.0.593.g511ec345e18
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-05-27 20:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-25 23:18 [PATCH v3 1/3] dt-bindings: display: Add Sharp LS020B1DD01D panel documentation Paul Cercueil
2019-04-25 23:18 ` [PATCH v3 2/3] drm: Add bus flag for Sharp-specific signals Paul Cercueil
2019-04-27  6:32   ` Sam Ravnborg
2019-05-27 20:29   ` Extend drm_bus_flags? [Was: [PATCH v3 2/3] drm: Add bus flag for Sharp-specific signals] Sam Ravnborg
2019-04-25 23:18 ` [PATCH v3 3/3] drm/panel: simple: Add Sharp LS020B1DD01D panel support Paul Cercueil

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