From patchwork Wed Mar 28 19:06:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10313903 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 0E2D8605B4 for ; Wed, 28 Mar 2018 19:08:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F213028F97 for ; Wed, 28 Mar 2018 19:08:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6DF328FCF; Wed, 28 Mar 2018 19:08:37 +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 89C7528F97 for ; Wed, 28 Mar 2018 19:08:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 799D989503; Wed, 28 Mar 2018 19:08:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-x241.google.com (mail-yw0-x241.google.com [IPv6:2607:f8b0:4002:c05::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5645189503 for ; Wed, 28 Mar 2018 19:08:35 +0000 (UTC) Received: by mail-yw0-x241.google.com with SMTP id y23so1164710ywy.4 for ; Wed, 28 Mar 2018 12:08:35 -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=4Uj3SIn8T7jez8ri1GdI8v0xULYoSAev8crsqH22OJI=; b=D9+1g9uLIJxmh1f4C66svT0lkaH6bEJvAnM5zSNKtfeSZS5Am2LnOalteIm8UNUktR TE0zpQRKas1SgkfhJTaKuovBOcJ5enOMBaua9de38x0fNROqEmGpMzD09FnGcZ0pygMo iXO2JSzhKj8mzofg1hEPMwfJ+qm5cbOaJVwWo= 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=4Uj3SIn8T7jez8ri1GdI8v0xULYoSAev8crsqH22OJI=; b=IbJfgFZDSSyB+FOCYvPRtA5tEu6s1kiQjWoXSIur/WxnJtV764wmiP446YnVN5Zgrl rSYPybsa3IJOjtlB/YlPHxyNeWTINFEx+vBKGCJjyB3D8c4rLlGGYYTqLTyyZmG9aGnG w7b1QlsCvdm2KByqqge93HHqOkFpeS3dymsr9Qw5hD6f4Z5gnu8VJKY5bB/RCUNvvmeh dtny5ewHawsp7WggpDYSigUcV7XO8ScbLi59BADUk/hOp5Iiu0QZ24ZSYA38xk5Rsfud raHeEsYGSAjHV5I77BYjjFDFfWDK38MgGSZIJg2vffUYY424ts6UJWyihxYh7Dkh8ERd jEsg== X-Gm-Message-State: AElRT7FNvIFIidtBMPGLRl2sSP/TXuTMINm2EtleTylup4C2pqMO5JMg SH5zOSkkYOQVJWY80mvVhao/GQ== X-Google-Smtp-Source: AIpwx4//8SYurgHmRY00Z4chTlrdkrtQh3EjzNWXnDB2ZjZy8de7klTXk3BwXn49s0gwxf5N5lMWuQ== X-Received: by 10.129.125.86 with SMTP id y83mr2958508ywc.371.1522264114559; Wed, 28 Mar 2018 12:08:34 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id z6sm1621054ywb.95.2018.03.28.12.08.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Mar 2018 12:08:34 -0700 (PDT) From: Sean Paul To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 3/6] drm/msm: Mark the crtc->state->event consumed Date: Wed, 28 Mar 2018 15:06:49 -0400 Message-Id: <20180328190657.218661-4-seanpaul@chromium.org> X-Mailer: git-send-email 2.17.0.rc1.321.gba9d0f2565-goog In-Reply-To: <20180328190657.218661-1-seanpaul@chromium.org> References: <20180328190657.218661-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: linux-kernel@vger.kernel.org, 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 Cc: Jeykumar Sankaran Signed-off-by: Sean Paul Reviewed-by: Archit Taneja --- 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); /*