From bf8408f6e06e4d6e80940d0c8e08f7e8da330de7 Mon Sep 17 00:00:00 2001
From: Valentine Barshak <valentine.barshak@cogentembedded.com>
Date: Wed, 21 Mar 2018 20:48:02 +0300
Subject: [PATCH 021/122] gpu: drm: bridge: adv7511: Add interlaced mode
 support

This adds "interlace-allowed" DTS property
that allows interlaced mode support when set.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
---
 Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt | 1 +
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c                     | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt b/Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt
index 06668bc..e0a2360 100644
--- a/Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt
+++ b/Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt
@@ -60,6 +60,7 @@ Optional properties:
 - interrupts: Specifier for the ADV7511 interrupt
 - pd-gpios: Specifier for the GPIO connected to the power down signal
 
+- interlace-allowed - Allows interlaced modes when set.
 - adi,clock-delay: Video data clock delay relative to the pixel clock, in ps
   (-1200 ps .. 1600 ps). Defaults to no delay.
 - adi,embedded-sync: The input uses synchronization signals embedded in the
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 69f605b..808021f 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -863,6 +863,9 @@ static int adv7511_bridge_attach(struct drm_bridge *bridge)
 		adv->connector.polled = DRM_CONNECTOR_POLL_CONNECT |
 				DRM_CONNECTOR_POLL_DISCONNECT;
 
+	adv->connector.interlace_allowed =
+		of_property_read_bool(bridge->of_node, "interlace-allowed");
+
 	ret = drm_connector_init(bridge->dev, &adv->connector,
 				 &adv7511_connector_funcs,
 				 DRM_MODE_CONNECTOR_HDMIA);
-- 
2.7.4

