[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

STALE3534d

21 messages, 5 authors, 2017-01-30 · open the first message on its own page

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: vz@mleia.com (Vladimir Zapolskiy)
Date: 2016-12-21 03:27:13

The changeset contains a number of cleanups, changed semantics of
init_panel() callback, which allows to simplify getting of panel
properties from panel device tree node, and a handling of optional
"enable-gpios" panel property, the latter is described in
display/panel/panel-dpi.txt device tree binding documentation, but
it has been unsupported by the ARM CLCD driver.

Vladimir Zapolskiy (4):
  video: ARM CLCD: sort included headers out alphabetically
  video: ARM CLCD: use panel device node for panel initialization
  video: ARM CLCD: use panel device node for getting backlight and mode
  video: ARM CLCD: add support of an optional GPIO to enable panel

 drivers/video/fbdev/amba-clcd-nomadik.c   |  9 +---
 drivers/video/fbdev/amba-clcd-nomadik.h   |  5 +-
 drivers/video/fbdev/amba-clcd-versatile.c | 14 ++----
 drivers/video/fbdev/amba-clcd-versatile.h |  5 +-
 drivers/video/fbdev/amba-clcd.c           | 80 +++++++++++++++++++------------
 include/linux/amba/clcd.h                 |  2 +
 6 files changed, 59 insertions(+), 56 deletions(-)

-- 
2.10.2

[PATCH 1/4] video: ARM CLCD: sort included headers out alphabetically

From: vz@mleia.com (Vladimir Zapolskiy)
Date: 2016-12-21 03:27:14

To simplify the task of looking through the list of included headers sort
them out alphabetically, some of the truly redundant headers are removed
from the list.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/video/fbdev/amba-clcd.c | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
index ec2671d..a806fb8 100644
--- a/drivers/video/fbdev/amba-clcd.c
+++ b/drivers/video/fbdev/amba-clcd.c
@@ -10,27 +10,22 @@
  *
  *  ARM PrimeCell PL110 Color LCD Controller
  */
-#include <linux/dma-mapping.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/slab.h>
+#include <linux/amba/bus.h>
+#include <linux/amba/clcd.h>
+#include <linux/backlight.h>
+#include <linux/clk.h>
 #include <linux/delay.h>
-#include <linux/mm.h>
+#include <linux/dma-mapping.h>
 #include <linux/fb.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/list.h>
-#include <linux/amba/bus.h>
-#include <linux/amba/clcd.h>
-#include <linux/bitops.h>
-#include <linux/clk.h>
-#include <linux/hardirq.h>
-#include <linux/of.h>
+#include <linux/mm.h>
+#include <linux/module.h>
 #include <linux/of_address.h>
 #include <linux/of_graph.h>
-#include <linux/backlight.h>
+#include <linux/slab.h>
+#include <linux/string.h>
 #include <video/display_timing.h>
 #include <video/of_display_timing.h>
 #include <video/videomode.h>
-- 
2.10.2

[PATCH 2/4] video: ARM CLCD: use panel device node for panel initialization

From: vz@mleia.com (Vladimir Zapolskiy)
Date: 2016-12-21 03:27:15

There is no necessity to pass an endpoint device node to custom panel
initialization functions, because a child panel device node should be
sufficient, note that the existing init_panel() callback declaration from
linux/amba/clcd.h already prompts to use the panel device node here.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/video/fbdev/amba-clcd-nomadik.c   |  9 +--------
 drivers/video/fbdev/amba-clcd-nomadik.h   |  5 ++---
 drivers/video/fbdev/amba-clcd-versatile.c | 14 +++-----------
 drivers/video/fbdev/amba-clcd-versatile.h |  5 ++---
 drivers/video/fbdev/amba-clcd.c           |  8 ++++++--
 5 files changed, 14 insertions(+), 27 deletions(-)
diff --git a/drivers/video/fbdev/amba-clcd-nomadik.c b/drivers/video/fbdev/amba-clcd-nomadik.c
index 0c06fca..a9a8f75 100644
--- a/drivers/video/fbdev/amba-clcd-nomadik.c
+++ b/drivers/video/fbdev/amba-clcd-nomadik.c
@@ -214,15 +214,8 @@ static void tpg110_init(struct device *dev, struct device_node *np,
 	board->disable = tpg110_disable;
 }
 
-int nomadik_clcd_init_panel(struct clcd_fb *fb,
-			    struct device_node *endpoint)
+int nomadik_clcd_init_panel(struct clcd_fb *fb, struct device_node *panel)
 {
-	struct device_node *panel;
-
-	panel = of_graph_get_remote_port_parent(endpoint);
-	if (!panel)
-		return -ENODEV;
-
 	if (of_device_is_compatible(panel, "tpo,tpg110"))
 		tpg110_init(&fb->dev->dev, panel, fb->board);
 	else
diff --git a/drivers/video/fbdev/amba-clcd-nomadik.h b/drivers/video/fbdev/amba-clcd-nomadik.h
index 50aa9bd..a24032c 100644
--- a/drivers/video/fbdev/amba-clcd-nomadik.h
+++ b/drivers/video/fbdev/amba-clcd-nomadik.h
@@ -6,8 +6,7 @@
 #ifdef CONFIG_ARCH_NOMADIK
 int nomadik_clcd_init_board(struct amba_device *adev,
 			     struct clcd_board *board);
-int nomadik_clcd_init_panel(struct clcd_fb *fb,
-			    struct device_node *endpoint);
+int nomadik_clcd_init_panel(struct clcd_fb *fb, struct device_node *panel);
 #else
 static inline int nomadik_clcd_init_board(struct amba_device *adev,
 					  struct clcd_board *board)
@@ -15,7 +14,7 @@ static inline int nomadik_clcd_init_board(struct amba_device *adev,
 	return 0;
 }
 static inline int nomadik_clcd_init_panel(struct clcd_fb *fb,
-					  struct device_node *endpoint)
+					  struct device_node *panel)
 {
 	return 0;
 }
diff --git a/drivers/video/fbdev/amba-clcd-versatile.c b/drivers/video/fbdev/amba-clcd-versatile.c
index e5d9bfc..d42047d 100644
--- a/drivers/video/fbdev/amba-clcd-versatile.c
+++ b/drivers/video/fbdev/amba-clcd-versatile.c
@@ -452,11 +452,9 @@ static const struct versatile_panel versatile_panels[] = {
 	},
 };
 
