From: Sean Paul <sean@poorly.run>
To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org
Cc: Sean Paul <seanpaul@chromium.org>,
Abhinav Kumar <abhinavk@codeaurora.org>
Subject: [PATCH v2 2/3] drm/msm: dpu: Only check flush register against pending flushes
Date: Tue, 30 Oct 2018 12:00:08 -0400 [thread overview]
Message-ID: <20181030160033.18464-2-sean@poorly.run> (raw)
In-Reply-To: <20181030160033.18464-1-sean@poorly.run>
From: Sean Paul <seanpaul@chromium.org>
There exists a case where a flush of a plane/dma may have been triggered
& started from an async commit. If that plane/dma is subsequently disabled
by the next commit, the flush register will continue to hold the flush
bit for the disabled plane. Since the bit remains active,
pending_kickoff_cnt will never decrement and we'll miss frame_done
events.
This patch limits the check of flush_register to include only those bits
which have been updated with the latest commit.
Changes in v2:
- None
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
index b3c68c4fcc8e..667f304c92ea 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
@@ -331,7 +331,7 @@ static void dpu_encoder_phys_vid_vblank_irq(void *arg, int irq_idx)
if (hw_ctl && hw_ctl->ops.get_flush_register)
flush_register = hw_ctl->ops.get_flush_register(hw_ctl);
- if (flush_register == 0)
+ if (!(flush_register & hw_ctl->ops.get_pending_flush(hw_ctl)))
new_cnt = atomic_add_unless(&phys_enc->pending_kickoff_cnt,
-1, 0);
spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags);
--
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-10-30 16:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 16:00 [PATCH v2 1/3] drm/msm: dpu: Mask inactive pending flushes Sean Paul
2018-10-30 16:00 ` Sean Paul [this message]
[not found] ` <20181030160033.18464-2-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-11-08 20:54 ` [PATCH v2 2/3] drm/msm: dpu: Only check flush register against " Jeykumar Sankaran
[not found] ` <20181030160033.18464-1-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-10-30 16:00 ` [PATCH v2 3/3] drm/msm: dpu: Make legacy cursor updates asynchronous Sean Paul
[not found] ` <20181030160033.18464-3-sean-p7yTbzM4H96eqtR555YLDQ@public.gmane.org>
2018-11-08 22:00 ` Jeykumar Sankaran
[not found] ` <0bb3272e248ad0a13fd8f8d863e7ed91-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-16 20:02 ` Sean Paul
2018-11-19 18:32 ` Jeykumar Sankaran
2018-11-08 21:03 ` [PATCH v2 1/3] drm/msm: dpu: Mask inactive pending flushes Jeykumar Sankaran
[not found] ` <984d4418ab48769e68084aeb4d3450e8-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-08 21:40 ` Sean Paul
2018-11-08 22:58 ` Jeykumar Sankaran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181030160033.18464-2-sean@poorly.run \
--to=sean@poorly.run \
--cc=abhinavk@codeaurora.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=seanpaul@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox