From patchwork Thu Dec 18 13:58:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 5513561 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0D8F1BEEA8 for ; Thu, 18 Dec 2014 13:59:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C41D20A14 for ; Thu, 18 Dec 2014 13:59:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 517B8209FD for ; Thu, 18 Dec 2014 13:59:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 956D6720F6; Thu, 18 Dec 2014 05:59:17 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f51.google.com (mail-qg0-f51.google.com [209.85.192.51]) by gabe.freedesktop.org (Postfix) with ESMTP id EAF92720F6 for ; Thu, 18 Dec 2014 05:59:15 -0800 (PST) Received: by mail-qg0-f51.google.com with SMTP id e89so821769qgf.38 for ; Thu, 18 Dec 2014 05:59:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CIW4bko5Dzif41F5vlf1ux2o7ZdjWqOLl+EZkfTRv5c=; b=H3lFdq0vf8e1RE4miCprJdN2IX33DImiTnT+mNPk/+18aRmH5QebLkKzlpaNJvD2Xx 1rU9g4jQxCg3ihcPVC38Psou+xtExEZBodO3PsYCYY9qnnJkEoHE2AH7UfTNwJujBeaD K4acZdK7Dr/EVPAhpnT2dc/1bOoi0EeUokO6XyxWGPTZRCNb3Zfbh6kzIcRQcB2DZ8L9 MP60xqF+FsT6v5J3BLOhXgnn+nMxoUFV9N325qXl8crXHpV3iVynvBi5JNxakiOitIEm m7FLErZqFRQd1AG7+GGrQUFsQtg9AecA886YHh2Gwfm3elzfUnKzcS+UwI0pmF0lpTy/ zmGQ== X-Received: by 10.224.79.212 with SMTP id q20mr3906545qak.4.1418911155584; Thu, 18 Dec 2014 05:59:15 -0800 (PST) Received: from localhost.localdomain ([191.8.90.215]) by mx.google.com with ESMTPSA id c63sm6802505qgf.47.2014.12.18.05.59.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Dec 2014 05:59:14 -0800 (PST) From: Gustavo Padovan To: linux-samsung-soc@vger.kernel.org Subject: [PATCH 03/29] drm/exynos: expose struct exynos_drm_crtc Date: Thu, 18 Dec 2014 11:58:29 -0200 Message-Id: <1418911135-5207-4-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1418911135-5207-1-git-send-email-gustavo@padovan.org> References: <1418911135-5207-1-git-send-email-gustavo@padovan.org> Cc: Gustavo Padovan , dri-devel@lists.freedesktop.org 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: , MIME-Version: 1.0 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, T_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 From: Gustavo Padovan Let other pieces of the driver access struct exynos_drm_crtc as well. struct exynos_drm_manager will be merged into struct exynos_drm_crtc, in the sense we will move all its members to exynos_drm_crtc, so to start this conversion exynos_drm_crtc need to be exposed as well. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 30 ------------------------------ drivers/gpu/drm/exynos/exynos_drm_drv.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c index c8a3169..e74b6fe 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c @@ -20,36 +20,6 @@ #include "exynos_drm_encoder.h" #include "exynos_drm_plane.h" -enum exynos_crtc_mode { - CRTC_MODE_NORMAL, /* normal mode */ - CRTC_MODE_BLANK, /* The private plane of crtc is blank */ -}; - -/* - * Exynos specific crtc structure. - * - * @drm_crtc: crtc object. - * @manager: the manager associated with this crtc - * @pipe: a crtc index created at load() with a new crtc object creation - * and the crtc object would be set to private->crtc array - * to get a crtc object corresponding to this pipe from private->crtc - * array when irq interrupt occurred. the reason of using this pipe is that - * drm framework doesn't support multiple irq yet. - * we can refer to the crtc to current hardware interrupt occurred through - * this pipe value. - * @dpms: store the crtc dpms value - * @mode: store the crtc mode value - */ -struct exynos_drm_crtc { - struct drm_crtc drm_crtc; - struct exynos_drm_manager *manager; - unsigned int pipe; - unsigned int dpms; - enum exynos_crtc_mode mode; - wait_queue_head_t pending_flip_queue; - atomic_t pending_flip; -}; - static void exynos_drm_crtc_dpms(struct drm_crtc *crtc, int mode) { struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc); diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index abbee75..984ddb2 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -215,6 +215,36 @@ struct exynos_drm_manager { struct exynos_drm_manager_ops *ops; }; +enum exynos_crtc_mode { + CRTC_MODE_NORMAL, /* normal mode */ + CRTC_MODE_BLANK, /* The private plane of crtc is blank */ +}; + +/* + * Exynos specific crtc structure. + * + * @drm_crtc: crtc object. + * @manager: the manager associated with this crtc + * @pipe: a crtc index created at load() with a new crtc object creation + * and the crtc object would be set to private->crtc array + * to get a crtc object corresponding to this pipe from private->crtc + * array when irq interrupt occurred. the reason of using this pipe is that + * drm framework doesn't support multiple irq yet. + * we can refer to the crtc to current hardware interrupt occurred through + * this pipe value. + * @dpms: store the crtc dpms value + * @mode: store the crtc mode value + */ +struct exynos_drm_crtc { + struct drm_crtc drm_crtc; + struct exynos_drm_manager *manager; + unsigned int pipe; + unsigned int dpms; + enum exynos_crtc_mode mode; + wait_queue_head_t pending_flip_queue; + atomic_t pending_flip; +}; + struct exynos_drm_g2d_private { struct device *dev; struct list_head inuse_cmdlist;