-static void versatile_panel_probe(struct device *dev,
-				  struct device_node *endpoint)
+static void versatile_panel_probe(struct device *dev, struct device_node *panel)
 {
 	struct versatile_panel const *vpanel = NULL;
-	struct device_node *panel = NULL;
 	u32 val;
 	int ret;
 	int i;
@@ -488,11 +486,6 @@ static void versatile_panel_probe(struct device *dev,
 		return;
 	}
 
-	panel = of_graph_get_remote_port_parent(endpoint);
-	if (!panel) {
-		dev_err(dev, "could not locate panel in DT\n");
-		return;
-	}
 	if (!of_device_is_compatible(panel, vpanel->compatible))
 		dev_err(dev, "panel in DT is not compatible with the "
 			"auto-detected panel, continuing anyway\n");
@@ -514,8 +507,7 @@ static void versatile_panel_probe(struct device *dev,
 	}
 }
 
-int versatile_clcd_init_panel(struct clcd_fb *fb,
-			      struct device_node *endpoint)
+int versatile_clcd_init_panel(struct clcd_fb *fb, struct device_node *panel)
 {
 	const struct of_device_id *clcd_id;
 	enum versatile_clcd versatile_clcd_type;
@@ -551,7 +543,7 @@ int versatile_clcd_init_panel(struct clcd_fb *fb,
 		fb->board->enable = versatile_clcd_enable;
 		fb->board->disable = versatile_clcd_disable;
 		fb->board->decode = versatile_clcd_decode;
-		versatile_panel_probe(dev, endpoint);
+		versatile_panel_probe(dev, panel);
 		dev_info(dev, "set up callbacks for Versatile\n");
 		break;
 	case REALVIEW_CLCD_EB:
diff --git a/drivers/video/fbdev/amba-clcd-versatile.h b/drivers/video/fbdev/amba-clcd-versatile.h
index 1b14359..4692c30 100644
--- a/drivers/video/fbdev/amba-clcd-versatile.h
+++ b/drivers/video/fbdev/amba-clcd-versatile.h
@@ -6,11 +6,10 @@
 #include <linux/platform_data/video-clcd-versatile.h>
 
 #if defined(CONFIG_PLAT_VERSATILE_CLCD) && defined(CONFIG_OF)
-int versatile_clcd_init_panel(struct clcd_fb *fb,
-			      struct device_node *endpoint);
+int versatile_clcd_init_panel(struct clcd_fb *fb, struct device_node *panel);
 #else
 static inline int versatile_clcd_init_panel(struct clcd_fb *fb,
-				struct device_node *endpoint)
+					    struct device_node *panel)
 {
 	return 0;
 }
diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
index a806fb8..f25b5fc 100644
--- a/drivers/video/fbdev/amba-clcd.c
+++ b/drivers/video/fbdev/amba-clcd.c
@@ -764,7 +764,7 @@ static int clcdfb_of_init_tft_panel(struct clcd_fb *fb, u32 r0, u32 g0, u32 b0)
 
 static int clcdfb_of_init_display(struct clcd_fb *fb)
 {
-	struct device_node *endpoint;
+	struct device_node *endpoint, *panel;
 	int err;
 	unsigned int bpp;
 	u32 max_bandwidth;
@@ -781,8 +781,12 @@ static int clcdfb_of_init_display(struct clcd_fb *fb)
 	if (!endpoint)
 		return -ENODEV;
 
+	panel = of_graph_get_remote_port_parent(endpoint);
+	if (!panel)
+		return -ENODEV;
+
 	if (fb->vendor->init_panel) {
-		err = fb->vendor->init_panel(fb, endpoint);
+		err = fb->vendor->init_panel(fb, panel);
 		if (err)
 			return err;
 	}
-- 
2.10.2

[PATCH 3/4] video: ARM CLCD: use panel device node for getting backlight and mode

From: vz@mleia.com (Vladimir Zapolskiy)
Date: 2016-12-21 03:27:16

Having obtained panel device node in clcdfb_of_init_display() it allows to
generalize and simplify two more helper functions clcdfb_of_get_backlight()
and clcdfb_of_get_mode().

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/video/fbdev/amba-clcd.c | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)
diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
index f25b5fc..0fab92c 100644
--- a/drivers/video/fbdev/amba-clcd.c
+++ b/drivers/video/fbdev/amba-clcd.c
@@ -624,16 +624,11 @@ static int clcdfb_snprintf_mode(char *buf, int size, struct fb_videomode *mode)
 			mode->refresh);
 }
 
