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: 10788957 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 EA83D13BF for ; Wed, 30 Jan 2019 16:32:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D890C2F75E for ; Wed, 30 Jan 2019 16:32:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6DAD2FF25; Wed, 30 Jan 2019 16:32: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 623702FF99 for ; Wed, 30 Jan 2019 16:32:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731848AbfA3Qc1 (ORCPT ); Wed, 30 Jan 2019 11:32:27 -0500 Received: from mail-yw1-f65.google.com ([209.85.161.65]:42170 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732035AbfA3QcW (ORCPT ); Wed, 30 Jan 2019 11:32:22 -0500 Received: by mail-yw1-f65.google.com with SMTP id x2so42994ywc.9 for ; Wed, 30 Jan 2019 08:32:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FmCMFoBkLJvTwDnDOriYcX6p760bm+FW0LMmKXTvc14=; b=KNmS8S/QXfMdUYrGtLxka7Kkk6/XfZvFsCKjlQrlfHnam8zUd2YgcGwWuGo4T5tkhQ Oqyy0uxVNInp+5uQJLi9ZbiydKqmXTYaS/OVDtZ8+WcJXJxNHrKeml6YbAGbabe4GAf5 QAw/7uD/oNTwnI3VFSeq8yQt4gUpAH1eP9EFTmhZh9yc54/NIy1jemqERwIbKH2h/4+X ogGT8vDkVYXXJj15HUzGvNhk2aTIvcJf5ajPHBNacrt/yfFpe0+DNBIG/YNvzhsHf4j4 bfwmR4+fT/+Vh64/FkYazZ/OyKLp2QUAenHKERunYUSp/GQ2DJ7k2ctFfjM2DeV37QyN DtNQ== 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=hVmZ/ubrbBAFjg3k1AllgeXUPJGMhauhgL6jWcsIwdQKcorS94rcTEd9eFM+A6pIGx CTkQWvO440PtM9xne1pC/Qg5Fp3jQ/WYOlQyIxjjDLM8o3Mxrknd/hCJkBRkoYBLcZRC GeENUwU3fsXY38VXB1RRuNkile/6IvUBXOqfhLcym+sQs4k7Xm270j9NXN5ej1V6/GKc 5S4HLtWJAf7zHH8WZfVLo2QMig8BdlaqAsG5MBIKsM8zbPZyQHty+6s+nhC3UTjtIWht AOC7YjDlnCGhTryWUcLsZneX3aeYPyMxwX2xN5O0Tr6zL2u1Ux0uJoBNg1F7yFSFE6EZ CnOQ== X-Gm-Message-State: AJcUuke4sTRm03V5tZvNJAaRKlOdXM4EcZ/XE8LRBQHTcAweWPQ8SWT4 K9YpnLNU2oAFjWFaiiGfj5K66w== 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 Cc: Sean Paul , Rob Clark , linux-arm-msm@vger.kernel.org, dri-devel@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 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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,