From patchwork Wed Feb 28 19:19:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10249415 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 D733160211 for ; Wed, 28 Feb 2018 19:19:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFF6F28DF9 for ; Wed, 28 Feb 2018 19:19:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2C5928E3A; Wed, 28 Feb 2018 19:19:46 +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 3E55C28DF9 for ; Wed, 28 Feb 2018 19:19:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A6AA56EB4D; Wed, 28 Feb 2018 19:19:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-x242.google.com (mail-yw0-x242.google.com [IPv6:2607:f8b0:4002:c05::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 521966EB39 for ; Wed, 28 Feb 2018 19:19:13 +0000 (UTC) Received: by mail-yw0-x242.google.com with SMTP id w12so1201475ywa.8 for ; Wed, 28 Feb 2018 11:19:13 -0800 (PST) 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=h/euU9D3CWKK52dnSPaRig5gl3RMI8+728v2nEl9Ob4=; b=dOZkuYqZRW+5aQYTbxIfXFK6vRUK5/fD3m2LXQ9LMVVx2wf0d1Nf52FQZU7rBNEaGL Ml0GmOR3RecAi6xw4YmY3YtKH9izq7XCqpwTOzCZfEIW+o31SgIXehIZC7VSohMbUf5/ dSSrQbKH+G6Agp3vkZF7ua1O1J+nkuwWRsPB4= 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=h/euU9D3CWKK52dnSPaRig5gl3RMI8+728v2nEl9Ob4=; b=a6BMyTJnOwYM1UixXaRuZqwari8zbg2TZp3OREC6fv01KSZKrmsWfDTweznTy7iG// Q8k2JFdGbFUgv7wPzKQ4CO5JRs9TqjSS8gYXtY6tsu5aBu2HgyOomidtNKVgMPdMbGkF fBX2C4eWdwacwWu3cTIssYSkTa4GPxmjAyZ+H+DdWP9ezNgWKT8gpkKJxidSYPHv5BvU XH2w3B/+d2MveQUAmYE1RjhNt/jkFJdl/Tw/OxDwF3wKVPJdB7GlBNBKp8T8ASbzn5+b 2DDd+zvz9UT4J2JMNMMoAM7H0hRAruReCzeRf4FZUdIsmyKmqzudXpESI6dCmrw6PkEk yc5A== X-Gm-Message-State: APf1xPDeo3nDUYEBabVUVJHOvIn/Pt1HjmfjfC/pC3PcHi0YADK6+G9e tREKcgUpSztKfjGffsiGu5GOSA== X-Google-Smtp-Source: AH8x224iQ/DnZDIcYwbH8KJTzvvKEObkyEDhmJppPz9vS3ujbEaVsCDYdFMi6RzsslOACqd2iug0Hg== X-Received: by 10.129.182.97 with SMTP id h33mr12408164ywk.90.1519845552617; Wed, 28 Feb 2018 11:19:12 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id u62sm884594ywa.19.2018.02.28.11.19.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Feb 2018 11:19:11 -0800 (PST) From: Sean Paul To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [DPU PATCH 05/11] drm/msm: Mark the crtc->state->event consumed Date: Wed, 28 Feb 2018 14:19:00 -0500 Message-Id: <20180228191906.185417-6-seanpaul@chromium.org> X-Mailer: git-send-email 2.16.2.395.g2e18187dfd-goog In-Reply-To: <20180228191906.185417-1-seanpaul@chromium.org> References: <20180228191906.185417-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: hoegsberg@chromium.org, abhinavk@codeaurora.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. Change-Id: Ib934fb2e97bacbb4a1f9c780cc7369c2bb98ed50 Signed-off-by: Sean Paul Reviewed-by: Jeykumar Sankaran --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 ++ drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 1 + drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 1 + 3 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index 94fab2dcca5b..a261021e5deb 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -2714,6 +2714,7 @@ static void dpu_crtc_atomic_begin(struct drm_crtc *crtc, } else { spin_lock_irqsave(&dev->event_lock, flags); dpu_crtc->event = crtc->state->event; + crtc->state->event = NULL; spin_unlock_irqrestore(&dev->event_lock, flags); } @@ -2798,6 +2799,7 @@ static void dpu_crtc_atomic_flush(struct drm_crtc *crtc, } else { spin_lock_irqsave(&dev->event_lock, flags); dpu_crtc->event = crtc->state->event; + crtc->state->event = NULL; spin_unlock_irqrestore(&dev->event_lock, flags); } 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 8c5ed0b59e46..5cb490a58f20 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c @@ -704,6 +704,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); /*