Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932980AbdGXReS (ORCPT ); Mon, 24 Jul 2017 13:34:18 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:58992 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932699AbdGXRdh (ORCPT ); Mon, 24 Jul 2017 13:33:37 -0400 From: Sebastian Reichel To: Sebastian Reichel , Tomi Valkeinen , Tony Lindgren Cc: Laurent Pinchart , dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel Subject: [PATCHv1 05/14] drm/omap: add manual update detection helper Date: Mon, 24 Jul 2017 19:33:02 +0200 Message-Id: <20170724173311.27170-6-sebastian.reichel@collabora.co.uk> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170724173311.27170-1-sebastian.reichel@collabora.co.uk> References: <20170724173311.27170-1-sebastian.reichel@collabora.co.uk> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1758 Lines: 43 In preparation for manually updated display support, such as DSI command mode panels, this adds a simple helper to see if a connector is manually updated. Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/omap_connector.c | 8 ++++++++ drivers/gpu/drm/omapdrm/omap_drv.h | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c index c24b6b783e9a..5e941305ab1b 100644 --- a/drivers/gpu/drm/omapdrm/omap_connector.c +++ b/drivers/gpu/drm/omapdrm/omap_connector.c @@ -42,6 +42,14 @@ bool omap_connector_get_hdmi_mode(struct drm_connector *connector) return omap_connector->hdmi_mode; } +bool omap_connector_get_manually_updated(struct drm_connector *connector) +{ + struct omap_connector *omap_connector = to_omap_connector(connector); + + return !!(omap_connector->dssdev->caps & + OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE); +} + static enum drm_connector_status omap_connector_detect( struct drm_connector *connector, bool force) { diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h index 22f3d94994d2..f6c48f254c9b 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.h +++ b/drivers/gpu/drm/omapdrm/omap_drv.h @@ -142,6 +142,7 @@ struct drm_connector *omap_connector_init(struct drm_device *dev, struct drm_encoder *omap_connector_attached_encoder( struct drm_connector *connector); bool omap_connector_get_hdmi_mode(struct drm_connector *connector); +bool omap_connector_get_manually_updated(struct drm_connector *connector); struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev, struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd); -- 2.13.2