From patchwork Thu Jun 4 09:03:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 6545691 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 20BCE9F326 for ; Thu, 4 Jun 2015 11:06:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C85320713 for ; Thu, 4 Jun 2015 11:06:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2B8E12070A for ; Thu, 4 Jun 2015 11:06:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4BB976EB03; Thu, 4 Jun 2015 04:06:40 -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 A7C7B6EAD5 for ; Thu, 4 Jun 2015 02:04:39 -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 t5494aTX030711; Thu, 4 Jun 2015 04:04:36 -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 t5494ajn030361; Thu, 4 Jun 2015 04:04:36 -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:36 -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 t5493Ywk014785; Thu, 4 Jun 2015 04:04:35 -0500 From: Tomi Valkeinen To: , Laurent Pinchart Subject: [PATCHv2 44/45] drm: omapdrm: merge omap_crtc_flush and omap_crtc_atomic_flush Date: Thu, 4 Jun 2015 12:03:01 +0300 Message-ID: <1433408582-9828-45-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 omap_crtc_atomic_flush() is the only user of omap_crtc_flush(), so just move the code from omap_crtc_flush() to omap_crtc_atomic_flush(). Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/omap_crtc.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index 2ec34dc0c66c..b7df689cdb4c 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c @@ -315,22 +315,6 @@ static void omap_crtc_vblank_irq(struct omap_drm_irq *irq, uint32_t irqstatus) omap_crtc_complete_page_flip(&omap_crtc->base); } -static int omap_crtc_flush(struct drm_crtc *crtc) -{ - struct omap_crtc *omap_crtc = to_omap_crtc(crtc); - - DBG("%s: GO", omap_crtc->name); - - WARN_ON(omap_crtc->vblank_irq.registered); - - if (dispc_mgr_is_enabled(omap_crtc->channel)) { - dispc_mgr_go(omap_crtc->channel); - omap_irq_register(crtc->dev, &omap_crtc->vblank_irq); - } - - return 0; -} - /* ----------------------------------------------------------------------------- * CRTC Functions */ @@ -408,7 +392,16 @@ static void omap_crtc_atomic_begin(struct drm_crtc *crtc) static void omap_crtc_atomic_flush(struct drm_crtc *crtc) { - omap_crtc_flush(crtc); + struct omap_crtc *omap_crtc = to_omap_crtc(crtc); + + if (dispc_mgr_is_enabled(omap_crtc->channel)) { + WARN_ON(omap_crtc->vblank_irq.registered); + + DBG("%s: GO", omap_crtc->name); + + dispc_mgr_go(omap_crtc->channel); + omap_irq_register(crtc->dev, &omap_crtc->vblank_irq); + } crtc->invert_dimensions = !!(crtc->primary->state->rotation & (BIT(DRM_ROTATE_90) | BIT(DRM_ROTATE_270)));