From patchwork Mon Aug 6 00:27:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10556341 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B833B1390 for ; Mon, 6 Aug 2018 00:32:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8ADE29302 for ; Mon, 6 Aug 2018 00:32:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B21C29306; Mon, 6 Aug 2018 00:32:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 364DD29302 for ; Mon, 6 Aug 2018 00:32:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F1446E1FB; Mon, 6 Aug 2018 00:27:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1940B6E1F1 for ; Mon, 6 Aug 2018 00:27:55 +0000 (UTC) Received: from avalon.bb.dnainternet.fi (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DC2EC2D2F; Mon, 6 Aug 2018 02:27:32 +0200 (CEST) From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 60/61] drm/omap: Set dispc_channel_connect from DSS output connect handlers Date: Mon, 6 Aug 2018 03:27:40 +0300 Message-Id: <20180806002741.30929-61-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180806002741.30929-1-laurent.pinchart@ideasonboard.com> References: <20180806002741.30929-1-laurent.pinchart@ideasonboard.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The omap_dss_device.dispc_channel_connect field is used by DSS outputs to fail the .enable() operation if they're not connected. Set the field directly from the (dis)connect handlers of the DSS outputs instead of going through the CRTC dss_mgr operations. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/dpi.c | 3 +++ drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +++ drivers/gpu/drm/omapdrm/dss/hdmi4.c | 3 +++ drivers/gpu/drm/omapdrm/dss/hdmi5.c | 3 +++ drivers/gpu/drm/omapdrm/dss/sdi.c | 3 +++ drivers/gpu/drm/omapdrm/dss/venc.c | 3 +++ drivers/gpu/drm/omapdrm/omap_crtc.c | 3 --- 7 files changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index 178b463c2d60..5b04cc514c58 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -626,12 +626,15 @@ static int dpi_connect(struct omap_dss_device *src, return r; } + dst->dispc_channel_connected = true; return 0; } static void dpi_disconnect(struct omap_dss_device *src, struct omap_dss_device *dst) { + dst->dispc_channel_connected = false; + omapdss_device_disconnect(dst, dst->next); dss_mgr_disconnect(dst); diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 948e3b873523..921e794aec0d 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -4896,12 +4896,15 @@ static int dsi_connect(struct omap_dss_device *src, return r; } + dst->dispc_channel_connected = true; return 0; } static void dsi_disconnect(struct omap_dss_device *src, struct omap_dss_device *dst) { + dst->dispc_channel_connected = false; + omapdss_device_disconnect(dst, dst->next); dss_mgr_disconnect(dst); diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c b/drivers/gpu/drm/omapdrm/dss/hdmi4.c index 6616530d5fe6..1e025a8b99c9 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c @@ -443,12 +443,15 @@ static int hdmi_connect(struct omap_dss_device *src, return r; } + dst->dispc_channel_connected = true; return 0; } static void hdmi_disconnect(struct omap_dss_device *src, struct omap_dss_device *dst) { + dst->dispc_channel_connected = false; + omapdss_device_disconnect(dst, dst->next); dss_mgr_disconnect(dst); diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5.c b/drivers/gpu/drm/omapdrm/dss/hdmi5.c index f7e15edc05fc..d5860438ddd9 100644 --- a/drivers/gpu/drm/omapdrm/dss/hdmi5.c +++ b/drivers/gpu/drm/omapdrm/dss/hdmi5.c @@ -448,12 +448,15 @@ static int hdmi_connect(struct omap_dss_device *src, return r; } + dst->dispc_channel_connected = true; return 0; } static void hdmi_disconnect(struct omap_dss_device *src, struct omap_dss_device *dst) { + dst->dispc_channel_connected = false; + omapdss_device_disconnect(dst, dst->next); dss_mgr_disconnect(dst); diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index 764299cafbe2..b74188458e91 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -267,12 +267,15 @@ static int sdi_connect(struct omap_dss_device *src, return r; } + dst->dispc_channel_connected = true; return 0; } static void sdi_disconnect(struct omap_dss_device *src, struct omap_dss_device *dst) { + dst->dispc_channel_connected = false; + omapdss_device_disconnect(dst, dst->next); dss_mgr_disconnect(dst); diff --git a/drivers/gpu/drm/omapdrm/dss/venc.c b/drivers/gpu/drm/omapdrm/dss/venc.c index c2811c425195..00421e2a8eb6 100644 --- a/drivers/gpu/drm/omapdrm/dss/venc.c +++ b/drivers/gpu/drm/omapdrm/dss/venc.c @@ -706,12 +706,15 @@ static int venc_connect(struct omap_dss_device *src, return r; } + dst->dispc_channel_connected = true; return 0; } static void venc_disconnect(struct omap_dss_device *src, struct omap_dss_device *dst) { + dst->dispc_channel_connected = false; + omapdss_device_disconnect(dst, dst->next); dss_mgr_disconnect(dst); diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index 90917d040ddb..7f837697e76c 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c @@ -114,8 +114,6 @@ static int omap_crtc_dss_connect(struct omap_drm_private *priv, enum omap_channel channel, struct omap_dss_device *dst) { - dst->dispc_channel_connected = true; - return 0; } @@ -123,7 +121,6 @@ static void omap_crtc_dss_disconnect(struct omap_drm_private *priv, enum omap_channel channel, struct omap_dss_device *dst) { - dst->dispc_channel_connected = false; } static void omap_crtc_dss_start_update(struct omap_drm_private *priv,