All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] video: of: Drive edge selection for sync
@ 2016-09-22 10:35 ` Peter Ujfalusi
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Ujfalusi @ 2016-09-22 10:35 UTC (permalink / raw)
  To: robh+dt, plagnioj, tomi.valkeinen, airlied, thierry.reding
  Cc: linux-fbdev, linux-kernel, daniel.vetter, dri-devel, devicetree

Hi,

Changes since v1:
- separated the code changes from the omap/drm videomode conversion patches
- the DT bindings document is now explicitly states that the drive edge is
  referring to the pixel clock

Since we have several panels under omapdrm/displays/ where the data drive edge
is set to be different then the sync drive edge, the first three patch will add
support to select the sync drive edge via DT.
I was not able to locate the datasheet for all the panels and because the
different edge was used in omapdrm and omapfb for a long time without complains
from users - and they were written this way - I think it is a valid that we can
have panels requiring different edge for data and sync to be driven.

This series will add support for the sync drive edge setting and the omapdrm's
videmode conversion series depends on this change. It is also planned that the
omapdrm is going to move to use the drm/panel in the future and to be able to
convert the panel drivers we will need this feature.

Regards,
Peter
---
Peter Ujfalusi (3):
  dt-bindings: display: display-timing: Add property to configure sync
    drive edge
  video: display_timing: Add flags to select the edge when the sync is
    driven
  video: of: display_timing: Add support for syncclk-active property

 .../devicetree/bindings/display/panel/display-timing.txt         | 8 ++++++++
 drivers/video/of_display_timing.c                                | 9 +++++++++
 include/video/display_timing.h                                   | 4 ++++
 3 files changed, 21 insertions(+)

--
2.10.0

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

* [PATCH v2 0/3] video: of: Drive edge selection for sync
@ 2016-09-22 10:35 ` Peter Ujfalusi
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Ujfalusi @ 2016-09-22 10:35 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, plagnioj-sclMFOaUSTBWk0Htik3J/w,
	tomi.valkeinen-l0cyMroinI0, airlied-cv59FeDIM0c,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, daniel.vetter-/w4YWyX8dFk,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi,

Changes since v1:
- separated the code changes from the omap/drm videomode conversion patches
- the DT bindings document is now explicitly states that the drive edge is
  referring to the pixel clock

Since we have several panels under omapdrm/displays/ where the data drive edge
is set to be different then the sync drive edge, the first three patch will add
support to select the sync drive edge via DT.
I was not able to locate the datasheet for all the panels and because the
different edge was used in omapdrm and omapfb for a long time without complains
from users - and they were written this way - I think it is a valid that we can
have panels requiring different edge for data and sync to be driven.

This series will add support for the sync drive edge setting and the omapdrm's
videmode conversion series depends on this change. It is also planned that the
omapdrm is going to move to use the drm/panel in the future and to be able to
convert the panel drivers we will need this feature.

Regards,
Peter
---
Peter Ujfalusi (3):
  dt-bindings: display: display-timing: Add property to configure sync
    drive edge
  video: display_timing: Add flags to select the edge when the sync is
    driven
  video: of: display_timing: Add support for syncclk-active property

 .../devicetree/bindings/display/panel/display-timing.txt         | 8 ++++++++
 drivers/video/of_display_timing.c                                | 9 +++++++++
 include/video/display_timing.h                                   | 4 ++++
 3 files changed, 21 insertions(+)

--
2.10.0

--
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] 24+ messages in thread

* [PATCH v2 0/3] video: of: Drive edge selection for sync
@ 2016-09-22 10:35 ` Peter Ujfalusi
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Ujfalusi @ 2016-09-22 10:35 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, plagnioj-sclMFOaUSTBWk0Htik3J/w,
	tomi.valkeinen-l0cyMroinI0, airlied-cv59FeDIM0c,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, daniel.vetter-/w4YWyX8dFk,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi,

Changes since v1:
- separated the code changes from the omap/drm videomode conversion patches
- the DT bindings document is now explicitly states that the drive edge is
  referring to the pixel clock

Since we have several panels under omapdrm/displays/ where the data drive edge
is set to be different then the sync drive edge, the first three patch will add
support to select the sync drive edge via DT.
I was not able to locate the datasheet for all the panels and because the
different edge was used in omapdrm and omapfb for a long time without complains
from users - and they were written this way - I think it is a valid that we can
have panels requiring different edge for data and sync to be driven.

This series will add support for the sync drive edge setting and the omapdrm's
videmode conversion series depends on this change. It is also planned that the
omapdrm is going to move to use the drm/panel in the future and to be able to
convert the panel drivers we will need this feature.

Regards,
Peter
---
Peter Ujfalusi (3):
  dt-bindings: display: display-timing: Add property to configure sync
    drive edge
  video: display_timing: Add flags to select the edge when the sync is
    driven
  video: of: display_timing: Add support for syncclk-active property

 .../devicetree/bindings/display/panel/display-timing.txt         | 8 ++++++++
 drivers/video/of_display_timing.c                                | 9 +++++++++
 include/video/display_timing.h                                   | 4 ++++
 3 files changed, 21 insertions(+)

--
2.10.0


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

* [PATCH v2 1/3] dt-bindings: display: display-timing: Add property to configure sync drive edge
@ 2016-09-22 10:35   ` Peter Ujfalusi
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Ujfalusi @ 2016-09-22 10:35 UTC (permalink / raw)
  To: robh+dt, plagnioj, tomi.valkeinen, airlied, thierry.reding
  Cc: linux-fbdev, linux-kernel, daniel.vetter, dri-devel, devicetree

