devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/panel: simple: Add mode support to devicetree
@ 2018-02-06 16:56 Sean Paul
  2018-02-06 16:56 ` [PATCH 1/3] drm/panel: simple: Add ability to override typical timing Sean Paul
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Sean Paul @ 2018-02-06 16:56 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: Sean Paul, Doug Anderson, Heiko Stuebner, Jeffy Chen,
	Rob Herring, Stéphane Marchesin, Thierry Reding

Hey all,
Here's a set which allows us to add an "override" mode to the simple
panel dt node. The override mode can be used for devices for which the
typical display timing is not sufficient, yet the overriding mode should
not be applied across the entire platform. 

An example of this (and the motivation) is the Chromebook Plus (kevin).
If the sharp panel on this laptop is run at the mode advertised in the
datasheet (and what is currently in mainline), it creates interference
with the touch digitizer. To fix this, we need to run the pixel clock at
a slightly higher rate (which we can do by increasing the back porches).
This "fix" should not be used on other rockchip devices using this panel
since they might not encounter the same interference.

If an override mode is present, it will be checked against the panel's
display_timing range. When validated, it will be exposed as the
preferred mode along with the 'typical' modes generated from the panel's
display_timing.

This set is based on Linus' master to pick up the edp support in
rk3399-gru-kevin.dts.

Thanks,

Sean

Cc: Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Cc: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Stéphane Marchesin <marcheu-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org



Sean Paul (3):
  drm/panel: simple: Add ability to override typical timing
  drm/panel: simple: Use display_timing for lq123p1jx31
  arm64: dts: rockchip: Specify override mode for kevin panel

 .../bindings/display/panel/simple-panel.txt        | 20 +++++
 arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts  | 14 ++++
 drivers/gpu/drm/panel/panel-simple.c               | 96 ++++++++++++++++++----
 3 files changed, 115 insertions(+), 15 deletions(-)

-- 
2.16.0.rc1.238.g530d649a79-goog

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 1/3] drm/panel: simple: Add ability to override typical timing
  2018-02-06 16:56 [PATCH 0/3] drm/panel: simple: Add mode support to devicetree Sean Paul
@ 2018-02-06 16:56 ` Sean Paul
       [not found]   ` <20180206165626.37692-2-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
  2018-02-06 16:56 ` [PATCH 2/3] drm/panel: simple: Use display_timing for lq123p1jx31 Sean Paul
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Sean Paul @ 2018-02-06 16:56 UTC (permalink / raw)
  To: dri-devel, linux-rockchip, devicetree
  Cc: Thierry Reding, Mark Rutland, Jeffy Chen, Doug Anderson,
	Rob Herring, Stéphane Marchesin

This patch adds the ability to override the typical display timing for a
given panel. This is useful for devices which have timing constraints
that do not apply across the entire display driver (eg: to avoid
crosstalk between panel and digitizer on certain laptops). The rules are
as follows:

- panel must not specify fixed mode (since the override mode will
  either be the same as the fixed mode, or we'll be unable to
  check the bounds of the overried)
- panel must specify at least one display_timing range which will be
  used to ensure the override mode fits within its bounds

Cc: Doug Anderson <dianders@chromium.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Stéphane Marchesin <marcheu@chromium.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: devicetree@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 .../bindings/display/panel/simple-panel.txt        | 20 +++++++
 drivers/gpu/drm/panel/panel-simple.c               | 69 +++++++++++++++++++++-
 2 files changed, 88 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
index 16d8ff088b7d..590bbff6fc90 100644
--- a/Documentation/devicetree/bindings/display/panel/simple-panel.txt
+++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
@@ -7,6 +7,14 @@ Optional properties:
 - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
 - enable-gpios: GPIO pin to enable or disable the panel
 - backlight: phandle of the backlight device attached to the panel
+- override-mode: For devices which require a mode which differs from the
+		 display_timing's "typical" mode, and whose restrictions cannot
+		 be applied across the entire platform. The mode must fall
+		 within the bounds of the panel's specified display_timing, and
+		 cannot be used if the panel already specifies a single fixed
+		 mode. The format is specified under "timing subnode" in
+		 display-timing.txt
+
 
 Example:
 
@@ -18,4 +26,16 @@ Example:
 		enable-gpios = <&gpio 90 0>;
 
 		backlight = <&backlight>;
+
+		override-mode {
+			clock-frequency = <266604720>;
+			hactive = <2400>;
+			hfront-porch = <48>;
+			hback-porch = <84>;
+			hsync-len = <32>;
+			vactive = <1600>;
+			vfront-porch = <3>;
+			vback-porch = <120>;
+			vsync-len = <10>;
+		}
 	};
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 5591984a392b..b774365f3635 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -34,6 +34,7 @@
 #include <drm/drm_panel.h>
 
 #include <video/display_timing.h>
