From patchwork Thu Jun 4 09:02:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 6545911 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 84F95C0020 for ; Thu, 4 Jun 2015 11:07:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9680D20713 for ; Thu, 4 Jun 2015 11:07:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B5861206D6 for ; Thu, 4 Jun 2015 11:07:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D006A6EB2B; Thu, 4 Jun 2015 04:06:42 -0700 (PDT) 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 ESMTP id 5B0016EAD7 for ; Thu, 4 Jun 2015 02:04:30 -0700 (PDT) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id t5494P0d030685; Thu, 4 Jun 2015 04:04:25 -0500 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 t5494Phk030219; Thu, 4 Jun 2015 04:04:25 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.224.2; Thu, 4 Jun 2015 04:04:25 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t5493Ywd014785; Thu, 4 Jun 2015 04:04:24 -0500 From: Tomi Valkeinen To: , Laurent Pinchart Subject: [PATCHv2 37/45] drm: omapdrm: Don't setup planes manually from CRTC .enable()/.disable() Date: Thu, 4 Jun 2015 12:02:54 +0300 Message-ID: <1433408582-9828-38-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1433408582-9828-1-git-send-email-tomi.valkeinen@ti.com> References: <1433408582-9828-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 04 Jun 2015 04:06:34 -0700 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, 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: Laurent Pinchart Planes setup is handled by the DRM core through the atomic helpers, there's no need to duplicate the code in the CRTC .enable() and .disable() operations. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_crtc.c | 20 -------------------- drivers/gpu/drm/omapdrm/omap_drv.h | 1 - drivers/gpu/drm/omapdrm/omap_plane.c | 2 +- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index 701406e1f0ee..abfafd1600b8 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c @@ -391,41 +391,21 @@ static bool omap_crtc_mode_fixup(struct drm_crtc *crtc, static void omap_crtc_enable(struct drm_crtc *crtc) { - struct omap_drm_private *priv = crtc->dev->dev_private; struct omap_crtc *omap_crtc = to_omap_crtc(crtc); - unsigned int i; DBG("%s", omap_crtc->name); - /* Enable all planes associated with the CRTC. */ - for (i = 0; i < priv->num_planes; i++) { - struct drm_plane *plane = priv->planes[i]; - - if (plane->crtc == crtc) - WARN_ON(omap_plane_setup(plane)); - } - drm_crtc_vblank_on(crtc); } static void omap_crtc_disable(struct drm_crtc *crtc) { - struct omap_drm_private *priv = crtc->dev->dev_private; struct omap_crtc *omap_crtc = to_omap_crtc(crtc); - unsigned int i; DBG("%s", omap_crtc->name); omap_crtc_wait_page_flip(crtc); drm_crtc_vblank_off(crtc); - - /* Disable all planes associated with the CRTC. */ - for (i = 0; i < priv->num_planes; i++) { - struct drm_plane *plane = priv->planes[i]; - - if (plane->crtc == crtc) - WARN_ON(omap_plane_setup(plane)); - } } static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc) diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h index bdd54162698f..0b7a055bf007 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.h +++ b/drivers/gpu/drm/omapdrm/omap_drv.h @@ -150,7 +150,6 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev, struct drm_plane *omap_plane_init(struct drm_device *dev, int id, enum drm_plane_type type); -int omap_plane_setup(struct drm_plane *plane); void omap_plane_install_properties(struct drm_plane *plane, struct drm_mode_object *obj); diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index d18fe106e256..448707669690 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c @@ -58,7 +58,7 @@ to_omap_plane_state(struct drm_plane_state *state) return container_of(state, struct omap_plane_state, base); } -int omap_plane_setup(struct drm_plane *plane) +static int omap_plane_setup(struct drm_plane *plane) { struct omap_plane *omap_plane = to_omap_plane(plane); struct drm_plane_state *state = plane->state;