From patchwork Mon Apr 2 15:11:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10319979 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 8FF9660467 for ; Mon, 2 Apr 2018 15:13:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F88928B53 for ; Mon, 2 Apr 2018 15:13:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73DF328B56; Mon, 2 Apr 2018 15:13:13 +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 06CC828B53 for ; Mon, 2 Apr 2018 15:13:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C30826E214; Mon, 2 Apr 2018 15:13:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yb0-x242.google.com (mail-yb0-x242.google.com [IPv6:2607:f8b0:4002:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id EE3D36E195 for ; Mon, 2 Apr 2018 15:13:09 +0000 (UTC) Received: by mail-yb0-x242.google.com with SMTP id o3-v6so5118178ybm.3 for ; Mon, 02 Apr 2018 08:13:09 -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=GNFU4bdXS04dHbwcllSJ4q4SZAUcnYIlVv4SH4l2lb0=; b=ACjP8jSLHDARCdc1ShT0rCh4jjDtD+F8gBpsuQRXuGAQlS0tCNzv+2nWTnrwfbdVXp jVPYY02QHGrr18qlTnRLOaTxIDXmNe4hifHvRuMabjhuvm0dGwSWewclx3Q+Wdu+KyN8 YQfNsWoaEdfsIsFWoMyXIUtimQy26S88mwm0o= 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=GNFU4bdXS04dHbwcllSJ4q4SZAUcnYIlVv4SH4l2lb0=; b=W7/27GAA7Jxvli9e8+OT2xcUqwAFIsfAU944tUZOplH/+6I2T6+5vfAW64yZ0jZqBW KSMn/zts3hJEs9sIYYgeHwiNVZwHva81z7PyntIABSDQpi60ZDfSkVxPN3gzFSfABe2I oNvDd9j8fM3YlzvI5SSDvgwipSByYbUwCPz96oQuaHWQo9h1targSlrlBr4eH7dqp6N3 pL6jN7hF25teWgHlpHW11h6uZRP2PbyHQUUleWEf4ooxVX5fEPCFtzqBO6guYywgnZi1 CPjTDFYyGi+sPmcD4c0kiFFvJyYFGa72P7Ok/mLanZQ9FXgiEfvw6NhqQlWaygqv+GGn WgXg== X-Gm-Message-State: ALQs6tCtT3dCapymdaO5XTjssVom57bnH0sHRnSpYKyLjJ+yFCtOjGgJ wWNWawfTdab8tGgiF3ZEfgjx+w== X-Google-Smtp-Source: AIpwx4/tvAnc9LdNi+sIdqrcZLRga3aYIBzEFEMTaYZS4YnL1Z8slIknffVZQpGWhfTGB8J3LHfcAw== X-Received: by 2002:a25:ab28:: with SMTP id u37-v6mr5428584ybi.464.1522681988841; Mon, 02 Apr 2018 08:13:08 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id n26sm226983ywh.16.2018.04.02.08.13.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Apr 2018 08:13:08 -0700 (PDT) From: Sean Paul To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v3 5/8] drm/msm: Mark the crtc->state->event consumed Date: Mon, 2 Apr 2018 11:11:29 -0400 Message-Id: <20180402151136.192869-6-seanpaul@chromium.org> X-Mailer: git-send-email 2.17.0.rc1.321.gba9d0f2565-goog In-Reply-To: <20180402151136.192869-1-seanpaul@chromium.org> References: <20180402151136.192869-1-seanpaul@chromium.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: abhinavk@codeaurora.org, hoegsberg@chromium.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Don't leave the event != NULL once it's consumed, this is used a signal to the atomic helpers that the event will be handled by the driver. Changes in v2: - None Changes in v3: - Rebased on Archit's private_obj set Cc: Jeykumar Sankaran Reviewed-by: Archit Taneja Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 1 + drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c index 6e5e1aa54ce1..b001699297c4 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c @@ -351,6 +351,7 @@ static void mdp4_crtc_atomic_flush(struct drm_crtc *crtc, spin_lock_irqsave(&dev->event_lock, flags); mdp4_crtc->event = crtc->state->event; + crtc->state->event = NULL; spin_unlock_irqrestore(&dev->event_lock, flags); blend_setup(crtc); diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c index 9893e43ba6c5..76b96081916f 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c @@ -708,6 +708,7 @@ static void mdp5_crtc_atomic_flush(struct drm_crtc *crtc, spin_lock_irqsave(&dev->event_lock, flags); mdp5_crtc->event = crtc->state->event; + crtc->state->event = NULL; spin_unlock_irqrestore(&dev->event_lock, flags); /*