-static int clcdfb_of_get_backlight(struct device_node *endpoint,
+static int clcdfb_of_get_backlight(struct device_node *panel,
 				   struct clcd_panel *clcd_panel)
 {
-	struct device_node *panel;
 	struct device_node *backlight;
 
-	panel = of_graph_get_remote_port_parent(endpoint);
-	if (!panel)
-		return -ENODEV;
-
 	/* Look up the optional backlight phandle */
 	backlight = of_parse_phandle(panel, "backlight", 0);
 	if (backlight) {
@@ -646,19 +641,14 @@ static int clcdfb_of_get_backlight(struct device_node *endpoint,
 	return 0;
 }
 
-static int clcdfb_of_get_mode(struct device *dev, struct device_node *endpoint,
-		struct clcd_panel *clcd_panel)
+static int clcdfb_of_get_mode(struct device *dev, struct device_node *panel,
+			      struct clcd_panel *clcd_panel)
 {
 	int err;
-	struct device_node *panel;
 	struct fb_videomode *mode;
 	char *name;
 	int len;
 
-	panel = of_graph_get_remote_port_parent(endpoint);
-	if (!panel)
-		return -ENODEV;
-
 	/* Only directly connected DPI panels supported for now */
 	if (of_device_is_compatible(panel, "panel-dpi"))
 		err = clcdfb_of_get_dpi_panel_mode(panel, clcd_panel);
@@ -791,11 +781,11 @@ static int clcdfb_of_init_display(struct clcd_fb *fb)
 			return err;
 	}
 
-	err = clcdfb_of_get_backlight(endpoint, fb->panel);
+	err = clcdfb_of_get_backlight(panel, fb->panel);
 	if (err)
 		return err;
 
-	err = clcdfb_of_get_mode(&fb->dev->dev, endpoint, fb->panel);
+	err = clcdfb_of_get_mode(&fb->dev->dev, panel, fb->panel);
 	if (err)
 		return err;
 
-- 
2.10.2

[PATCH 4/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: vz@mleia.com (Vladimir Zapolskiy)
Date: 2016-12-21 03:27:17

The change adds handling of "enable-gpios" property of panel-dpi device
node used with an ARM CLCD controller, note that the property already has
a description in display/panel/panel-dpi.txt documentation and it founds
practical usage while describing some panel devices connected to other
types of display controllers.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
---
 drivers/video/fbdev/amba-clcd.c | 29 +++++++++++++++++++++++++++++
 include/linux/amba/clcd.h       |  2 ++
 2 files changed, 31 insertions(+)
diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c
index 0fab92c..0bb8646 100644
--- a/drivers/video/fbdev/amba-clcd.c
+++ b/drivers/video/fbdev/amba-clcd.c
@@ -17,6 +17,7 @@
 #include <linux/delay.h>
 #include <linux/dma-mapping.h>
 #include <linux/fb.h>
+#include <linux/gpio/consumer.h>
 #include <linux/init.h>
 #include <linux/ioport.h>
 #include <linux/list.h>
@@ -87,6 +88,9 @@ static void clcdfb_disable(struct clcd_fb *fb)
 		writel(val, fb->regs + fb->off_cntl);
 	}
 
+	if (fb->panel->enable_gpio)
+		gpiod_set_value_cansleep(fb->panel->enable_gpio, 0);
+
 	/*
 	 * Disable CLCD clock source.
 	 */
@@ -106,6 +110,9 @@ static void clcdfb_enable(struct clcd_fb *fb, u32 cntl)
 		clk_enable(fb->clk);
 	}
 
+	if (fb->panel->enable_gpio)
+		gpiod_set_value_cansleep(fb->panel->enable_gpio, 1);
+
 	/*
 	 * Bring up by first enabling..
 	 */
@@ -624,6 +631,24 @@ static int clcdfb_snprintf_mode(char *buf, int size, struct fb_videomode *mode)
 			mode->refresh);
 }
 
+static int clcdfb_of_get_enable_gpio(struct device *dev,
+				     struct device_node *panel,
+				     struct clcd_panel *clcd_panel)
+{
+	int err;
+
+	clcd_panel->enable_gpio = devm_get_gpiod_from_child(dev, "enable",
+							    &panel->fwnode);
+	if (IS_ERR(clcd_panel->enable_gpio)) {
+		err = PTR_ERR(clcd_panel->enable_gpio);
+		clcd_panel->enable_gpio = NULL;
+		if (err != -ENOENT)
+			return err;
+	}
+
+	return 0;
+}
+
 static int clcdfb_of_get_backlight(struct device_node *panel,
 				   struct clcd_panel *clcd_panel)
 {
@@ -781,6 +806,10 @@ static int clcdfb_of_init_display(struct clcd_fb *fb)
 			return err;
 	}
 
+	err = clcdfb_of_get_enable_gpio(&fb->dev->dev, panel, fb->panel);
+	if (err)
+		return err;
+
 	err = clcdfb_of_get_backlight(panel, fb->panel);
 	if (err)
 		return err;
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h
index 1035879..a9c6007 100644
--- a/include/linux/amba/clcd.h
+++ b/include/linux/amba/clcd.h
@@ -105,6 +105,7 @@ enum {
 };
 
 struct backlight_device;