There are display panels which demands that the sync signal is driven on
different edge than the pixel data.
With the syncclk-active property we can specify the clk edge to be used to
drive the sync signal. When the property is missing it indicates that the
sync is driven on the same edge as the pixel data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: devicetree@vger.kernel.org
---
 .../devicetree/bindings/display/panel/display-timing.txt          | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/display-timing.txt b/Documentation/devicetree/bindings/display/panel/display-timing.txt
index e1d4a0b59612..81a75893d1b8 100644
--- a/Documentation/devicetree/bindings/display/panel/display-timing.txt
+++ b/Documentation/devicetree/bindings/display/panel/display-timing.txt
@@ -32,6 +32,14 @@ optional properties:
 			- active low  = drive pixel data on falling edge/
 					sample data on rising edge
 			- ignored     = ignored
+ - syncclk-active: with
+			- active high = drive sync on rising edge/
+					sample sync on falling edge of pixel
+					clock
+			- active low  = drive sync on falling edge/
+					sample sync on rising edge of pixel
+					clock
+			- omitted     = same configuration as pixelclk-active
  - interlaced (bool): boolean to enable interlaced mode
  - doublescan (bool): boolean to enable doublescan mode
  - doubleclk (bool): boolean to enable doubleclock mode
-- 
2.10.0

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

* [PATCH v2 1/3] dt-bindings: display: display-timing: Add property to configure sync drive edge
@ 2016-09-22 10:35   ` Peter Ujfalusi
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Ujfalusi @ 2016-09-22 10:35 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, plagnioj-sclMFOaUSTBWk0Htik3J/w,
	tomi.valkeinen-l0cyMroinI0, airlied-cv59FeDIM0c,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, daniel.vetter-/w4YWyX8dFk,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA

There are display panels which demands that the sync signal is driven on
different edge than the pixel data.
With the syncclk-active property we can specify the clk edge to be used to
drive the sync signal. When the property is missing it indicates that the
sync is driven on the same edge as the pixel data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi-l0cyMroinI0@public.gmane.org>
CC: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
CC: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
CC: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
 .../devicetree/bindings/display/panel/display-timing.txt          | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/display-timing.txt b/Documentation/devicetree/bindings/display/panel/display-timing.txt
index e1d4a0b59612..81a75893d1b8 100644
--- a/Documentation/devicetree/bindings/display/panel/display-timing.txt
+++ b/Documentation/devicetree/bindings/display/panel/display-timing.txt
@@ -32,6 +32,14 @@ optional properties:
 			- active low  = drive pixel data on falling edge/
 					sample data on rising edge
 			- ignored     = ignored
+ - syncclk-active: with
+			- active high = drive sync on rising edge/
+					sample sync on falling edge of pixel
+					clock
+			- active low  = drive sync on falling edge/
+					sample sync on rising edge of pixel
+					clock
+			- omitted     = same configuration as pixelclk-active
  - interlaced (bool): boolean to enable interlaced mode
  - doublescan (bool): boolean to enable doublescan mode
  - doubleclk (bool): boolean to enable doubleclock mode
-- 
2.10.0

--
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 related	[flat|nested] 24+ messages in thread

* [PATCH v2 1/3] dt-bindings: display: display-timing: Add property to configure sync drive edge
@ 2016-09-22 10:35   ` Peter Ujfalusi
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Ujfalusi @ 2016-09-22 10:35 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, plagnioj-sclMFOaUSTBWk0Htik3J/w,
	tomi.valkeinen-l0cyMroinI0, airlied-cv59FeDIM0c,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, daniel.vetter-/w4YWyX8dFk,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA

There are display panels which demands that the sync signal is driven on
different edge than the pixel data.
With the syncclk-active property we can specify the clk edge to be used to
drive the sync signal. When the property is missing it indicates that the
sync is driven on the same edge as the pixel data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: devicetree@vger.kernel.org
---
 .../devicetree/bindings/display/panel/display-timing.txt          | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/panel/display-timing.txt b/Documentation/devicetree/bindings/display/panel/display-timing.txt
index e1d4a0b59612..81a75893d1b8 100644
--- a/Documentation/devicetree/bindings/display/panel/display-timing.txt
+++ b/Documentation/devicetree/bindings/display/panel/display-timing.txt
@@ -32,6 +32,14 @@ optional properties:
 			- active low  = drive pixel data on falling edge/
 					sample data on rising edge
 			- ignored     = ignored
+ - syncclk-active: with
+			- active high = drive sync on rising edge/
+					sample sync on falling edge of pixel
+					clock
+			- active low  = drive sync on falling edge/
+					sample sync on rising edge of pixel
+					clock
+			- omitted     = same configuration as pixelclk-active
  - interlaced (bool): boolean to enable interlaced mode
  - doublescan (bool): boolean to enable doublescan mode
  - doubleclk (bool): boolean to enable doubleclock mode
-- 
2.10.0


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

* [PATCH v2 2/3] video: display_timing: Add flags to select the edge when the sync is driven
  2016-09-22 10:35 ` Peter Ujfalusi
  (?)
@ 2016-09-22 10:35   ` Peter Ujfalusi
  -1 siblings, 0 replies; 24+ messages in thread
