From patchwork Tue Mar 27 16:31:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10310731 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 5FDD760695 for ; Tue, 27 Mar 2018 16:32:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D00B29B3B for ; Tue, 27 Mar 2018 16:32:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B7F929B59; Tue, 27 Mar 2018 16:32:09 +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 8132529B83 for ; Tue, 27 Mar 2018 16:32:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C18A46E659; Tue, 27 Mar 2018 16:32:03 +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 C8C4C6E10C for ; Tue, 27 Mar 2018 16:31:58 +0000 (UTC) Received: by mail-yb0-x242.google.com with SMTP id b4-v6so7863222ybi.0 for ; Tue, 27 Mar 2018 09:31:58 -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=3wwxUoY+CZEpEpIob74l15o7DuhIH7Xi7VdGt27Z7Uw=; b=Jqe6Xi/eKYLDu1czOc/PfK/0Fl4PHB+xR4HsN+Dx/KtMIVtvtzGPYY8RlPi59G/Unw PqZo/S3aKsRLSOL3o39WR7ZdE9JN48oNyPVyWNkK1UU3oqSymwo1QETkJfY7PnREqdko LrWN04dDgzWIvz6ElN8hc9dT3FaOO8HKJgBtw= 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=3wwxUoY+CZEpEpIob74l15o7DuhIH7Xi7VdGt27Z7Uw=; b=frUvzxhfdnPnZFIKuNXSI/3hUUfMCitECAV//gKQmWFbwvgP2v8FFh4JA3QFoT/3GD BNmK6N/h1Sxm1E5FvYNIl8zf/xy3efHJFMX4IEPEHtPW7x8fBGZQNhAECmNzGjBcnqlu ug8StSJrXZi4HFbCUPXE0etRd37J5mrHHMZ9oOTDCi0fNFLIKt7zUg5cMzK662LQ9aNN DqQr9Uz9S3cq8hce6Isk7Ch2DHwI3oE3o0sG8v+GmjxcDLh1GOTwupfcH0ybFCJ15Zp1 Hdd55isko79md6elyyw2CSSVS08LEx1hb0o3hb53N5fvNnc6B5VaXOQfHfB70ZubtIPn MoeQ== X-Gm-Message-State: AElRT7ELUXms5oPKxqayQhtFvRlS8877EbhWRoAHYwSMyXJHb27yGWeD /rMZFXHF3q6ZSGG9QZ+wwCabPA== X-Google-Smtp-Source: AIpwx4/cKfa34584b2FlnrvD+wrlXeEF8pKFKk1juUyVvM1sHKBm7iL9hG2tusXVyeeVGnIVj3ZjOg== X-Received: by 2002:a25:da0f:: with SMTP id n15-v6mr12567ybf.226.1522168318042; Tue, 27 Mar 2018 09:31:58 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id f203sm563743ywa.39.2018.03.27.09.31.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 09:31:57 -0700 (PDT) From: Sean Paul To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 2/4] drm/msm: Mark the crtc->state->event consumed Date: Tue, 27 Mar 2018 12:31:52 -0400 Message-Id: <20180327163154.40374-3-seanpaul@chromium.org> X-Mailer: git-send-email 2.17.0.rc0.231.g781580f067-goog In-Reply-To: <20180327163154.40374-1-seanpaul@chromium.org> References: <20180327163154.40374-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. Cc: Jeykumar Sankaran 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); /*