+#include <video/of_display_timing.h>
 #include <video/videomode.h>
 
 struct panel_desc {
@@ -87,6 +88,8 @@ struct panel_simple {
 	struct i2c_adapter *ddc;
 
 	struct gpio_desc *enable_gpio;
+
+	struct drm_display_mode override_mode;
 };
 
 static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
@@ -99,11 +102,22 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel)
 	struct drm_connector *connector = panel->base.connector;
 	struct drm_device *drm = panel->base.drm;
 	struct drm_display_mode *mode;
+	bool has_override = panel->override_mode.type;
 	unsigned int i, num = 0;
 
 	if (!panel->desc)
 		return 0;
 
+	if (has_override) {
+		mode = drm_mode_duplicate(drm, &panel->override_mode);
+		if (mode) {
+			drm_mode_probed_add(connector, mode);
+			num++;
+		} else {
+			dev_err(drm->dev, "failed to add override mode\n");
+		}
+	}
+
 	for (i = 0; i < panel->desc->num_timings; i++) {
 		const struct display_timing *dt = &panel->desc->timings[i];
 		struct videomode vm;
@@ -120,7 +134,7 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel)
 
 		mode->type |= DRM_MODE_TYPE_DRIVER;
 
-		if (panel->desc->num_timings == 1)
+		if (panel->desc->num_timings == 1 && !has_override)
 			mode->type |= DRM_MODE_TYPE_PREFERRED;
 
 		drm_mode_probed_add(connector, mode);
@@ -291,10 +305,58 @@ static const struct drm_panel_funcs panel_simple_funcs = {
 	.get_timings = panel_simple_get_timings,
 };
 
+#define PANEL_SIMPLE_BOUNDS_CHECK(to_check, bounds, field) \
+	(to_check->field.typ >= bounds->field.min && \
+	 to_check->field.typ <= bounds->field.max)
+static void panel_simple_add_override_mode(struct device *dev,
+					   struct panel_simple *panel,
+					   const struct display_timing *ot)
+{
+	const struct panel_desc *desc = panel->desc;
+	struct videomode vm;
+	int i;
+
+	if (desc->num_modes) {
+		dev_err(dev, "Reject override mode: panel has a fixed mode\n");
+		return;
+	}
+	if (!desc->num_timings) {
+		dev_err(dev, "Reject override mode: no timings specified\n");
+		return;
+	}
+
+	for (i = 0; i < panel->desc->num_timings; i++) {
+		const struct display_timing *dt = &panel->desc->timings[i];
+
+		if (!PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hactive) ||
+		    !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hfront_porch) ||
+		    !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hback_porch) ||
+		    !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hsync_len) ||
+		    !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vactive) ||
+		    !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vfront_porch) ||
+		    !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vback_porch) ||
+		    !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vsync_len))
+			continue;
+
+		if (ot->flags != dt->flags)
+			continue;
+
+		videomode_from_timing(ot, &vm);
+		drm_display_mode_from_videomode(&vm, &panel->override_mode);
+		panel->override_mode.type |= DRM_MODE_TYPE_DRIVER |
+					     DRM_MODE_TYPE_PREFERRED;
+		return;
+	}
+
+	dev_err(dev, "Reject override mode: No display_timing found\n");
+	return;
+}
+
 static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
 {
 	struct device_node *backlight, *ddc;
 	struct panel_simple *panel;
+	struct display_timing override_timing;
 	int err;
 
 	panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL);
@@ -338,6 +400,11 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
 		}
 	}
 
+	err = of_get_display_timing(dev->of_node, "override-mode",
+				    &override_timing);
+	if (!err)
+		panel_simple_add_override_mode(dev, panel, &override_timing);
+
 	drm_panel_init(&panel->base);
 	panel->base.dev = dev;
 	panel->base.funcs = &panel_simple_funcs;
-- 
2.16.0.rc1.238.g530d649a79-goog

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 2/3] drm/panel: simple: Use display_timing for lq123p1jx31
  2018-02-06 16:56 [PATCH 0/3] drm/panel: simple: Add mode support to devicetree Sean Paul
  2018-02-06 16:56 ` [PATCH 1/3] drm/panel: simple: Add ability to override typical timing Sean Paul
@ 2018-02-06 16:56 ` Sean Paul
  2018-02-06 16:56 ` [PATCH 3/3] arm64: dts: rockchip: Specify override mode for kevin panel Sean Paul
       [not found] ` <20180206165626.37692-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
  3 siblings, 0 replies; 11+ messages in thread
From: Sean Paul @ 2018-02-06 16:56 UTC (permalink / raw)
  To: dri-devel, linux-rockchip, devicetree
  Cc: Thierry Reding, Jeffy Chen, Doug Anderson, Rob Herring,
	Stéphane Marchesin

