0001-PATCHv2-2-8-drm-omap-add-manual-update-detection-helper.patch (2584B)
1 From patchwork Thu Feb 8 18:30:29 2018 2 Content-Type: text/plain; charset="utf-8" 3 MIME-Version: 1.0 4 Content-Transfer-Encoding: 7bit 5 Subject: [PATCHv2,2/8] drm/omap: add manual update detection helper 6 From: Sebastian Reichel <sebastian.reichel@collabora.co.uk> 7 X-Patchwork-Id: 10207763 8 Message-Id: <20180208183035.8461-3-sebastian.reichel@collabora.co.uk> 9 To: Sebastian Reichel <sre@kernel.org>, 10 Tomi Valkeinen <tomi.valkeinen@ti.com>, Tony Lindgren <tony@atomide.com> 11 Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>, 12 Hans de Goede <hdegoede@redhat.com>, Rob Herring <robh+dt@kernel.org>, 13 Mark Rutland <mark.rutland@arm.com>, 14 dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, 15 linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, 16 kernel@collabora.com, Sebastian Reichel <sebastian.reichel@collabora.co.uk> 17 Date: Thu, 8 Feb 2018 19:30:29 +0100 18 19 In preparation for manually updated display support, such as DSI 20 command mode panels, this adds a simple helper to see if a connector 21 is manually updated. 22 23 Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> 24 Tested-by: Tony Lindgren <tony@atomide.com> 25 --- 26 drivers/gpu/drm/omapdrm/omap_connector.c | 8 ++++++++ 27 drivers/gpu/drm/omapdrm/omap_connector.h | 1 + 28 2 files changed, 9 insertions(+) 29 30 diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c 31 index a0d7b1d905e8..a33b51484b2d 100644 32 --- a/drivers/gpu/drm/omapdrm/omap_connector.c 33 +++ b/drivers/gpu/drm/omapdrm/omap_connector.c 34 @@ -57,6 +57,14 @@ bool omap_connector_get_hdmi_mode(struct drm_connector *connector) 35 return omap_connector->hdmi_mode; 36 } 37 38 +bool omap_connector_get_manually_updated(struct drm_connector *connector) 39 +{ 40 + struct omap_connector *omap_connector = to_omap_connector(connector); 41 + 42 + return !!(omap_connector->dssdev->caps & 43 + OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE); 44 +} 45 + 46 static enum drm_connector_status omap_connector_detect( 47 struct drm_connector *connector, bool force) 48 { 49 diff --git a/drivers/gpu/drm/omapdrm/omap_connector.h b/drivers/gpu/drm/omapdrm/omap_connector.h 50 index 98bbc779b302..652136d167f5 100644 51 --- a/drivers/gpu/drm/omapdrm/omap_connector.h 52 +++ b/drivers/gpu/drm/omapdrm/omap_connector.h 53 @@ -33,5 +33,6 @@ struct drm_connector *omap_connector_init(struct drm_device *dev, 54 struct drm_encoder *omap_connector_attached_encoder( 55 struct drm_connector *connector); 56 bool omap_connector_get_hdmi_mode(struct drm_connector *connector); 57 +bool omap_connector_get_manually_updated(struct drm_connector *connector); 58 59 #endif /* __OMAPDRM_CONNECTOR_H__ */