Received: by 10.213.65.68 with SMTP id h4csp542540imn; Fri, 30 Mar 2018 10:21:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+KOjY9estRWeGMYsJUq18/4VECLrxOWcOMuOYrWm95RMD2Da5IHhyPc6Xj1hnIe9a2Ajpd X-Received: by 10.101.93.78 with SMTP id e14mr758387pgt.84.1522430491544; Fri, 30 Mar 2018 10:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522430491; cv=none; d=google.com; s=arc-20160816; b=ZkIBhtoMh4w2w1T+48wDBMnRyMGdx7hFrU8+sWeVprB8Bjs8qh2539znYr3Q5+oQ9C M9iX5PhF/A4EOtr3VBn/h33b5SIrRSG9UCSmsT7RnB9yTKg/ewxNQYf6LJ+qWPK4BTDQ 5ph4zh7I5jfevRGek40B7Y+VKXkh7ank8HCARgtoI0wespxy5Dt04M0THKicu/2an6UT mKdMyC9wox6fewmJZQlJDnvWbCH07b+o9JbvgBuPgT4X0LpGlgEGWNyJukALDVn/9bNi rPOIr20kYAbduQUYrbNbzWL5lEV2pRFhdRQL0ixJ/75d8lqH7gJz0Bo/ZAwrwQF0kQpp a3vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=i8mRRqjrN8+LB7QbAFuB5u9F+o4JcBMWGfr68MleQ/U=; b=YOJQh4f9QGMP8xc9PG7+di61zLLRAQiLwOQgc26m2zfwX74CFpkj3JTAQOqTpkBU8u 9504afkHXVbHG4Pmgxea7d5X/8zegujMiwNEOJ6Tl4n7Uqq5Ha89E4dE2S4EZZGVHAZO AWF1A2QJEISQ6Ey/9p2CInOpJ/ue0mTj/+yKe4TAjFiFf4aFrHT64Bn8avtHyMqMzIzG 2gAL7hD5NfKswVr2hLatBVF7CyxqXw2noEG5GosDMjhvfBynsWrdYmSueHAw/MUzDxZD Sjc/lIT5os5yUpsA5S1/U4QvJgFMKtDrNRneMJ1HoSPn0ism6tyZtQcGTuKrJ3sgLzAj 2LCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f34-v6si8988684ple.622.2018.03.30.10.21.18; Fri, 30 Mar 2018 10:21:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752275AbeC3RSg (ORCPT + 99 others); Fri, 30 Mar 2018 13:18:36 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:58726 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752166AbeC3RSd (ORCPT ); Fri, 30 Mar 2018 13:18:33 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 5D22F2601D5 From: Sebastian Reichel To: Sebastian Reichel , Tomi Valkeinen , Tony Lindgren , Pavel Machek Cc: Laurent Pinchart , Rob Herring , Mark Rutland , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Sebastian Reichel Subject: [PATCHv3 2/8] drm/omap: add manual update detection helper Date: Fri, 30 Mar 2018 19:18:16 +0200 Message-Id: <20180330171822.25896-3-sebastian.reichel@collabora.co.uk> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180330171822.25896-1-sebastian.reichel@collabora.co.uk> References: <20180330171822.25896-1-sebastian.reichel@collabora.co.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Tested-by: Tony Lindgren Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/omap_connector.c | 8 ++++++++ drivers/gpu/drm/omapdrm/omap_connector.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 a0d7b1d905e8..a33b51484b2d 100644 --- a/drivers/gpu/drm/omapdrm/omap_connector.c +++ b/drivers/gpu/drm/omapdrm/omap_connector.c @@ -57,6 +57,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_connector.h b/drivers/gpu/drm/omapdrm/omap_connector.h index 98bbc779b302..652136d167f5 100644 --- a/drivers/gpu/drm/omapdrm/omap_connector.h +++ b/drivers/gpu/drm/omapdrm/omap_connector.h @@ -33,5 +33,6 @@ 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); #endif /* __OMAPDRM_CONNECTOR_H__ */ -- 2.16.2