Convert the sharp lq123p1jx31 from using a fixed mode to specifying a
display timing with min/typ/max values. This allows us to capture the
timings set forth in the datasheet as well as the additional values that
we've cleared with the display vendor to avoid interference with the
digitizer on the Samsung Chromebook Plus (kevin).

A follow-on patch will specify the override mode for kevin devices.

Cc: Doug Anderson <dianders@chromium.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Stéphane Marchesin <marcheu@chromium.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: devicetree@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/panel/panel-simple.c | 27 +++++++++++++--------------
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index b774365f3635..2619b24d7e3b 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1808,23 +1808,22 @@ static const struct panel_desc sharp_lq101k1ly04 = {
 	.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
 };
 
-static const struct drm_display_mode sharp_lq123p1jx31_mode = {
-	.clock = 252750,
-	.hdisplay = 2400,
-	.hsync_start = 2400 + 48,
-	.hsync_end = 2400 + 48 + 32,
-	.htotal = 2400 + 48 + 32 + 80,
-	.vdisplay = 1600,
-	.vsync_start = 1600 + 3,
-	.vsync_end = 1600 + 3 + 10,
-	.vtotal = 1600 + 3 + 10 + 33,
-	.vrefresh = 60,
-	.flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+static const struct display_timing sharp_lq123p1jx31_timing = {
+	.pixelclock = { 252750000, 252750000, 266604720 },
+	.hactive = { 2400, 2400, 2400 },
+	.hfront_porch = { 48, 48, 48 },
+	.hback_porch = { 80, 80, 84 },
+	.hsync_len = { 32, 32, 32 },
+	.vactive = { 1600, 1600, 1600 },
+	.vfront_porch = { 3, 3, 3 },
+	.vback_porch = { 33, 33, 120 },
+	.vsync_len = { 10, 10, 10 },
+	.flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW,
 };
 
 static const struct panel_desc sharp_lq123p1jx31 = {
-	.modes = &sharp_lq123p1jx31_mode,
-	.num_modes = 1,
+	.timings = &sharp_lq123p1jx31_timing,
+	.num_timings = 1,
 	.bpc = 8,
 	.size = {
 		.width = 259,
-- 
2.16.0.rc1.238.g530d649a79-goog

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 3/3] arm64: dts: rockchip: Specify override mode for kevin panel
  2018-02-06 16:56 [PATCH 0/3] drm/panel: simple: Add mode support to devicetree Sean Paul
  2018-02-06 16:56 ` [PATCH 1/3] drm/panel: simple: Add ability to override typical timing Sean Paul
  2018-02-06 16:56 ` [PATCH 2/3] drm/panel: simple: Use display_timing for lq123p1jx31 Sean Paul
@ 2018-02-06 16:56 ` Sean Paul
       [not found] ` <20180206165626.37692-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
  3 siblings, 0 replies; 11+ messages in thread
From: Sean Paul @ 2018-02-06 16:56 UTC (permalink / raw)
  To: dri-devel, linux-rockchip, devicetree
  Cc: Thierry Reding, Mark Rutland, Brian Norris, Arnd Bergmann,
	Catalin Marinas, Jeffy Chen, Will Deacon, Doug Anderson,
	Rob Herring, Stéphane Marchesin, Dmitry Torokhov,
	Matthias Kaehlcke, linux-arm-kernel, Emil Renner Berthing

This patch adds an override mode for kevin devices. The mode increases
both back porches to allow a pixel clock of 26666kHz as opposed to the
'typical' value of 252750kHz. This is needed to avoid interference with
the touch digitizer on these laptops.

Cc: Doug Anderson <dianders@chromium.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Stéphane Marchesin <marcheu@chromium.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: devicetree@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
index 191a6bcb1704..24430e689bcf 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
@@ -98,6 +98,20 @@
 		backlight = <&backlight>;
 		power-supply = <&pp3300_disp>;
 
+		override-mode {
+			clock-frequency = <266604720>;
+			hactive = <2400>;
+			hfront-porch = <48>;
+			hback-porch = <84>;
+			hsync-len = <32>;
+			hsync-active = <0>;
+			vactive = <1600>;
+			vfront-porch = <3>;
+			vback-porch = <120>;
+			vsync-len = <10>;
+			vsync-active = <0>;
+		};
+
 		ports {
 			panel_in_edp: endpoint {
 				remote-endpoint = <&edp_out_panel>;
-- 
2.16.0.rc1.238.g530d649a79-goog

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/3] drm/panel: simple: Add ability to override typical timing
       [not found]   ` <20180206165626.37692-2-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
@ 2018-02-06 20:19     ` Rob Herring
  2018-02-06 21:48       ` Sean Paul
  2018-02-07  9:51       ` Thierry Reding
  0 siblings, 2 replies; 11+ messages in thread
From: Rob Herring @ 2018-02-06 20:19 UTC (permalink / raw)
  To: Sean Paul
  Cc: dri-devel, open list:ARM/Rockchip SoC...,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Doug Anderson, Heiko Stuebner,
	Jeffy Chen, Stéphane Marchesin, Thierry Reding,
	Mark Rutland

On Tue, Feb 6, 2018 at 10:56 AM, Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> wrote:
> This patch adds the ability to override the typical display timing for a
> given panel. This is useful for devices which have timing constraints
> that do not apply across the entire display driver (eg: to avoid
> crosstalk between panel and digitizer on certain laptops). The rules are
> as follows:
>
> - panel must not specify fixed mode (since the override mode will
>   either be the same as the fixed mode, or we'll be unable to
>   check the bounds of the overried)
> - panel must specify at least one display_timing range which will be
>   used to ensure the override mode fits within its bounds
>
> Cc: Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
> Cc: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Stéphane Marchesin <marcheu-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> Cc: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> Signed-off-by: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> ---
>  .../bindings/display/panel/simple-panel.txt        | 20 +++++++

The binding should be a separate patch.

>  drivers/gpu/drm/panel/panel-simple.c               | 69 +++++++++++++++++++++-
>  2 files changed, 88 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/display/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> index 16d8ff088b7d..590bbff6fc90 100644
> --- a/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> +++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> @@ -7,6 +7,14 @@ Optional properties:
>  - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
>  - enable-gpios: GPIO pin to enable or disable the panel
>  - backlight: phandle of the backlight device attached to the panel
> +- override-mode: For devices which require a mode which differs from the

This is not a property, but a node so it needs its own section.

Also, it's not real clear from display-timing.txt, but the modes
should be grouped under a display-timings node. Looks like we haven't
been good at enforcing that as "panel-timing" is also common when
there's a single mode. I'd rather not have another way. With a
standard node name, we can validate the node more easily.

We'd lose the fact that this is explicitly an override, but I'd doubt
Thierry is going to start letting in panels with no timings.

Finally, since this is an override, is it valid to only override the
parameters that need overriding? I don't really have an opinion either
way. It just needs to be explicitly documented.

> +                display_timing's "typical" mode, and whose restrictions cannot
> +                be applied across the entire platform. The mode must fall
> +                within the bounds of the panel's specified display_timing, and
> +                cannot be used if the panel already specifies a single fixed
> +                mode. The format is specified under "timing subnode" in
> +                display-timing.txt
> +
>
>  Example:
>
> @@ -18,4 +26,16 @@ Example:
>                 enable-gpios = <&gpio 90 0>;
>
>                 backlight = <&backlight>;
> +
> +               override-mode {
> +                       clock-frequency = <266604720>;
> +                       hactive = <2400>;
> +                       hfront-porch = <48>;
> +                       hback-porch = <84>;
> +                       hsync-len = <32>;
> +                       vactive = <1600>;
> +                       vfront-porch = <3>;
> +                       vback-porch = <120>;
> +                       vsync-len = <10>;
> +               }
>         };
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/3] drm/panel: simple: Add ability to override typical timing
  2018-02-06 20:19     ` Rob Herring
@ 2018-02-06 21:48       ` Sean Paul
  2018-02-07 17:41         ` Rob Herring
  2018-02-07  9:51       ` Thierry Reding
  1 sibling, 1 reply; 11+ messages in thread
From: Sean Paul @ 2018-02-06 21:48 UTC (permalink / raw)
  To: Rob Herring
  Cc: Sean Paul, dri-devel, open list:ARM/Rockchip SoC...,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Doug Anderson, Heiko Stuebner,
	Jeffy Chen, Stéphane Marchesin, Thierry Reding,
	Mark Rutland

On Tue, Feb 06, 2018 at 02:19:34PM -0600, Rob Herring wrote:
> On Tue, Feb 6, 2018 at 10:56 AM, Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> wrote:
> > This patch adds the ability to override the typical display timing for a
> > given panel. This is useful for devices which have timing constraints
> > that do not apply across the entire display driver (eg: to avoid
> > crosstalk between panel and digitizer on certain laptops). The rules are
> > as follows:
> >
> > - panel must not specify fixed mode (since the override mode will
> >   either be the same as the fixed mode, or we'll be unable to
> >   check the bounds of the overried)
> > - panel must specify at least one display_timing range which will be
> >   used to ensure the override mode fits within its bounds
> >
> > Cc: Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
> > Cc: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> > Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> > Cc: Stéphane Marchesin <marcheu-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > Cc: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> > Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> > Signed-off-by: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > ---
> >  .../bindings/display/panel/simple-panel.txt        | 20 +++++++
> 
> The binding should be a separate patch.
> 

Ack, will split.


> >  drivers/gpu/drm/panel/panel-simple.c               | 69 +++++++++++++++++++++-
> >  2 files changed, 88 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> > index 16d8ff088b7d..590bbff6fc90 100644
> > --- a/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> > +++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> > @@ -7,6 +7,14 @@ Optional properties:
> >  - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
> >  - enable-gpios: GPIO pin to enable or disable the panel
> >  - backlight: phandle of the backlight device attached to the panel
> > +- override-mode: For devices which require a mode which differs from the
> 
> This is not a property, but a node so it needs its own section.
> 
> Also, it's not real clear from display-timing.txt, but the modes
> should be grouped under a display-timings node. Looks like we haven't
> been good at enforcing that as "panel-timing" is also common when
> there's a single mode. I'd rather not have another way. With a
> standard node name, we can validate the node more easily.
> 
> We'd lose the fact that this is explicitly an override, but I'd doubt
> Thierry is going to start letting in panels with no timings.
> 

Yeah, I noticed that the timing subnode was specified as nestled in
display-timings. I figured since there can only be one override mode, and the
of_get_display_timing function was exported, it would be Ok to just reuse the
format of the subnode. I'll respin with the full thing.


> Finally, since this is an override, is it valid to only override the
> parameters that need overriding? I don't really have an opinion either
> way. It just needs to be explicitly documented.

I'll pimp the documentation. My gut reaction is to specify everything, since
this should be a very conscious decision, and having to fully specify the mode
seems like the right thing to do.

Thanks for your review!

Sean

> 
> > +                display_timing's "typical" mode, and whose restrictions cannot
> > +                be applied across the entire platform. The mode must fall
> > +                within the bounds of the panel's specified display_timing, and
> > +                cannot be used if the panel already specifies a single fixed
> > +                mode. The format is specified under "timing subnode" in
> > +                display-timing.txt
> > +
> >
> >  Example:
> >
> > @@ -18,4 +26,16 @@ Example:
> >                 enable-gpios = <&gpio 90 0>;
> >
> >                 backlight = <&backlight>;
> > +
> > +               override-mode {
> > +                       clock-frequency = <266604720>;
> > +                       hactive = <2400>;
> > +                       hfront-porch = <48>;
> > +                       hback-porch = <84>;
> > +                       hsync-len = <32>;
> > +                       vactive = <1600>;
> > +                       vfront-porch = <3>;
> > +                       vback-porch = <120>;
> > +                       vsync-len = <10>;
> > +               }
> >         };