From: Peter Ujfalusi @ 2016-09-22 10:35 UTC (permalink / raw)
  To: robh+dt, plagnioj, tomi.valkeinen, airlied, thierry.reding
  Cc: linux-fbdev, linux-kernel, daniel.vetter, dri-devel, devicetree

The sync can be - and for some panels it must be - driven on different edge
then the data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: devicetree@vger.kernel.org
---
 include/video/display_timing.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/video/display_timing.h b/include/video/display_timing.h
index 28d9d0d566ca..3d289e990aca 100644
--- a/include/video/display_timing.h
+++ b/include/video/display_timing.h
@@ -28,6 +28,10 @@ enum display_flags {
 	DISPLAY_FLAGS_INTERLACED	= BIT(8),
 	DISPLAY_FLAGS_DOUBLESCAN	= BIT(9),
 	DISPLAY_FLAGS_DOUBLECLK		= BIT(10),
+	/* drive sync on pos. edge */
+	DISPLAY_FLAGS_SYNC_POSEDGE	= BIT(11),
+	/* drive sync on neg. edge */
+	DISPLAY_FLAGS_SYNC_NEGEDGE	= BIT(12),
 };
 
 /*
-- 
2.10.0

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

* [PATCH v2 2/3] video: display_timing: Add flags to select the edge when the sync is driven
@ 2016-09-22 10:35   ` Peter Ujfalusi
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Ujfalusi @ 2016-09-22 10:35 UTC (permalink / raw)
  To: robh+dt, plagnioj, tomi.valkeinen, airlied, thierry.reding
  Cc: linux-fbdev, linux-kernel, daniel.vetter, dri-devel, devicetree

The sync can be - and for some panels it must be - driven on different edge
then the data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: devicetree@vger.kernel.org
---
 include/video/display_timing.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/video/display_timing.h b/include/video/display_timing.h
index 28d9d0d566ca..3d289e990aca 100644
--- a/include/video/display_timing.h
+++ b/include/video/display_timing.h
@@ -28,6 +28,10 @@ enum display_flags {
 	DISPLAY_FLAGS_INTERLACED	= BIT(8),
 	DISPLAY_FLAGS_DOUBLESCAN	= BIT(9),
 	DISPLAY_FLAGS_DOUBLECLK		= BIT(10),
+	/* drive sync on pos. edge */
+	DISPLAY_FLAGS_SYNC_POSEDGE	= BIT(11),
+	/* drive sync on neg. edge */
+	DISPLAY_FLAGS_SYNC_NEGEDGE	= BIT(12),
 };
 
 /*
-- 
2.10.0

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

* [PATCH v2 2/3] video: display_timing: Add flags to select the edge when the sync is driven
@ 2016-09-22 10:35   ` Peter Ujfalusi
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Ujfalusi @ 2016-09-22 10:35 UTC (permalink / raw)
  To: robh+dt, plagnioj, tomi.valkeinen, airlied, thierry.reding
  Cc: linux-fbdev, linux-kernel, daniel.vetter, dri-devel, devicetree

The sync can be - and for some panels it must be - driven on different edge
then the data.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: devicetree@vger.kernel.org
---
 include/video/display_timing.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/video/display_timing.h b/include/video/display_timing.h
index 28d9d0d566ca..3d289e990aca 100644
--- a/include/video/display_timing.h
+++ b/include/video/display_timing.h
@@ -28,6 +28,10 @@ enum display_flags {
 	DISPLAY_FLAGS_INTERLACED	= BIT(8),
 	DISPLAY_FLAGS_DOUBLESCAN	= BIT(9),
 	DISPLAY_FLAGS_DOUBLECLK		= BIT(10),
+	/* drive sync on pos. edge */
+	DISPLAY_FLAGS_SYNC_POSEDGE	= BIT(11),
+	/* drive sync on neg. edge */
+	DISPLAY_FLAGS_SYNC_NEGEDGE	= BIT(12),
 };
 
 /*
-- 
2.10.0


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

* [PATCH v2 3/3] video: of: display_timing: Add support for syncclk-active property
@ 2016-09-22 10:35   ` Peter Ujfalusi
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Ujfalusi @ 2016-09-22 10:35 UTC (permalink / raw)
  To: robh+dt, plagnioj, tomi.valkeinen, airlied, thierry.reding
  Cc: linux-fbdev, linux-kernel, daniel.vetter, dri-devel, devicetree

Configure the DISPLAY_FLAGS_SYNC_POSEDGE/NEGEDGE flags according to the
binding document.
If the syncclk-active is present in DT, configure the flags accordingly, if
it is omitted it means that the SYNC edge is following the pixdata
configuration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: devicetree@vger.kernel.org
---
 drivers/video/of_display_timing.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index 8a1076beecd3..db992c684f09 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -88,6 +88,15 @@ static int of_parse_display_timing(const struct device_node *np,
 		dt->flags |= val ? DISPLAY_FLAGS_PIXDATA_POSEDGE :
 				DISPLAY_FLAGS_PIXDATA_NEGEDGE;
 
+	if (!of_property_read_u32(np, "syncclk-active", &val))
+		dt->flags |= val ? DISPLAY_FLAGS_SYNC_POSEDGE :
+				DISPLAY_FLAGS_SYNC_NEGEDGE;
+	else if (dt->flags & (DISPLAY_FLAGS_PIXDATA_POSEDGE |
+			      DISPLAY_FLAGS_PIXDATA_NEGEDGE))
+		dt->flags |= dt->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE ?
+				DISPLAY_FLAGS_SYNC_POSEDGE :
+				DISPLAY_FLAGS_SYNC_NEGEDGE;
+
 	if (of_property_read_bool(np, "interlaced"))
 		dt->flags |= DISPLAY_FLAGS_INTERLACED;
 	if (of_property_read_bool(np, "doublescan"))
-- 
2.10.0

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

* [PATCH v2 3/3] video: of: display_timing: Add support for syncclk-active property
@ 2016-09-22 10:35   ` Peter Ujfalusi
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Ujfalusi @ 2016-09-22 10:35 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, plagnioj-sclMFOaUSTBWk0Htik3J/w,
	tomi.valkeinen-l0cyMroinI0, airlied-cv59FeDIM0c,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, daniel.vetter-/w4YWyX8dFk,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Configure the DISPLAY_FLAGS_SYNC_POSEDGE/NEGEDGE flags according to the
binding document.
If the syncclk-active is present in DT, configure the flags accordingly, if
it is omitted it means that the SYNC edge is following the pixdata
configuration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi-l0cyMroinI0@public.gmane.org>
CC: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
CC: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
CC: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
 drivers/video/of_display_timing.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index 8a1076beecd3..db992c684f09 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -88,6 +88,15 @@ static int of_parse_display_timing(const struct device_node *np,
 		dt->flags |= val ? DISPLAY_FLAGS_PIXDATA_POSEDGE :
 				DISPLAY_FLAGS_PIXDATA_NEGEDGE;
 
+	if (!of_property_read_u32(np, "syncclk-active", &val))
+		dt->flags |= val ? DISPLAY_FLAGS_SYNC_POSEDGE :
+				DISPLAY_FLAGS_SYNC_NEGEDGE;
+	else if (dt->flags & (DISPLAY_FLAGS_PIXDATA_POSEDGE |
+			      DISPLAY_FLAGS_PIXDATA_NEGEDGE))
+		dt->flags |= dt->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE ?
+				DISPLAY_FLAGS_SYNC_POSEDGE :
+				DISPLAY_FLAGS_SYNC_NEGEDGE;
+
 	if (of_property_read_bool(np, "interlaced"))
 		dt->flags |= DISPLAY_FLAGS_INTERLACED;
 	if (of_property_read_bool(np, "doublescan"))
-- 
2.10.0

--
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 related	[flat|nested] 24+ messages in thread

* [PATCH v2 3/3] video: of: display_timing: Add support for syncclk-active property
@ 2016-09-22 10:35   ` Peter Ujfalusi
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Ujfalusi @ 2016-09-22 10:35 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, plagnioj-sclMFOaUSTBWk0Htik3J/w,
	tomi.valkeinen-l0cyMroinI0, airlied-cv59FeDIM0c,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, daniel.vetter-/w4YWyX8dFk,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Configure the DISPLAY_FLAGS_SYNC_POSEDGE/NEGEDGE flags according to the
binding document.
If the syncclk-active is present in DT, configure the flags accordingly, if
it is omitted it means that the SYNC edge is following the pixdata
configuration.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Rob Herring <robh+dt@kernel.org>
CC: Mark Rutland <mark.rutland@arm.com>
CC: devicetree@vger.kernel.org
---
 drivers/video/of_display_timing.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
index 8a1076beecd3..db992c684f09 100644
--- a/drivers/video/of_display_timing.c
+++ b/drivers/video/of_display_timing.c
@@ -88,6 +88,15 @@ static int of_parse_display_timing(const struct device_node *np,
 		dt->flags |= val ? DISPLAY_FLAGS_PIXDATA_POSEDGE :
 				DISPLAY_FLAGS_PIXDATA_NEGEDGE;
 
+	if (!of_property_read_u32(np, "syncclk-active", &val))
+		dt->flags |= val ? DISPLAY_FLAGS_SYNC_POSEDGE :
+				DISPLAY_FLAGS_SYNC_NEGEDGE;
+	else if (dt->flags & (DISPLAY_FLAGS_PIXDATA_POSEDGE |
+			      DISPLAY_FLAGS_PIXDATA_NEGEDGE))
+		dt->flags |= dt->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE ?
+				DISPLAY_FLAGS_SYNC_POSEDGE :
+				DISPLAY_FLAGS_SYNC_NEGEDGE;
+
 	if (of_property_read_bool(np, "interlaced"))
 		dt->flags |= DISPLAY_FLAGS_INTERLACED;
 	if (of_property_read_bool(np, "doublescan"))
-- 
2.10.0


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

* Re: [PATCH v2 1/3] dt-bindings: display: display-timing: Add property to configure sync drive edge
@ 2016-09-23 20:01     ` Rob Herring
  0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2016-09-23 20:01 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: plagnioj, tomi.valkeinen, airlied, thierry.reding, linux-fbdev,
	linux-kernel, daniel.vetter, dri-devel, devicetree

On Thu, Sep 22, 2016 at 01:35:24PM +0300, Peter Ujfalusi wrote:
> There are display panels which demands that the sync signal is driven on
> different edge than the pixel data.
> With the syncclk-active property we can specify the clk edge to be used to
> drive the sync signal. When the property is missing it indicates that the
> sync is driven on the same edge as the pixel data.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Mark Rutland <mark.rutland@arm.com>
> CC: devicetree@vger.kernel.org
> ---
>  .../devicetree/bindings/display/panel/display-timing.txt          | 8 ++++++++
>  1 file changed, 8 insertions(+)

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 1/3] dt-bindings: display: display-timing: Add property to configure sync drive edge
@ 2016-09-23 20:01     ` Rob Herring
  0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2016-09-23 20:01 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: plagnioj-sclMFOaUSTBWk0Htik3J/w, tomi.valkeinen-l0cyMroinI0,
	airlied-cv59FeDIM0c, thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, daniel.vetter-/w4YWyX8dFk,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Thu, Sep 22, 2016 at 01:35:24PM +0300, Peter Ujfalusi wrote:
> There are display panels which demands that the sync signal is driven on
> different edge than the pixel data.
> With the syncclk-active property we can specify the clk edge to be used to
> drive the sync signal. When the property is missing it indicates that the
> sync is driven on the same edge as the pixel data.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi-l0cyMroinI0@public.gmane.org>
> CC: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> CC: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> CC: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  .../devicetree/bindings/display/panel/display-timing.txt          | 8 ++++++++
>  1 file changed, 8 insertions(+)

Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
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] 24+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: display: display-timing: Add property to configure sync drive edge
@ 2016-09-23 20:01     ` Rob Herring
  0 siblings, 0 replies; 24+ messages in thread
From: Rob Herring @ 2016-09-23 20:01 UTC (permalink / raw)
  To: Peter Ujfalusi
  Cc: plagnioj-sclMFOaUSTBWk0Htik3J/w, tomi.valkeinen-l0cyMroinI0,
	airlied-cv59FeDIM0c, thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, daniel.vetter-/w4YWyX8dFk,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA

On Thu, Sep 22, 2016 at 01:35:24PM +0300, Peter Ujfalusi wrote:
> There are display panels which demands that the sync signal is driven on
> different edge than the pixel data.
> With the syncclk-active property we can specify the clk edge to be used to
> drive the sync signal. When the property is missing it indicates that the
> sync is driven on the same edge as the pixel data.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Mark Rutland <mark.rutland@arm.com>
> CC: devicetree@vger.kernel.org
> ---
>  .../devicetree/bindings/display/panel/display-timing.txt          | 8 ++++++++
>  1 file changed, 8 insertions(+)

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 1/3] dt-bindings: display: display-timing: Add property to configure sync drive edge
  2016-09-22 10:35   ` Peter Ujfalusi
  (?)
@ 2016-09-29 10:52     ` Tomi Valkeinen
  -1 siblings, 0 replies; 24+ messages in thread
From: Tomi Valkeinen @ 2016-09-29 10:52 UTC (permalink / raw)
  To: Peter Ujfalusi, robh+dt, plagnioj, airlied, thierry.reding
  Cc: linux-fbdev, linux-kernel, daniel.vetter, dri-devel, devicetree


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

On 22/09/16 13:35, Peter Ujfalusi wrote:
> There are display panels which demands that the sync signal is driven on
> different edge than the pixel data.
> With the syncclk-active property we can specify the clk edge to be used to
> drive the sync signal. When the property is missing it indicates that the
> sync is driven on the same edge as the pixel data.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Mark Rutland <mark.rutland@arm.com>
> CC: devicetree@vger.kernel.org
> ---
>  .../devicetree/bindings/display/panel/display-timing.txt          | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/display-timing.txt b/Documentation/devicetree/bindings/display/panel/display-timing.txt
> index e1d4a0b59612..81a75893d1b8 100644
> --- a/Documentation/devicetree/bindings/display/panel/display-timing.txt
> +++ b/Documentation/devicetree/bindings/display/panel/display-timing.txt
> @@ -32,6 +32,14 @@ optional properties:
>  			- active low  = drive pixel data on falling edge/
>  					sample data on rising edge
>  			- ignored     = ignored
> + - syncclk-active: with
> +			- active high = drive sync on rising edge/
> +					sample sync on falling edge of pixel
> +					clock
> +			- active low  = drive sync on falling edge/
> +					sample sync on rising edge of pixel
> +					clock
> +			- omitted     = same configuration as pixelclk-active

I wonder if the "sample sync on..." should be left out here. It makes
sense for the pixel data, but for sync... Do the panels "sample" it, or
do they trigger on rising/falling edge?

Well, maybe that's a bit on the nitpick side, so:

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 1/3] dt-bindings: display: display-timing: Add property to configure sync drive edge
@ 2016-09-29 10:52     ` Tomi Valkeinen
  0 siblings, 0 replies; 24+ messages in thread
From: Tomi Valkeinen @ 2016-09-29 10:52 UTC (permalink / raw)
  To: Peter Ujfalusi, robh+dt, plagnioj, airlied, thierry.reding
  Cc: daniel.vetter, linux-fbdev, linux-kernel, dri-devel, devicetree


[-- Attachment #1.1.1: Type: text/plain, Size: 1805 bytes --]

On 22/09/16 13:35, Peter Ujfalusi wrote:
> There are display panels which demands that the sync signal is driven on
> different edge than the pixel data.
> With the syncclk-active property we can specify the clk edge to be used to
> drive the sync signal. When the property is missing it indicates that the
> sync is driven on the same edge as the pixel data.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Mark Rutland <mark.rutland@arm.com>
> CC: devicetree@vger.kernel.org
> ---
>  .../devicetree/bindings/display/panel/display-timing.txt          | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/display-timing.txt b/Documentation/devicetree/bindings/display/panel/display-timing.txt
> index e1d4a0b59612..81a75893d1b8 100644
> --- a/Documentation/devicetree/bindings/display/panel/display-timing.txt
> +++ b/Documentation/devicetree/bindings/display/panel/display-timing.txt
> @@ -32,6 +32,14 @@ optional properties:
>  			- active low  = drive pixel data on falling edge/
>  					sample data on rising edge
>  			- ignored     = ignored
> + - syncclk-active: with
> +			- active high = drive sync on rising edge/
> +					sample sync on falling edge of pixel
> +					clock
> +			- active low  = drive sync on falling edge/
> +					sample sync on rising edge of pixel
> +					clock
> +			- omitted     = same configuration as pixelclk-active

I wonder if the "sample sync on..." should be left out here. It makes
sense for the pixel data, but for sync... Do the panels "sample" it, or
do they trigger on rising/falling edge?

Well, maybe that's a bit on the nitpick side, so:

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 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] 24+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: display: display-timing: Add property to configure sync drive edge
@ 2016-09-29 10:52     ` Tomi Valkeinen
  0 siblings, 0 replies; 24+ messages in thread
From: Tomi Valkeinen @ 2016-09-29 10:52 UTC (permalink / raw)
  To: Peter Ujfalusi, robh+dt, plagnioj, airlied, thierry.reding
  Cc: daniel.vetter, linux-fbdev, linux-kernel, dri-devel, devicetree


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

On 22/09/16 13:35, Peter Ujfalusi wrote:
> There are display panels which demands that the sync signal is driven on
> different edge than the pixel data.
> With the syncclk-active property we can specify the clk edge to be used to
> drive the sync signal. When the property is missing it indicates that the
> sync is driven on the same edge as the pixel data.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Mark Rutland <mark.rutland@arm.com>
> CC: devicetree@vger.kernel.org
> ---
>  .../devicetree/bindings/display/panel/display-timing.txt          | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/panel/display-timing.txt b/Documentation/devicetree/bindings/display/panel/display-timing.txt
> index e1d4a0b59612..81a75893d1b8 100644
> --- a/Documentation/devicetree/bindings/display/panel/display-timing.txt
> +++ b/Documentation/devicetree/bindings/display/panel/display-timing.txt
> @@ -32,6 +32,14 @@ optional properties:
>  			- active low  = drive pixel data on falling edge/
>  					sample data on rising edge
>  			- ignored     = ignored
> + - syncclk-active: with
> +			- active high = drive sync on rising edge/
> +					sample sync on falling edge of pixel
> +					clock
> +			- active low  = drive sync on falling edge/
> +					sample sync on rising edge of pixel
> +					clock
> +			- omitted     = same configuration as pixelclk-active

I wonder if the "sample sync on..." should be left out here. It makes
sense for the pixel data, but for sync... Do the panels "sample" it, or
do they trigger on rising/falling edge?

Well, maybe that's a bit on the nitpick side, so:

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 2/3] video: display_timing: Add flags to select the edge when the sync is driven
@ 2016-09-29 10:54     ` Tomi Valkeinen
  0 siblings, 0 replies; 24+ messages in thread
From: Tomi Valkeinen @ 2016-09-29 10:54 UTC (permalink / raw)
  To: Peter Ujfalusi, robh+dt, airlied, thierry.reding
  Cc: linux-fbdev, linux-kernel, daniel.vetter, dri-devel, devicetree


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

On 22/09/16 13:35, Peter Ujfalusi wrote:
> The sync can be - and for some panels it must be - driven on different edge
> then the data.

Well, the "can be" depends on the display controller =).

> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Mark Rutland <mark.rutland@arm.com>
> CC: devicetree@vger.kernel.org
> ---
>  include/video/display_timing.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/video/display_timing.h b/include/video/display_timing.h
> index 28d9d0d566ca..3d289e990aca 100644
> --- a/include/video/display_timing.h
> +++ b/include/video/display_timing.h
> @@ -28,6 +28,10 @@ enum display_flags {
>  	DISPLAY_FLAGS_INTERLACED	= BIT(8),
>  	DISPLAY_FLAGS_DOUBLESCAN	= BIT(9),
>  	DISPLAY_FLAGS_DOUBLECLK		= BIT(10),
> +	/* drive sync on pos. edge */
> +	DISPLAY_FLAGS_SYNC_POSEDGE	= BIT(11),
> +	/* drive sync on neg. edge */
> +	DISPLAY_FLAGS_SYNC_NEGEDGE	= BIT(12),
>  };
>  
>  /*
> 

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 2/3] video: display_timing: Add flags to select the edge when the sync is driven
@ 2016-09-29 10:54     ` Tomi Valkeinen
  0 siblings, 0 replies; 24+ messages in thread
From: Tomi Valkeinen @ 2016-09-29 10:54 UTC (permalink / raw)
  To: Peter Ujfalusi, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	airlied-cv59FeDIM0c, thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, daniel.vetter-/w4YWyX8dFk,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA


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

On 22/09/16 13:35, Peter Ujfalusi wrote:
> The sync can be - and for some panels it must be - driven on different edge
> then the data.

Well, the "can be" depends on the display controller =).

> Signed-off-by: Peter Ujfalusi <peter.ujfalusi-l0cyMroinI0@public.gmane.org>
> CC: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> CC: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
> CC: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> ---
>  include/video/display_timing.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/video/display_timing.h b/include/video/display_timing.h
> index 28d9d0d566ca..3d289e990aca 100644
> --- a/include/video/display_timing.h
> +++ b/include/video/display_timing.h
> @@ -28,6 +28,10 @@ enum display_flags {
>  	DISPLAY_FLAGS_INTERLACED	= BIT(8),
>  	DISPLAY_FLAGS_DOUBLESCAN	= BIT(9),
>  	DISPLAY_FLAGS_DOUBLECLK		= BIT(10),
> +	/* drive sync on pos. edge */
> +	DISPLAY_FLAGS_SYNC_POSEDGE	= BIT(11),
> +	/* drive sync on neg. edge */
> +	DISPLAY_FLAGS_SYNC_NEGEDGE	= BIT(12),
>  };
>  
>  /*
> 

Reviewed-by: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 2/3] video: display_timing: Add flags to select the edge when the sync is driven
@ 2016-09-29 10:54     ` Tomi Valkeinen
  0 siblings, 0 replies; 24+ messages in thread
From: Tomi Valkeinen @ 2016-09-29 10:54 UTC (permalink / raw)
  To: Peter Ujfalusi, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	airlied-cv59FeDIM0c, thierry.reding-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, daniel.vetter-/w4YWyX8dFk,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	devicetree-u79uwXL29TY76Z2rM5mHXA


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

On 22/09/16 13:35, Peter Ujfalusi wrote:
> The sync can be - and for some panels it must be - driven on different edge
> then the data.

Well, the "can be" depends on the display controller =).

> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Mark Rutland <mark.rutland@arm.com>
> CC: devicetree@vger.kernel.org
> ---
>  include/video/display_timing.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/include/video/display_timing.h b/include/video/display_timing.h
> index 28d9d0d566ca..3d289e990aca 100644
> --- a/include/video/display_timing.h
> +++ b/include/video/display_timing.h
> @@ -28,6 +28,10 @@ enum display_flags {
>  	DISPLAY_FLAGS_INTERLACED	= BIT(8),
>  	DISPLAY_FLAGS_DOUBLESCAN	= BIT(9),
>  	DISPLAY_FLAGS_DOUBLECLK		= BIT(10),
> +	/* drive sync on pos. edge */
> +	DISPLAY_FLAGS_SYNC_POSEDGE	= BIT(11),
> +	/* drive sync on neg. edge */
> +	DISPLAY_FLAGS_SYNC_NEGEDGE	= BIT(12),
>  };
>  
>  /*
> 

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 3/3] video: of: display_timing: Add support for syncclk-active property
  2016-09-22 10:35   ` Peter Ujfalusi
  (?)
@ 2016-09-29 10:55     ` Tomi Valkeinen
  -1 siblings, 0 replies; 24+ messages in thread
From: Tomi Valkeinen @ 2016-09-29 10:55 UTC (permalink / raw)
  To: Peter Ujfalusi, robh+dt, airlied, thierry.reding
  Cc: linux-fbdev, linux-kernel, daniel.vetter, dri-devel, devicetree


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

On 22/09/16 13:35, Peter Ujfalusi wrote:
> Configure the DISPLAY_FLAGS_SYNC_POSEDGE/NEGEDGE flags according to the
> binding document.
> If the syncclk-active is present in DT, configure the flags accordingly, if
> it is omitted it means that the SYNC edge is following the pixdata
> configuration.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Mark Rutland <mark.rutland@arm.com>
> CC: devicetree@vger.kernel.org
> ---
>  drivers/video/of_display_timing.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
> index 8a1076beecd3..db992c684f09 100644
> --- a/drivers/video/of_display_timing.c
> +++ b/drivers/video/of_display_timing.c
> @@ -88,6 +88,15 @@ static int of_parse_display_timing(const struct device_node *np,
>  		dt->flags |= val ? DISPLAY_FLAGS_PIXDATA_POSEDGE :
>  				DISPLAY_FLAGS_PIXDATA_NEGEDGE;
>  
> +	if (!of_property_read_u32(np, "syncclk-active", &val))
> +		dt->flags |= val ? DISPLAY_FLAGS_SYNC_POSEDGE :
> +				DISPLAY_FLAGS_SYNC_NEGEDGE;
> +	else if (dt->flags & (DISPLAY_FLAGS_PIXDATA_POSEDGE |
> +			      DISPLAY_FLAGS_PIXDATA_NEGEDGE))
> +		dt->flags |= dt->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE ?
> +				DISPLAY_FLAGS_SYNC_POSEDGE :
> +				DISPLAY_FLAGS_SYNC_NEGEDGE;
> +
>  	if (of_property_read_bool(np, "interlaced"))
>  		dt->flags |= DISPLAY_FLAGS_INTERLACED;
>  	if (of_property_read_bool(np, "doublescan"))
> 

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 3/3] video: of: display_timing: Add support for syncclk-active property
@ 2016-09-29 10:55     ` Tomi Valkeinen
  0 siblings, 0 replies; 24+ messages in thread
From: Tomi Valkeinen @ 2016-09-29 10:55 UTC (permalink / raw)
  To: Peter Ujfalusi, robh+dt, airlied, thierry.reding
  Cc: daniel.vetter, linux-fbdev, linux-kernel, dri-devel, devicetree


[-- Attachment #1.1.1: Type: text/plain, Size: 1595 bytes --]

On 22/09/16 13:35, Peter Ujfalusi wrote:
> Configure the DISPLAY_FLAGS_SYNC_POSEDGE/NEGEDGE flags according to the
> binding document.
> If the syncclk-active is present in DT, configure the flags accordingly, if
> it is omitted it means that the SYNC edge is following the pixdata
> configuration.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Mark Rutland <mark.rutland@arm.com>
> CC: devicetree@vger.kernel.org
> ---
>  drivers/video/of_display_timing.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
> index 8a1076beecd3..db992c684f09 100644
> --- a/drivers/video/of_display_timing.c
> +++ b/drivers/video/of_display_timing.c
> @@ -88,6 +88,15 @@ static int of_parse_display_timing(const struct device_node *np,
>  		dt->flags |= val ? DISPLAY_FLAGS_PIXDATA_POSEDGE :
>  				DISPLAY_FLAGS_PIXDATA_NEGEDGE;
>  
> +	if (!of_property_read_u32(np, "syncclk-active", &val))
> +		dt->flags |= val ? DISPLAY_FLAGS_SYNC_POSEDGE :
> +				DISPLAY_FLAGS_SYNC_NEGEDGE;
> +	else if (dt->flags & (DISPLAY_FLAGS_PIXDATA_POSEDGE |
> +			      DISPLAY_FLAGS_PIXDATA_NEGEDGE))
> +		dt->flags |= dt->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE ?
> +				DISPLAY_FLAGS_SYNC_POSEDGE :
> +				DISPLAY_FLAGS_SYNC_NEGEDGE;
> +
>  	if (of_property_read_bool(np, "interlaced"))
>  		dt->flags |= DISPLAY_FLAGS_INTERLACED;
>  	if (of_property_read_bool(np, "doublescan"))
> 

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 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] 24+ messages in thread

* Re: [PATCH v2 3/3] video: of: display_timing: Add support for syncclk-active property
@ 2016-09-29 10:55     ` Tomi Valkeinen
  0 siblings, 0 replies; 24+ messages in thread
From: Tomi Valkeinen @ 2016-09-29 10:55 UTC (permalink / raw)
  To: Peter Ujfalusi, robh+dt, airlied, thierry.reding
  Cc: daniel.vetter, linux-fbdev, linux-kernel, dri-devel, devicetree


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

On 22/09/16 13:35, Peter Ujfalusi wrote:
> Configure the DISPLAY_FLAGS_SYNC_POSEDGE/NEGEDGE flags according to the
> binding document.
> If the syncclk-active is present in DT, configure the flags accordingly, if
> it is omitted it means that the SYNC edge is following the pixdata
> configuration.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Mark Rutland <mark.rutland@arm.com>
> CC: devicetree@vger.kernel.org
> ---
>  drivers/video/of_display_timing.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c
> index 8a1076beecd3..db992c684f09 100644
> --- a/drivers/video/of_display_timing.c
> +++ b/drivers/video/of_display_timing.c
> @@ -88,6 +88,15 @@ static int of_parse_display_timing(const struct device_node *np,
>  		dt->flags |= val ? DISPLAY_FLAGS_PIXDATA_POSEDGE :
>  				DISPLAY_FLAGS_PIXDATA_NEGEDGE;
>  
> +	if (!of_property_read_u32(np, "syncclk-active", &val))
> +		dt->flags |= val ? DISPLAY_FLAGS_SYNC_POSEDGE :
> +				DISPLAY_FLAGS_SYNC_NEGEDGE;
> +	else if (dt->flags & (DISPLAY_FLAGS_PIXDATA_POSEDGE |
> +			      DISPLAY_FLAGS_PIXDATA_NEGEDGE))
> +		dt->flags |= dt->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE ?
> +				DISPLAY_FLAGS_SYNC_POSEDGE :
> +				DISPLAY_FLAGS_SYNC_NEGEDGE;
> +
>  	if (of_property_read_bool(np, "interlaced"))
>  		dt->flags |= DISPLAY_FLAGS_INTERLACED;
>  	if (of_property_read_bool(np, "doublescan"))
> 

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2016-09-29 10:55 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22 10:35 [PATCH v2 0/3] video: of: Drive edge selection for sync Peter Ujfalusi
2016-09-22 10:35 ` Peter Ujfalusi
2016-09-22 10:35 ` Peter Ujfalusi
2016-09-22 10:35 ` [PATCH v2 1/3] dt-bindings: display: display-timing: Add property to configure sync drive edge Peter Ujfalusi
2016-09-22 10:35   ` Peter Ujfalusi
2016-09-22 10:35   ` Peter Ujfalusi
2016-09-23 20:01   ` Rob Herring
2016-09-23 20:01     ` Rob Herring
2016-09-23 20:01     ` Rob Herring
2016-09-29 10:52   ` Tomi Valkeinen
2016-09-29 10:52     ` Tomi Valkeinen
2016-09-29 10:52     ` Tomi Valkeinen
2016-09-22 10:35 ` [PATCH v2 2/3] video: display_timing: Add flags to select the edge when the sync is driven Peter Ujfalusi
2016-09-22 10:35   ` Peter Ujfalusi
2016-09-22 10:35   ` Peter Ujfalusi
2016-09-29 10:54   ` Tomi Valkeinen
2016-09-29 10:54     ` Tomi Valkeinen
2016-09-29 10:54     ` Tomi Valkeinen
2016-09-22 10:35 ` [PATCH v2 3/3] video: of: display_timing: Add support for syncclk-active property Peter Ujfalusi
2016-09-22 10:35   ` Peter Ujfalusi
2016-09-22 10:35   ` Peter Ujfalusi
2016-09-29 10:55   ` Tomi Valkeinen
2016-09-29 10:55     ` Tomi Valkeinen
2016-09-29 10:55     ` Tomi Valkeinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.