From patchwork Wed Jan 30 16:32:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10788955 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DFFD6746 for ; Wed, 30 Jan 2019 16:32:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA8812FED7 for ; Wed, 30 Jan 2019 16:32:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C83192FF52; Wed, 30 Jan 2019 16:32:24 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 3FE832FED7 for ; Wed, 30 Jan 2019 16:32:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2EBE893D5; Wed, 30 Jan 2019 16:32:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw1-xc42.google.com (mail-yw1-xc42.google.com [IPv6:2607:f8b0:4864:20::c42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2304E893D5 for ; Wed, 30 Jan 2019 16:32:22 +0000 (UTC) Received: by mail-yw1-xc42.google.com with SMTP id h193so58826ywc.4 for ; Wed, 30 Jan 2019 08:32:22 -0800 (PST) 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:mime-version :content-transfer-encoding; bh=FmCMFoBkLJvTwDnDOriYcX6p760bm+FW0LMmKXTvc14=; b=PmaRaBdOhuxw2ngfW6JTGFEjalB/b7xG9XAhHtUcW0WPixB9GJKlKCfdtnwdTrFpgM t6IWDwIFWqXDVsPAQnaTsoWstK0P4r/DhmZh/v8KHaf+thjOpdbHsREIUrbXzKwoloKp /H/vGgdmlie3rAo7pNrzJcKOrM/YP+Drt8jQMcRmcTysLBDf1JaYbNZkHxzCBgt6rBy7 y4PlhWlp0/ZhnpdypMdY8WgDsJRMhB2lyMRtWu+oTech2rUNFQO69+FDDjdgPZ63UpwM BK0WpOtchIZFMljprG6bUdMpXogEav6ozXoKGfnzN3Lo32dzy10KrfFGS4TZIGX/YU5Y WOJA== X-Gm-Message-State: AJcUukcO3SVqzINSV7058SGGk873LctWmz4FjpxX+V3JYy76vWop0Egv C3Lhaf9jhAt5pxQy2jJWZ2V4cA== X-Google-Smtp-Source: ALg8bN6B1DffHUQrUFWHQ9yPndoDmEyCB8fUp8ldbSp4L+0mJqWxZrylS/mch8t0Z99fXloQbCCtrg== X-Received: by 2002:a81:5f88:: with SMTP id t130mr30092266ywb.494.1548865941250; Wed, 30 Jan 2019 08:32:21 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id p11sm643738ywm.60.2019.01.30.08.32.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jan 2019 08:32:20 -0800 (PST) From: Sean Paul To: freedreno@lists.freedesktop.org Subject: [PATCH] drm/msm: dpu: Don't set frame_busy_mask for async updates Date: Wed, 30 Jan 2019 11:32:12 -0500 Message-Id: <20190130163220.138637-1-sean@poorly.run> X-Mailer: git-send-email 2.20.1.495.gaa96b0ce6b-goog MIME-Version: 1.0 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-arm-msm@vger.kernel.org, Sean Paul , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul The frame_busy mask is used in frame_done event handling, which is not invoked for async commits. So an async commit will leave the frame_busy mask populated after it completes and future commits will start with the busy mask incorrect. This showed up on disable after cursor move. I was hitting the "this should not happen" comment in the frame event worker since frame_busy was set, we queued the event, but there were no frames pending (since async also doesn't set that). Signed-off-by: Sean Paul Reviewed-by: Fritz Koenig --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 36158b7d99cd..1a81c4daabc9 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -1558,8 +1558,14 @@ static void _dpu_encoder_kickoff_phys(struct dpu_encoder_virt *dpu_enc, if (!ctl) continue; - if (phys->split_role != ENC_ROLE_SLAVE) + /* + * This is cleared in frame_done worker, which isn't invoked + * for async commits. So don't set this for async, since it'll + * roll over to the next commit. + */ + if (!async && phys->split_role != ENC_ROLE_SLAVE) set_bit(i, dpu_enc->frame_busy_mask); + if (!phys->ops.needs_single_flush || !phys->ops.needs_single_flush(phys)) _dpu_encoder_trigger_flush(&dpu_enc->base, phys, 0x0,