-- 
Sean Paul, Software Engineer, Google / Chromium OS
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 0/3] drm/panel: simple: Add mode support to devicetree
       [not found] ` <20180206165626.37692-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
@ 2018-02-07  9:16   ` Eric Anholt
  2018-02-07 15:27     ` Sean Paul
  0 siblings, 1 reply; 11+ messages in thread
From: Eric Anholt @ 2018-02-07  9:16 UTC (permalink / raw)
  To: Sean Paul, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: Thierry Reding, Jeffy Chen, Doug Anderson, Rob Herring,
	Stéphane Marchesin

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> writes:

> Hey all,
> Here's a set which allows us to add an "override" mode to the simple
> panel dt node. The override mode can be used for devices for which the
> typical display timing is not sufficient, yet the overriding mode should
> not be applied across the entire platform. 
>
> An example of this (and the motivation) is the Chromebook Plus (kevin).
> If the sharp panel on this laptop is run at the mode advertised in the
> datasheet (and what is currently in mainline), it creates interference
> with the touch digitizer. To fix this, we need to run the pixel clock at
> a slightly higher rate (which we can do by increasing the back porches).
> This "fix" should not be used on other rockchip devices using this panel
> since they might not encounter the same interference.
>
> If an override mode is present, it will be checked against the panel's
> display_timing range. When validated, it will be exposed as the
> preferred mode along with the 'typical' modes generated from the panel's
> display_timing.
>
> This set is based on Linus' master to pick up the edp support in
> rk3399-gru-kevin.dts.

Couldn't you just add a different compatible string for the panel
driver, and use that to have a different mode exposed from the panel?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* Re: [PATCH 1/3] drm/panel: simple: Add ability to override typical timing
  2018-02-06 20:19     ` Rob Herring
  2018-02-06 21:48       ` Sean Paul
@ 2018-02-07  9:51       ` Thierry Reding
  1 sibling, 0 replies; 11+ messages in thread
