From patchwork Wed Mar 8 14:12:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9611315 X-Patchwork-Delegate: agross@codeaurora.org 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 4732F6016C for ; Wed, 8 Mar 2017 14:39:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6918E284BC for ; Wed, 8 Mar 2017 14:39:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DD0828597; Wed, 8 Mar 2017 14:39:36 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DFAA6284BC for ; Wed, 8 Mar 2017 14:39:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750749AbdCHOje (ORCPT ); Wed, 8 Mar 2017 09:39:34 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:35088 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbdCHOjU (ORCPT ); Wed, 8 Mar 2017 09:39:20 -0500 Received: by mail-wr0-f195.google.com with SMTP id u108so4396328wrb.2 for ; Wed, 08 Mar 2017 06:39:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5tnaCNuGRR6mV8OLFG2F4CKaSm2P1dnKiPHuxs7fpMA=; b=DNQuf+xwkO78OKv0WZMecZjvv9AfGwPxVF9llq+y4mV/WMLBHwK6IYRE+P3SJgj7nM cYjuVqZFkhFnZaD1JFwEXWZ4gf2p/gjK8fXPyKGoZmSUYgkZ7gT/UMyJF1DUpRRy9YKF QZFcvQ5MgWy3Fue+heRRAkXgfgYixehod+Yuc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5tnaCNuGRR6mV8OLFG2F4CKaSm2P1dnKiPHuxs7fpMA=; b=rwCC5uAYzL1oA0a491KajgSJtc6ikupKgT7gh7iecKpj33YPiUYZyoNSeTtRKTWUih mHyUElY9VYET+wDs/vgR4r+it99cJmFMvlTxz8kYR9bCSnPl/NwexxmpzOW8pkafIDRb +Has9R/iccXiL+9LasTOr4IqgV18Wg9/+Pp2+6kRHQmuh6b9mnqSEYTGAE2JfRJjaMU6 n+qccDgyg3w6KbjoGSqiBUFbaW8ujXAVRdqaYF/nVQXO0Bz7Y9RUdob0C/GEXtotxxDX 9H1pflrRzKjuMPZdES6Hxk/wLSJwEnxGbapTlTNrNCJBWUhQH3f3mwUEp5fnSpNu1WHR PPMQ== X-Gm-Message-State: AMke39nGdhhTlsy1ysKsg1fuVJiqD32MqE51tBEAY580Jz8BJuSUcqIGLuU9szTwK3UU7Q== X-Received: by 10.223.170.70 with SMTP id q6mr6301116wrd.162.1488982406871; Wed, 08 Mar 2017 06:13:26 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:56c9:0:decc:6e78:7e96:b452]) by smtp.gmail.com with ESMTPSA id m186sm17012515wmd.21.2017.03.08.06.13.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Mar 2017 06:13:26 -0800 (PST) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , Daniel Vetter , Rob Clark , linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Daniel Vetter Subject: [PATCH 21/24] drm/msm: Simplify vblank event delivery Date: Wed, 8 Mar 2017 15:12:54 +0100 Message-Id: <20170308141257.12119-22-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170308141257.12119-1-daniel.vetter@ffwll.ch> References: <20170308141257.12119-1-daniel.vetter@ffwll.ch> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The core takes care of handling the send_event vs. close() issues, we can remove that driver code. Cc: Rob Clark Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Daniel Vetter --- drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 12 +++--------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c index 1c29618f4ddb..f29194a74a19 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c @@ -114,15 +114,9 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file) spin_lock_irqsave(&dev->event_lock, flags); event = mdp4_crtc->event; if (event) { - /* if regular vblank case (!file) or if cancel-flip from - * preclose on file that requested flip, then send the - * event: - */ - if (!file || (event->base.file_priv == file)) { - mdp4_crtc->event = NULL; - DBG("%s: send event: %p", mdp4_crtc->name, event); - drm_crtc_send_vblank_event(crtc, event); - } + mdp4_crtc->event = NULL; + DBG("%s: send event: %p", mdp4_crtc->name, event); + drm_crtc_send_vblank_event(crtc, event); } spin_unlock_irqrestore(&dev->event_lock, flags); } diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c index d0c8b38b96ce..87a19e0c0e67 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c @@ -138,15 +138,9 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file) spin_lock_irqsave(&dev->event_lock, flags); event = mdp5_crtc->event; if (event) { - /* if regular vblank case (!file) or if cancel-flip from - * preclose on file that requested flip, then send the - * event: - */ - if (!file || (event->base.file_priv == file)) { - mdp5_crtc->event = NULL; - DBG("%s: send event: %p", crtc->name, event); - drm_crtc_send_vblank_event(crtc, event); - } + mdp5_crtc->event = NULL; + DBG("%s: send event: %p", crtc->name, event); + drm_crtc_send_vblank_event(crtc, event); } spin_unlock_irqrestore(&dev->event_lock, flags);