From patchwork Wed Apr 4 16:40:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10322911 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 DBC9960390 for ; Wed, 4 Apr 2018 16:41:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBB7628F7E for ; Wed, 4 Apr 2018 16:41:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF2BE28F80; Wed, 4 Apr 2018 16:41:28 +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 7C9BC28F7E for ; Wed, 4 Apr 2018 16:41:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 283FC6E4EB; Wed, 4 Apr 2018 16:41:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yb0-x241.google.com (mail-yb0-x241.google.com [IPv6:2607:f8b0:4002:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6B43C89622 for ; Wed, 4 Apr 2018 16:40:56 +0000 (UTC) Received: by mail-yb0-x241.google.com with SMTP id e5-v6so6259388ybq.13 for ; Wed, 04 Apr 2018 09:40:56 -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=K/jMJOMSHXq0bNbYPjYIx0lo6rFsQxQZt0xhHVN1HFs=; b=TnPffYzhiAiM0Fmnp3fmM0jS0FgbJ2iynGzAdWgyTT2Ej9p5LdMQ86M0Nbqdubifvs jXd4sO3HLGrkT5Ddjrk7tsvE/c9NoY5U6GExiX9ncBdN/JToVbjE7JePvYJuLMxef5DQ 4OGPZ14Zxs2QGaRk7XDVnE9eOkzeDob/zjfqI= 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=K/jMJOMSHXq0bNbYPjYIx0lo6rFsQxQZt0xhHVN1HFs=; b=TjeOQ3zHt4tpf49qioUBKMyW+C70xg0CqhBIOgrptVnVqAR4fKqp7CZ43blodHhyZt kwbrukNCvwt/GYZNyC2ivPEABuEagTHFj+WUQZ2w9jphs1HK39EdfKiziI2TCbvXjKEH TZcH+e5VnFnpVHnng3oAtnnAXy7Cgdv1jQhTix8BiH5QqybUBF4eYdFpb24L4WrJtQKD +GIvAtEzN5rPq25GEEX3wG9A0qgxJlXge2yV7VXx/yBophXlV+XJEbHZrqPgWi7oMo+y 6/BMVRPi65bUPNWcvA2fviqrgdmAmH4FNVfzwNqOqmUe6TEmMnEtRYfK6IDGEQGaX8K4 o4mQ== X-Gm-Message-State: ALQs6tCG/JtcG7Kcge+Ca8M9KbtOeB8nX16h/6iV7L2/uHdTmrvjf9+A kVTex6dzac9HdTI2dLB9eTxe5A== X-Google-Smtp-Source: AIpwx48m6LMLP8b+PJzSJNFfsQ5Vq/wMDz2scH2HzGtlYh5OBtB5EQVLHnuHk7lpAvGbE4EkzRfXvQ== X-Received: by 10.129.230.3 with SMTP id u3mr2512475ywl.448.1522860055685; Wed, 04 Apr 2018 09:40:55 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id p124sm2221027ywf.20.2018.04.04.09.40.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Apr 2018 09:40:55 -0700 (PDT) From: Sean Paul To: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v4 6/9] drm/msm: Mark the crtc->state->event consumed Date: Wed, 4 Apr 2018 12:40:45 -0400 Message-Id: <20180404164048.42126-7-seanpaul@chromium.org> X-Mailer: git-send-email 2.17.0.484.g0c8726318c-goog In-Reply-To: <20180404164048.42126-1-seanpaul@chromium.org> References: <20180404164048.42126-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 Changes in v4: - None 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); /*