From: Thierry Reding @ 2018-02-07  9:51 UTC (permalink / raw)
  To: Rob Herring
  Cc: Mark Rutland, devicetree, Jeffy Chen, Doug Anderson, dri-devel,
	open list:ARM/Rockchip SoC...,
	Stéphane Marchesin


[-- Attachment #1.1: Type: text/plain, Size: 4071 bytes --]

On Tue, Feb 06, 2018 at 02:19:34PM -0600, Rob Herring wrote:
> On Tue, Feb 6, 2018 at 10:56 AM, Sean Paul <seanpaul@chromium.org> wrote:
> > This patch adds the ability to override the typical display timing for a
> > given panel. This is useful for devices which have timing constraints
> > that do not apply across the entire display driver (eg: to avoid
> > crosstalk between panel and digitizer on certain laptops). The rules are
> > as follows:
> >
> > - panel must not specify fixed mode (since the override mode will
> >   either be the same as the fixed mode, or we'll be unable to
> >   check the bounds of the overried)
> > - panel must specify at least one display_timing range which will be
> >   used to ensure the override mode fits within its bounds
> >
> > Cc: Doug Anderson <dianders@chromium.org>
> > Cc: Heiko Stuebner <heiko@sntech.de>
> > Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: Stéphane Marchesin <marcheu@chromium.org>
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: devicetree@vger.kernel.org
> > Cc: dri-devel@lists.freedesktop.org
> > Cc: linux-rockchip@lists.infradead.org
> > Signed-off-by: Sean Paul <seanpaul@chromium.org>
> > ---
> >  .../bindings/display/panel/simple-panel.txt        | 20 +++++++
> 
> The binding should be a separate patch.
> 
> >  drivers/gpu/drm/panel/panel-simple.c               | 69 +++++++++++++++++++++-
> >  2 files changed, 88 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> > index 16d8ff088b7d..590bbff6fc90 100644
> > --- a/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> > +++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> > @@ -7,6 +7,14 @@ Optional properties:
> >  - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
> >  - enable-gpios: GPIO pin to enable or disable the panel
> >  - backlight: phandle of the backlight device attached to the panel
> > +- override-mode: For devices which require a mode which differs from the
> 
> This is not a property, but a node so it needs its own section.
> 
> Also, it's not real clear from display-timing.txt, but the modes
> should be grouped under a display-timings node. Looks like we haven't
> been good at enforcing that as "panel-timing" is also common when
> there's a single mode. I'd rather not have another way. With a
> standard node name, we can validate the node more easily.
> 
> We'd lose the fact that this is explicitly an override, but I'd doubt
> Thierry is going to start letting in panels with no timings.

I was actually going to suggest the same change. I don't mind if the
name isn't explicit about this being an override. The important thing is
that we document this as being an override.

> Finally, since this is an override, is it valid to only override the
> parameters that need overriding? I don't really have an opinion either
> way. It just needs to be explicitly documented.

I've thought about that, but I think that'd be putting too much of a
burden on the panel drivers and/or display drivers. In the simplest case
it may be sufficient to restrict the pixel clock, in which case it would
be fairly easy for the driver to adjust the other parameters.

But what if you also need to restrict the porches. At some point it'll
become very difficult for the driver to automatically determine which of
the other parameters to adjust and how. Chances are that whoever needs
to deal with the restrictions already knows how to adjust the parameters
to fixup the mode.

I think this gives us a nice balance of simplicity when people don't
care (they'd just use the typical timings) and flexibility when they do
(adjust the mode to take into account display driver restrictions and
completely specify the mode if the restrictions are too complicated for
code to realistically apply them).

Thierry

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 0/3] drm/panel: simple: Add mode support to devicetree
  2018-02-07  9:16   ` [PATCH 0/3] drm/panel: simple: Add mode support to devicetree Eric Anholt
@ 2018-02-07 15:27     ` Sean Paul
  0 siblings, 0 replies; 11+ messages in thread
From: Sean Paul @ 2018-02-07 15:27 UTC (permalink / raw)
  To: Eric Anholt
  Cc: devicetree, Rob Herring, Jeffy Chen, Doug Anderson, dri-devel,
	linux-rockchip, Thierry Reding, Stéphane Marchesin

On Wed, Feb 07, 2018 at 09:16:22AM +0000, Eric Anholt wrote:
> Sean Paul <seanpaul@chromium.org> writes:
> 
> > Hey all,
> > Here's a set which allows us to add an "override" mode to the simple
> > panel dt node. The override mode can be used for devices for which the
> > typical display timing is not sufficient, yet the overriding mode should
> > not be applied across the entire platform. 
> >
> > An example of this (and the motivation) is the Chromebook Plus (kevin).
> > If the sharp panel on this laptop is run at the mode advertised in the
> > datasheet (and what is currently in mainline), it creates interference
> > with the touch digitizer. To fix this, we need to run the pixel clock at
> > a slightly higher rate (which we can do by increasing the back porches).
> > This "fix" should not be used on other rockchip devices using this panel
> > since they might not encounter the same interference.
> >
> > If an override mode is present, it will be checked against the panel's
> > display_timing range. When validated, it will be exposed as the
> > preferred mode along with the 'typical' modes generated from the panel's
> > display_timing.
> >
> > This set is based on Linus' master to pick up the edp support in
> > rk3399-gru-kevin.dts.
> 
> Couldn't you just add a different compatible string for the panel
> driver, and use that to have a different mode exposed from the panel?

Yep, there's a couple ways to skin this cat. We could just change the mode to
what the kevin device needs since it's the only one that uses this panel atm
(that's what the original patch in the context link does). We could also expose
multiple modes for the panel and let userspace sort it out.

That said, we already have timing ranges in panel-simple and the goal is to
leverage those such that we don't need additional compatible panels/extra modes.

Sean

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/3] drm/panel: simple: Add ability to override typical timing
  2018-02-06 21:48       ` Sean Paul
@ 2018-02-07 17:41         ` Rob Herring
       [not found]           ` <CAL_JsqJDvPN3CtKtj980egDRuC-ZjiKOAWe5ECYVBSv4hVOnYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Rob Herring @ 2018-02-07 17:41 UTC (permalink / raw)
  To: Sean Paul
  Cc: dri-devel, open list:ARM/Rockchip SoC...,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Doug Anderson, Heiko Stuebner,
	Jeffy Chen, Stéphane Marchesin, Thierry Reding,
	Mark Rutland

On Tue, Feb 6, 2018 at 3:48 PM, Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> wrote:
> On Tue, Feb 06, 2018 at 02:19:34PM -0600, Rob Herring wrote:
>> On Tue, Feb 6, 2018 at 10:56 AM, Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> wrote:
>> > This patch adds the ability to override the typical display timing for a
>> > given panel. This is useful for devices which have timing constraints
>> > that do not apply across the entire display driver (eg: to avoid
>> > crosstalk between panel and digitizer on certain laptops). The rules are
>> > as follows:
>> >
>> > - panel must not specify fixed mode (since the override mode will
>> >   either be the same as the fixed mode, or we'll be unable to
>> >   check the bounds of the overried)
>> > - panel must specify at least one display_timing range which will be
>> >   used to ensure the override mode fits within its bounds
>> >
>> > Cc: Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>> > Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
>> > Cc: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>> > Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
>> > Cc: Stéphane Marchesin <marcheu-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>> > Cc: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> > Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> > Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
>> > Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
>> > Signed-off-by: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>> > ---
>> >  .../bindings/display/panel/simple-panel.txt        | 20 +++++++
>>
>> The binding should be a separate patch.
>>
>
> Ack, will split.
>
>
>> >  drivers/gpu/drm/panel/panel-simple.c               | 69 +++++++++++++++++++++-
>> >  2 files changed, 88 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/Documentation/devicetree/bindings/display/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
>> > index 16d8ff088b7d..590bbff6fc90 100644
>> > --- a/Documentation/devicetree/bindings/display/panel/simple-panel.txt
>> > +++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
>> > @@ -7,6 +7,14 @@ Optional properties:
>> >  - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
>> >  - enable-gpios: GPIO pin to enable or disable the panel
>> >  - backlight: phandle of the backlight device attached to the panel
>> > +- override-mode: For devices which require a mode which differs from the
>>
>> This is not a property, but a node so it needs its own section.
>>
>> Also, it's not real clear from display-timing.txt, but the modes
>> should be grouped under a display-timings node. Looks like we haven't
>> been good at enforcing that as "panel-timing" is also common when
>> there's a single mode. I'd rather not have another way. With a
>> standard node name, we can validate the node more easily.
>>
>> We'd lose the fact that this is explicitly an override, but I'd doubt
>> Thierry is going to start letting in panels with no timings.
>>
>
> Yeah, I noticed that the timing subnode was specified as nestled in
> display-timings. I figured since there can only be one override mode, and the
> of_get_display_timing function was exported, it would be Ok to just reuse the
> format of the subnode. I'll respin with the full thing.

TBC, I'm fine if you use panel-timing as that's already established
for cases were only 1 mode exists.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/3] drm/panel: simple: Add ability to override typical timing
       [not found]           ` <CAL_JsqJDvPN3CtKtj980egDRuC-ZjiKOAWe5ECYVBSv4hVOnYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2018-02-07 19:27             ` Sean Paul
  0 siblings, 0 replies; 11+ messages in thread
From: Sean Paul @ 2018-02-07 19:27 UTC (permalink / raw)
  To: Rob Herring
  Cc: Sean Paul, dri-devel, open list:ARM/Rockchip SoC...,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Doug Anderson, Heiko Stuebner,
	Jeffy Chen, Stéphane Marchesin, Thierry Reding,
	Mark Rutland

On Wed, Feb 07, 2018 at 11:41:49AM -0600, Rob Herring wrote:
> On Tue, Feb 6, 2018 at 3:48 PM, Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> wrote:
> > On Tue, Feb 06, 2018 at 02:19:34PM -0600, Rob Herring wrote:
> >> On Tue, Feb 6, 2018 at 10:56 AM, Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> wrote:
> >> > This patch adds the ability to override the typical display timing for a
> >> > given panel. This is useful for devices which have timing constraints
> >> > that do not apply across the entire display driver (eg: to avoid
> >> > crosstalk between panel and digitizer on certain laptops). The rules are
> >> > as follows:
> >> >
> >> > - panel must not specify fixed mode (since the override mode will
> >> >   either be the same as the fixed mode, or we'll be unable to
> >> >   check the bounds of the overried)
> >> > - panel must specify at least one display_timing range which will be
> >> >   used to ensure the override mode fits within its bounds
> >> >
> >> > Cc: Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> >> > Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
> >> > Cc: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> >> > Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> >> > Cc: Stéphane Marchesin <marcheu-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> >> > Cc: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> >> > Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> >> > Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> >> > Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> >> > Signed-off-by: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> >> > ---
> >> >  .../bindings/display/panel/simple-panel.txt        | 20 +++++++
> >>
> >> The binding should be a separate patch.
> >>
> >
> > Ack, will split.
> >
> >
> >> >  drivers/gpu/drm/panel/panel-simple.c               | 69 +++++++++++++++++++++-
> >> >  2 files changed, 88 insertions(+), 1 deletion(-)
> >> >
> >> > diff --git a/Documentation/devicetree/bindings/display/panel/simple-panel.txt b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> >> > index 16d8ff088b7d..590bbff6fc90 100644
> >> > --- a/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> >> > +++ b/Documentation/devicetree/bindings/display/panel/simple-panel.txt
> >> > @@ -7,6 +7,14 @@ Optional properties:
> >> >  - ddc-i2c-bus: phandle of an I2C controller used for DDC EDID probing
> >> >  - enable-gpios: GPIO pin to enable or disable the panel
> >> >  - backlight: phandle of the backlight device attached to the panel
> >> > +- override-mode: For devices which require a mode which differs from the
> >>
> >> This is not a property, but a node so it needs its own section.
> >>
> >> Also, it's not real clear from display-timing.txt, but the modes
> >> should be grouped under a display-timings node. Looks like we haven't
> >> been good at enforcing that as "panel-timing" is also common when
> >> there's a single mode. I'd rather not have another way. With a
> >> standard node name, we can validate the node more easily.
> >>
> >> We'd lose the fact that this is explicitly an override, but I'd doubt
> >> Thierry is going to start letting in panels with no timings.
> >>
> >
> > Yeah, I noticed that the timing subnode was specified as nestled in
> > display-timings. I figured since there can only be one override mode, and the
> > of_get_display_timing function was exported, it would be Ok to just reuse the
> > format of the subnode. I'll respin with the full thing.
> 
> TBC, I'm fine if you use panel-timing as that's already established
> for cases were only 1 mode exists.

Ah! So the dt change you were asking for was just s/override-mode/panel-timing/.
I'll respin a v3 with the improved documentation and reinstate the "panel-timing"
subnode.

Sean

> 
> Rob

-- 
Sean Paul, Software Engineer, Google / Chromium OS
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2018-02-07 19:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-06 16:56 [PATCH 0/3] drm/panel: simple: Add mode support to devicetree Sean Paul
2018-02-06 16:56 ` [PATCH 1/3] drm/panel: simple: Add ability to override typical timing Sean Paul
     [not found]   ` <20180206165626.37692-2-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-02-06 20:19     ` Rob Herring
2018-02-06 21:48       ` Sean Paul
2018-02-07 17:41         ` Rob Herring
     [not found]           ` <CAL_JsqJDvPN3CtKtj980egDRuC-ZjiKOAWe5ECYVBSv4hVOnYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-07 19:27             ` Sean Paul
2018-02-07  9:51       ` Thierry Reding
2018-02-06 16:56 ` [PATCH 2/3] drm/panel: simple: Use display_timing for lq123p1jx31 Sean Paul
2018-02-06 16:56 ` [PATCH 3/3] arm64: dts: rockchip: Specify override mode for kevin panel Sean Paul
     [not found] ` <20180206165626.37692-1-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2018-02-07  9:16   ` [PATCH 0/3] drm/panel: simple: Add mode support to devicetree Eric Anholt
2018-02-07 15:27     ` Sean Paul

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