+struct gpio_desc;
 
 struct clcd_panel {
 	struct fb_videomode	mode;
@@ -119,6 +120,7 @@ struct clcd_panel {
 				grayscale:1;
 	unsigned int		connector;
 	struct backlight_device	*backlight;
+	struct gpio_desc	*enable_gpio;
 	/*
 	 * If the B/R lines are switched between the CLCD
 	 * and the panel we need to know this and not try to
-- 
2.10.2

[PATCH 4/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: Linus Walleij <hidden>
Date: 2016-12-30 08:20:53

On Wed, Dec 21, 2016 at 4:27 AM, Vladimir Zapolskiy [off-list ref] wrote:
The change adds handling of "enable-gpios" property of panel-dpi device
node used with an ARM CLCD controller, note that the property already has
a description in display/panel/panel-dpi.txt documentation and it founds
practical usage while describing some panel devices connected to other
types of display controllers.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
So as you may have seen I already handle a RESET GPIO in the
Nomadik TPG110 panel subddriver in
drivers/video/fbdev/amba-clcd-nomadik.c

So is this all your panel needs?

I guess it is OK for simple panels.

Yours,
Linus Walleij

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: Linus Walleij <hidden>
Date: 2016-12-30 08:23:59

On Wed, Dec 21, 2016 at 4:27 AM, Vladimir Zapolskiy [off-list ref] wrote:
The changeset contains a number of cleanups, changed semantics of
init_panel() callback, which allows to simplify getting of panel
properties from panel device tree node, and a handling of optional
"enable-gpios" panel property, the latter is described in
display/panel/panel-dpi.txt device tree binding documentation, but
it has been unsupported by the ARM CLCD driver.

Vladimir Zapolskiy (4):
  video: ARM CLCD: sort included headers out alphabetically
  video: ARM CLCD: use panel device node for panel initialization
  video: ARM CLCD: use panel device node for getting backlight and mode
  video: ARM CLCD: add support of an optional GPIO to enable panel
As you may have seen Tomi has stepped down as FBDEV maintainer and
this subsystem is now orphaned.

I guess Andrew Morton merges patches for it in this case, he usually does.

But what we should actually do is create a new DRM driver for CLCD
in drivers/gpu/drm/arm/clcd*

It's maybe not a small undertaking :(

But in case you're interested in the job, I will pitch in and test the result
on all ARM reference designs plus Nomadik.

Yours,
Linus Walleij

[PATCH 4/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: vz@mleia.com (Vladimir Zapolskiy)
Date: 2016-12-30 09:24:50

On 12/30/2016 10:20 AM, Linus Walleij wrote:
On Wed, Dec 21, 2016 at 4:27 AM, Vladimir Zapolskiy [off-list ref] wrote:
quoted
The change adds handling of "enable-gpios" property of panel-dpi device
node used with an ARM CLCD controller, note that the property already has
a description in display/panel/panel-dpi.txt documentation and it founds
practical usage while describing some panel devices connected to other
types of display controllers.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
So as you may have seen I already handle a RESET GPIO in the
Nomadik TPG110 panel subddriver in
drivers/video/fbdev/amba-clcd-nomadik.c

So is this all your panel needs?
I need "enable-gpios" property to define a GPIO, which literally enables
(powers up) a panel as a separate attached PCB.

To some extend "enable-gpios" property can be replaced by "power" property
with a phandle to a GPIO voltage regulator.

You may look at drivers/gpu/drm/panel/panel-simple.c, both "enable-gpios"
and "power" properties are defined for simple panels.
I guess it is OK for simple panels.
--
With best wishes,
Vladimir

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: vz@mleia.com (Vladimir Zapolskiy)
Date: 2017-01-01 20:50:45

On 12/30/2016 10:23 AM, Linus Walleij wrote:
On Wed, Dec 21, 2016 at 4:27 AM, Vladimir Zapolskiy [off-list ref] wrote:
quoted
The changeset contains a number of cleanups, changed semantics of
init_panel() callback, which allows to simplify getting of panel
properties from panel device tree node, and a handling of optional
"enable-gpios" panel property, the latter is described in
display/panel/panel-dpi.txt device tree binding documentation, but
it has been unsupported by the ARM CLCD driver.

Vladimir Zapolskiy (4):
  video: ARM CLCD: sort included headers out alphabetically
  video: ARM CLCD: use panel device node for panel initialization
  video: ARM CLCD: use panel device node for getting backlight and mode
  video: ARM CLCD: add support of an optional GPIO to enable panel
As you may have seen Tomi has stepped down as FBDEV maintainer and
this subsystem is now orphaned.

I guess Andrew Morton merges patches for it in this case, he usually does.
Hello Andrew,

if you have the patches in your mailbox, could you please review and
apply them for the next?
But what we should actually do is create a new DRM driver for CLCD
in drivers/gpu/drm/arm/clcd*

It's maybe not a small undertaking :(

But in case you're interested in the job, I will pitch in and test the result
on all ARM reference designs plus Nomadik.
I'll take a look at this task, talking about the controller itself
it should be relatively easy to port the driver to DRM and replace
panel initialization code with a panel-simple driver, however platform
specific hooks for Nomadik and Versatile require special attention,
and because I don't have that hardware I'll keep my hands off it. FWIW
the LPC32xx and LPC18xx/LPC43xx platforms for which I did this change
don't need anything out of the shared video/fbdev/amba-clcd.c code.

--
With best wishes,
Vladimir

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: linux@armlinux.org.uk (Russell King - ARM Linux)
Date: 2017-01-02 14:22:28

On Fri, Dec 30, 2016 at 09:23:59AM +0100, Linus Walleij wrote:
On Wed, Dec 21, 2016 at 4:27 AM, Vladimir Zapolskiy [off-list ref] wrote:
quoted
The changeset contains a number of cleanups, changed semantics of
init_panel() callback, which allows to simplify getting of panel
properties from panel device tree node, and a handling of optional
"enable-gpios" panel property, the latter is described in
display/panel/panel-dpi.txt device tree binding documentation, but
it has been unsupported by the ARM CLCD driver.

Vladimir Zapolskiy (4):
  video: ARM CLCD: sort included headers out alphabetically
  video: ARM CLCD: use panel device node for panel initialization
  video: ARM CLCD: use panel device node for getting backlight and mode
  video: ARM CLCD: add support of an optional GPIO to enable panel
As you may have seen Tomi has stepped down as FBDEV maintainer and
this subsystem is now orphaned.

I guess Andrew Morton merges patches for it in this case, he usually does.

But what we should actually do is create a new DRM driver for CLCD
in drivers/gpu/drm/arm/clcd*

It's maybe not a small undertaking :(

But in case you're interested in the job, I will pitch in and test the result
on all ARM reference designs plus Nomadik.
A DRM driver for it would probably be a good idea, but dealing with all
the weird and wonderful connection arrangements may not be that easy...

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: vz@mleia.com (Vladimir Zapolskiy)
Date: 2017-01-07 23:32:00

On 01/02/2017 04:22 PM, Russell King - ARM Linux wrote:
On Fri, Dec 30, 2016 at 09:23:59AM +0100, Linus Walleij wrote:
quoted
On Wed, Dec 21, 2016 at 4:27 AM, Vladimir Zapolskiy [off-list ref] wrote:
quoted
The changeset contains a number of cleanups, changed semantics of
init_panel() callback, which allows to simplify getting of panel
properties from panel device tree node, and a handling of optional
"enable-gpios" panel property, the latter is described in
display/panel/panel-dpi.txt device tree binding documentation, but
it has been unsupported by the ARM CLCD driver.

Vladimir Zapolskiy (4):
  video: ARM CLCD: sort included headers out alphabetically
  video: ARM CLCD: use panel device node for panel initialization
  video: ARM CLCD: use panel device node for getting backlight and mode
  video: ARM CLCD: add support of an optional GPIO to enable panel
As you may have seen Tomi has stepped down as FBDEV maintainer and
this subsystem is now orphaned.

I guess Andrew Morton merges patches for it in this case, he usually does.

But what we should actually do is create a new DRM driver for CLCD
in drivers/gpu/drm/arm/clcd*

It's maybe not a small undertaking :(

But in case you're interested in the job, I will pitch in and test the result
on all ARM reference designs plus Nomadik.
A DRM driver for it would probably be a good idea, but dealing with all
the weird and wonderful connection arrangements may not be that easy...
Linus, Russell,

I've immediately encountered a problem while porting the driver to DRM,
because LPC18xx/LPC43xx SoCs are powered by Cortex-M3/M4 cores and DRM
framework has build and runtime dependencies on MMU.

That said, in short term I would expect a continuation of support for
the legacy CLCD framebuffer driver, which works fine on MMU-less SoCs.

--
With best wishes,
Vladimir

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: vz@mleia.com (Vladimir Zapolskiy)
Date: 2017-01-10 04:06:48

On 01/08/2017 01:32 AM, Vladimir Zapolskiy wrote:
On 01/02/2017 04:22 PM, Russell King - ARM Linux wrote:
quoted
On Fri, Dec 30, 2016 at 09:23:59AM +0100, Linus Walleij wrote:
quoted
On Wed, Dec 21, 2016 at 4:27 AM, Vladimir Zapolskiy [off-list ref] wrote:
quoted
The changeset contains a number of cleanups, changed semantics of
init_panel() callback, which allows to simplify getting of panel
properties from panel device tree node, and a handling of optional
"enable-gpios" panel property, the latter is described in
display/panel/panel-dpi.txt device tree binding documentation, but
it has been unsupported by the ARM CLCD driver.

Vladimir Zapolskiy (4):
  video: ARM CLCD: sort included headers out alphabetically
  video: ARM CLCD: use panel device node for panel initialization
  video: ARM CLCD: use panel device node for getting backlight and mode
  video: ARM CLCD: add support of an optional GPIO to enable panel
As you may have seen Tomi has stepped down as FBDEV maintainer and
this subsystem is now orphaned.

I guess Andrew Morton merges patches for it in this case, he usually does.

But what we should actually do is create a new DRM driver for CLCD
in drivers/gpu/drm/arm/clcd*

It's maybe not a small undertaking :(

But in case you're interested in the job, I will pitch in and test the result
on all ARM reference designs plus Nomadik.
A DRM driver for it would probably be a good idea, but dealing with all
the weird and wonderful connection arrangements may not be that easy...
Linus, Russell,

I've immediately encountered a problem while porting the driver to DRM,
because LPC18xx/LPC43xx SoCs are powered by Cortex-M3/M4 cores and DRM
framework has build and runtime dependencies on MMU.

That said, in short term I would expect a continuation of support for
the legacy CLCD framebuffer driver, which works fine on MMU-less SoCs.
Linus, Russell,

please let me ask you to review/ack the changes, then I'll resend them
to Andrew for inclusion as suggested by Linus.

--
With best wishes,
Vladimir

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: Vladimir Murzin <hidden>
Date: 2017-01-10 13:47:01

Hi Vladimir,

On 07/01/17 23:32, Vladimir Zapolskiy wrote:
On 01/02/2017 04:22 PM, Russell King - ARM Linux wrote:
quoted
On Fri, Dec 30, 2016 at 09:23:59AM +0100, Linus Walleij wrote:
quoted
On Wed, Dec 21, 2016 at 4:27 AM, Vladimir Zapolskiy [off-list ref] wrote:
quoted
The changeset contains a number of cleanups, changed semantics of
init_panel() callback, which allows to simplify getting of panel
properties from panel device tree node, and a handling of optional
"enable-gpios" panel property, the latter is described in
display/panel/panel-dpi.txt device tree binding documentation, but
it has been unsupported by the ARM CLCD driver.

Vladimir Zapolskiy (4):
  video: ARM CLCD: sort included headers out alphabetically
  video: ARM CLCD: use panel device node for panel initialization
  video: ARM CLCD: use panel device node for getting backlight and mode
  video: ARM CLCD: add support of an optional GPIO to enable panel
As you may have seen Tomi has stepped down as FBDEV maintainer and
this subsystem is now orphaned.

I guess Andrew Morton merges patches for it in this case, he usually does.

But what we should actually do is create a new DRM driver for CLCD
in drivers/gpu/drm/arm/clcd*

It's maybe not a small undertaking :(

But in case you're interested in the job, I will pitch in and test the result
on all ARM reference designs plus Nomadik.
A DRM driver for it would probably be a good idea, but dealing with all
the weird and wonderful connection arrangements may not be that easy...
Linus, Russell,

I've immediately encountered a problem while porting the driver to DRM,
because LPC18xx/LPC43xx SoCs are powered by Cortex-M3/M4 cores and DRM
framework has build and runtime dependencies on MMU.
+Benjamin

In another thread Benjamin pointed at patch [1] in drm/kms part for noMMU.

[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?idba0d98a188cc4ebd8ea54b37d274ec20465e464

Cheers
Vladimir
That said, in short term I would expect a continuation of support for
the legacy CLCD framebuffer driver, which works fine on MMU-less SoCs.

--
With best wishes,
Vladimir

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: Linus Walleij <hidden>
Date: 2017-01-11 15:16:31

On Tue, Jan 10, 2017 at 2:47 PM, Vladimir Murzin
[off-list ref] wrote:
In another thread Benjamin pointed at patch [1] in drm/kms part for noMMU.

[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?idba0d98a188cc4ebd8ea54b37d274ec20465e464
Problem solved?

Vladimir: I do not require in any way that you create a CLCD driver for DRM,
I just think it would be very very nice...

Yours,
Linus Walleij

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: vz@mleia.com (Vladimir Zapolskiy)
Date: 2017-01-12 00:05:45

On 01/11/2017 05:16 PM, Linus Walleij wrote:
On Tue, Jan 10, 2017 at 2:47 PM, Vladimir Murzin
[off-list ref] wrote:
quoted
In another thread Benjamin pointed at patch [1] in drm/kms part for noMMU.

[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?idba0d98a188cc4ebd8ea54b37d274ec20465e464
Problem solved?

Vladimir: I do not require in any way that you create a CLCD driver for DRM,
I just think it would be very very nice...
I have no other option, this series is unreviewed and thus unlikely it will
be applied, still a panel PCB on my board needs power management support.

--
With best wishes,
Vladimir

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: Linus Walleij <hidden>
Date: 2017-01-12 08:27:03

On Thu, Jan 12, 2017 at 1:05 AM, Vladimir Zapolskiy [off-list ref] wrote:
On 01/11/2017 05:16 PM, Linus Walleij wrote:
quoted
On Tue, Jan 10, 2017 at 2:47 PM, Vladimir Murzin
[off-list ref] wrote:
quoted
In another thread Benjamin pointed at patch [1] in drm/kms part for noMMU.

[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?idba0d98a188cc4ebd8ea54b37d274ec20465e464
Problem solved?

Vladimir: I do not require in any way that you create a CLCD driver for DRM,
I just think it would be very very nice...
I have no other option, this series is unreviewed and thus unlikely it will
be applied, still a panel PCB on my board needs power management support.
Hm I can ACK it I guess, but mergeing it into an unmaintained subsystem
is another issue, just not very optimal. If you get it working on your system
I can look into migrating all the old users to DRM as well.

Yours,
Linus Walleij

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: vz@mleia.com (Vladimir Zapolskiy)
Date: 2017-01-12 21:26:14

On 01/12/2017 10:27 AM, Linus Walleij wrote:
On Thu, Jan 12, 2017 at 1:05 AM, Vladimir Zapolskiy [off-list ref] wrote:
quoted
On 01/11/2017 05:16 PM, Linus Walleij wrote:
quoted
On Tue, Jan 10, 2017 at 2:47 PM, Vladimir Murzin
[off-list ref] wrote:
quoted
In another thread Benjamin pointed at patch [1] in drm/kms part for noMMU.

[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?idba0d98a188cc4ebd8ea54b37d274ec20465e464
Problem solved?

Vladimir: I do not require in any way that you create a CLCD driver for DRM,
I just think it would be very very nice...
I have no other option, this series is unreviewed and thus unlikely it will
be applied, still a panel PCB on my board needs power management support.
Hm I can ACK it I guess, but mergeing it into an unmaintained subsystem
is another issue, just not very optimal. 
+ Bartlomiej

Linus, your ack is always more than appreciated.

To all appearance Bartlomiej is a new honoured framebuffer layer maintainer.

Bartlomiej, do you have the changes under discussion in your mailbox or
should I resend them to you directly for review?
If you get it working on your system I can look into migrating all the old
users to DRM as well.
Sure, I started development of a simple CLCD DRM driver as an own attractive
exercise, I'll keep you informed of the progress.

--
With best wishes,
Vladimir

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: Bartlomiej Zolnierkiewicz <hidden>
Date: 2017-01-13 11:08:47

Hi,

On Thursday, January 12, 2017 11:26:14 PM Vladimir Zapolskiy wrote:
On 01/12/2017 10:27 AM, Linus Walleij wrote:
quoted
On Thu, Jan 12, 2017 at 1:05 AM, Vladimir Zapolskiy [off-list ref] wrote:
quoted
On 01/11/2017 05:16 PM, Linus Walleij wrote:
quoted
On Tue, Jan 10, 2017 at 2:47 PM, Vladimir Murzin
[off-list ref] wrote:
quoted
In another thread Benjamin pointed at patch [1] in drm/kms part for noMMU.

[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?idba0d98a188cc4ebd8ea54b37d274ec20465e464
Problem solved?

Vladimir: I do not require in any way that you create a CLCD driver for DRM,
I just think it would be very very nice...
I have no other option, this series is unreviewed and thus unlikely it will
be applied, still a panel PCB on my board needs power management support.
Hm I can ACK it I guess, but mergeing it into an unmaintained subsystem
is another issue, just not very optimal. 
+ Bartlomiej

Linus, your ack is always more than appreciated.
+1
To all appearance Bartlomiej is a new honoured framebuffer layer maintainer.

Bartlomiej, do you have the changes under discussion in your mailbox or
should I resend them to you directly for review?
No need for resend, I picked them from the list and they are on TODO.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
quoted
If you get it working on your system I can look into migrating all the old
users to DRM as well.
Sure, I started development of a simple CLCD DRM driver as an own attractive
exercise, I'll keep you informed of the progress.

--
With best wishes,
Vladimir

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: vz@mleia.com (Vladimir Zapolskiy)
Date: 2017-01-17 01:57:33

On 01/13/2017 01:08 PM, Bartlomiej Zolnierkiewicz wrote:
Hi,

On Thursday, January 12, 2017 11:26:14 PM Vladimir Zapolskiy wrote:
quoted
On 01/12/2017 10:27 AM, Linus Walleij wrote:
quoted
On Thu, Jan 12, 2017 at 1:05 AM, Vladimir Zapolskiy [off-list ref] wrote:
quoted
On 01/11/2017 05:16 PM, Linus Walleij wrote:
quoted
On Tue, Jan 10, 2017 at 2:47 PM, Vladimir Murzin
[off-list ref] wrote:
quoted
In another thread Benjamin pointed at patch [1] in drm/kms part for noMMU.

[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?idba0d98a188cc4ebd8ea54b37d274ec20465e464
Problem solved?

Vladimir: I do not require in any way that you create a CLCD driver for DRM,
I just think it would be very very nice...
I have no other option, this series is unreviewed and thus unlikely it will
be applied, still a panel PCB on my board needs power management support.
Hm I can ACK it I guess, but mergeing it into an unmaintained subsystem
is another issue, just not very optimal. 
+ Bartlomiej

Linus, your ack is always more than appreciated.
+1
quoted
To all appearance Bartlomiej is a new honoured framebuffer layer maintainer.

Bartlomiej, do you have the changes under discussion in your mailbox or
should I resend them to you directly for review?
No need for resend, I picked them from the list and they are on TODO.
Bartlomiej, Linus,

I've noticed that 4/4 requires special attention due to the anticipated
change of devm_get_gpiod_from_child() interface.

If you have any concerns regarding 4/4, please review and consider to
apply the first three clean-up patches in the series, basically I've
achieved my goal of describing a power supply for a panel in DTS by
introducing a DRM driver (see a note below), however support of
"enable-gpios" property mentioned in the "panel-dpi" device tree binding
documentation still is seen as beneficial for the CLCD fbdev driver.
quoted
quoted
If you get it working on your system I can look into migrating all the old
users to DRM as well.
Sure, I started development of a simple CLCD DRM driver as an own attractive
exercise, I'll keep you informed of the progress.
Some updates, now I've developed a simple CLCD DRM driver which works
nicely on one of my boards powered by LPC3250 (has MMU), but I still
have to find enough time and check that the driver works on MMU-less
LPC4357 with the applied DRM core change referenced by Vladimir earlier.

Most probably I'll complete polishing the driver on this weekend and
send it for review on the next week.

One more comment, I've found a discussion when DT support to the CLCD
fbdev driver was added [1], there are some comments about panel device
node and endpoints incompatibility in comparison to the common layout
for Linux-ish DRM devices, and I do confirm that this incompatibility
exists. I have both versions though, but you guess that DRM flavour
is cleaner, and for CLCD DRM driver I'm going to use it.

The legacy DT layout can be supported in the same driver in parallel,
but unfortunately it makes the driver not so cute, and I decide to
drop it in the initial version. It implies that CLCD fbdev users with
the controller and panel descriptions in DT and who want to switch to
CLCD DRM driver should update DTS. Sorry, I know it is inconvenient...

[1] https://patchwork.kernel.org/patch/3777391/

--
With best wishes,
Vladimir

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: Linus Walleij <hidden>
Date: 2017-01-18 12:22:21

On Tue, Jan 17, 2017 at 2:57 AM, Vladimir Zapolskiy [off-list ref] wrote:
I've noticed that 4/4 requires special attention due to the anticipated
change of devm_get_gpiod_from_child() interface.
Hm. Yeah I merged that patch to the GPIO tree yesterday.

I can of course put those patches on an immutable branch to
be pulled into the fbdev tree, if Bartlomiej wants to kickstart
the fbdev work with some complex cross-git merging :D
Some updates, now I've developed a simple CLCD DRM driver which works
nicely on one of my boards powered by LPC3250 (has MMU), but I still
have to find enough time and check that the driver works on MMU-less
LPC4357 with the applied DRM core change referenced by Vladimir earlier.

Most probably I'll complete polishing the driver on this weekend and
send it for review on the next week.
Nice! I look forward to it.
One more comment, I've found a discussion when DT support to the CLCD
fbdev driver was added [1], there are some comments about panel device
node and endpoints incompatibility in comparison to the common layout
for Linux-ish DRM devices, and I do confirm that this incompatibility
exists. I have both versions though, but you guess that DRM flavour
is cleaner, and for CLCD DRM driver I'm going to use it.
Probably a good idea.
The legacy DT layout can be supported in the same driver in parallel,
but unfortunately it makes the driver not so cute, and I decide to
drop it in the initial version. It implies that CLCD fbdev users with
the controller and panel descriptions in DT and who want to switch to
CLCD DRM driver should update DTS. Sorry, I know it is inconvenient...
I'm one of those who tend to be lax on these DT ABI issues.

I guess it makes most sense to merge the DRM driver in parallel,
using the DRM bindings, then I can work on adding in support for
my misc systems (all ARM reference designs essentially, plus
Nomadik) using the DRM bindings, and we can stabilize that,
then as a last step simply switch over, augment all device trees
and delete the old fbdev driver.

These systems do NOT have deployed DTB device trees that cannot
be upgraded, they are reference designs not consumer products,
so requireing people to update their device trees is totally
reasonable. In fact I use attached device tree on all of them.

Yours,
Linus Walleij

[PATCH 0/4] video: ARM CLCD: add support of an optional GPIO to enable panel

From: Bartlomiej Zolnierkiewicz <hidden>
Date: 2017-01-30 15:23:37

On Tuesday, January 17, 2017 03:57:33 AM Vladimir Zapolskiy wrote:
On 01/13/2017 01:08 PM, Bartlomiej Zolnierkiewicz wrote:
quoted
Hi,

On Thursday, January 12, 2017 11:26:14 PM Vladimir Zapolskiy wrote:
quoted
On 01/12/2017 10:27 AM, Linus Walleij wrote:
quoted
On Thu, Jan 12, 2017 at 1:05 AM, Vladimir Zapolskiy [off-list ref] wrote:
quoted
On 01/11/2017 05:16 PM, Linus Walleij wrote:
quoted
On Tue, Jan 10, 2017 at 2:47 PM, Vladimir Murzin
[off-list ref] wrote:
quoted
In another thread Benjamin pointed at patch [1] in drm/kms part for noMMU.

[1] https://cgit.freedesktop.org/drm/drm-misc/commit/?idba0d98a188cc4ebd8ea54b37d274ec20465e464
Problem solved?

Vladimir: I do not require in any way that you create a CLCD driver for DRM,
I just think it would be very very nice...
I have no other option, this series is unreviewed and thus unlikely it will
be applied, still a panel PCB on my board needs power management support.
Hm I can ACK it I guess, but mergeing it into an unmaintained subsystem
is another issue, just not very optimal. 
+ Bartlomiej

Linus, your ack is always more than appreciated.
+1
quoted
To all appearance Bartlomiej is a new honoured framebuffer layer maintainer.

Bartlomiej, do you have the changes under discussion in your mailbox or
should I resend them to you directly for review?
No need for resend, I picked them from the list and they are on TODO.
Bartlomiej, Linus,

I've noticed that 4/4 requires special attention due to the anticipated
change of devm_get_gpiod_from_child() interface.

If you have any concerns regarding 4/4, please review and consider to
apply the first three clean-up patches in the series, basically I've
achieved my goal of describing a power supply for a panel in DTS by
introducing a DRM driver (see a note below), however support of
"enable-gpios" property mentioned in the "panel-dpi" device tree binding
documentation still is seen as beneficial for the CLCD fbdev driver.
Thanks, I queued patches #1-3 for 4.11.  Please ping me later for
merging patch #4.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help