From patchwork Thu Aug 18 23:34:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9288737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 07CFA607FF for ; Thu, 18 Aug 2016 23:34:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDAD9291E2 for ; Thu, 18 Aug 2016 23:34:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E27D429270; Thu, 18 Aug 2016 23:34:21 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 92BEE291E2 for ; Thu, 18 Aug 2016 23:34:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C0766EB5A; Thu, 18 Aug 2016 23:34:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x229.google.com (mail-pf0-x229.google.com [IPv6:2607:f8b0:400e:c00::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 673026EB5A for ; Thu, 18 Aug 2016 23:34:18 +0000 (UTC) Received: by mail-pf0-x229.google.com with SMTP id p64so2964659pfb.1 for ; Thu, 18 Aug 2016 16:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+zN2PCj7iL5IQYlzdZhrP1Ll7Fw8l9rgoTlMxks9wvk=; b=iLMkZfXlorgI9kZfNb3ODKlepa+309ymqftE/fsY/Iw2KVsOJMwTL0ezr1w58sl+go NBYhikhpUPZZ9xEUZJJ4UezUgwesjUxGYbyvkAPszEmUyS+BP0nhJB133/NuinkRlYbo hekPZsekhR9Gwc8WlhuhKSiZd2O/2ToupQPfU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+zN2PCj7iL5IQYlzdZhrP1Ll7Fw8l9rgoTlMxks9wvk=; b=d1DQCPbK4OO3ucF+RW4kQuRigc7k6S+KgD0r6x2Q7G0bi8PslmAtWt39Po8sBreNll rB0MaYkQ8Ke34Us+4jFUfYgATXV82UcWrBMBmoC6wfb8hJ61eVpWet/3G+Xr1EUiRHwu 7XtMTn8H6LBw1xJSvHQsKmha/GZP9fhW2fGiBNb7kJv53v7LmYcSXH0GiZ7OX6vZWjZz y7s9rM7+sKNjGsGxGEZN7/0L3ljYnMWz3qZAPIJAJH1DUyR5VPL6oEAUdo0NbkX44P/m nZY1tnUFYhZwbyyndqaHYu3zoqnkKX14ZYJIbLU/Np/0lKGL3M+QWJcEtCEdWU2kTFSj +9Iw== X-Gm-Message-State: AEkoouvAg94PlQiChP79vmrauwabH7DUvRA3/AexfxVuAgVlvWMrDn2W93DOWrAd+gTi8HX6 X-Received: by 10.98.157.154 with SMTP id a26mr8658252pfk.68.1471563257980; Thu, 18 Aug 2016 16:34:17 -0700 (PDT) Received: from seanpaul0.corp.google.com ([172.19.29.180]) by smtp.gmail.com with ESMTPSA id o80sm1277045pfa.67.2016.08.18.16.34.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Aug 2016 16:34:17 -0700 (PDT) From: Sean Paul To: mark.yao@rock-chips.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, ykk@rock-chips.com Subject: [PATCH 1/3] drm/rockchip: Remove unnecessary vblank get/put from vop driver Date: Thu, 18 Aug 2016 16:34:09 -0700 Message-Id: <1471563251-28754-2-git-send-email-seanpaul@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1471563251-28754-1-git-send-email-seanpaul@chromium.org> References: <1471563251-28754-1-git-send-email-seanpaul@chromium.org> Cc: zachr@chromium.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-Virus-Scanned: ClamAV using ClamSMTP vblank references are handled in the top-level atomic complete function, so no need to grab them again in the vop driver. Signed-off-by: Sean Paul --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 1787084..7003e4d 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -112,7 +112,6 @@ struct vop { struct device *dev; struct drm_device *drm_dev; bool is_enabled; - bool vblank_active; /* mutex vsync_ work */ struct mutex vsync_mutex; @@ -1108,10 +1107,6 @@ static void vop_crtc_atomic_begin(struct drm_crtc *crtc, struct vop *vop = to_vop(crtc); spin_lock_irq(&crtc->dev->event_lock); - vop->vblank_active = true; - WARN_ON(drm_crtc_vblank_get(crtc) != 0); - WARN_ON(vop->event); - if (crtc->state->event) { vop->event = crtc->state->event; crtc->state->event = NULL; @@ -1201,11 +1196,6 @@ static void vop_handle_vblank(struct vop *vop) if (vop->event) { drm_crtc_send_vblank_event(crtc, vop->event); vop->event = NULL; - - } - if (vop->vblank_active) { - vop->vblank_active = false; - drm_crtc_vblank_put(crtc); } spin_unlock_irqrestore(&drm->event_lock, flags); @@ -1476,7 +1466,6 @@ static int vop_initial(struct vop *vop) clk_disable(vop->aclk); vop->is_enabled = false; - vop->vblank_active = false; return 0;