From patchwork Mon Feb 22 17:10:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 8380901 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F2CAD9F1D4 for ; Mon, 22 Feb 2016 17:12:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A05520501 for ; Mon, 22 Feb 2016 17:12:24 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CE2C22051A for ; Mon, 22 Feb 2016 17:12:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 01C3B6E286; Mon, 22 Feb 2016 17:12:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9E1D06E27C for ; Mon, 22 Feb 2016 17:11:31 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id u1MHBS7g009900; Mon, 22 Feb 2016 11:11:28 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u1MHBSeE030188; Mon, 22 Feb 2016 11:11:28 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.224.2; Mon, 22 Feb 2016 11:11:27 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id u1MHArAX011935; Mon, 22 Feb 2016 11:11:26 -0600 From: Tomi Valkeinen To: , Laurent Pinchart Subject: [PATCH 21/42] drm/omap: add dispc_channel_connected field to omap_dss_device Date: Mon, 22 Feb 2016 19:10:27 +0200 Message-ID: <1456161048-21240-22-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456161048-21240-1-git-send-email-tomi.valkeinen@ti.com> References: <1456161048-21240-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Cc: Tomi Valkeinen X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We want to remove the 'struct omap_overlay_manager' from omap_dss_device. At the moment that field is used, among some other uses, to see if the omap_dss_device is connected to an overlay manager. To make it possible to remove the 'struct omap_overlay_manager' field, this patch adds 'bool dispc_channel_connected' field to track the connected-or-not status. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_crtc.c | 2 ++ include/video/omapdss.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index 9cc1c4ef79a5..f195641b510c 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c @@ -107,6 +107,7 @@ static int omap_crtc_dss_connect(enum omap_channel channel, return -EINVAL; omap_crtc_output[channel] = dst; + dst->dispc_channel_connected = true; dst->manager = mgr; mgr->output = dst; @@ -120,6 +121,7 @@ static void omap_crtc_dss_disconnect(enum omap_channel channel, struct omap_overlay_manager *mgr = omap_dss_get_overlay_manager(channel); omap_crtc_output[channel] = NULL; + dst->dispc_channel_connected = false; mgr->output->manager = NULL; mgr->output = NULL; diff --git a/include/video/omapdss.h b/include/video/omapdss.h index b50ebcd2f460..8e14ad7327c9 100644 --- a/include/video/omapdss.h +++ b/include/video/omapdss.h @@ -770,6 +770,7 @@ struct omap_dss_device { /* DISPC channel for this output */ enum omap_channel dispc_channel; + bool dispc_channel_connected; /* output instance */ enum omap_dss_output_id id;