* [PATCH] drm/msm: dpu: Don't set frame_busy_mask for async updates
@ 2019-01-30 16:32 Sean Paul
2019-02-05 20:11 ` Fritz Koenig
0 siblings, 1 reply; 2+ messages in thread
From: Sean Paul @ 2019-01-30 16:32 UTC (permalink / raw)
To: freedreno; +Cc: linux-arm-msm, Sean Paul, dri-devel
From: Sean Paul <seanpaul@chromium.org>
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 <seanpaul@chromium.org>
---
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,
--
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/msm: dpu: Don't set frame_busy_mask for async updates
2019-01-30 16:32 [PATCH] drm/msm: dpu: Don't set frame_busy_mask for async updates Sean Paul
@ 2019-02-05 20:11 ` Fritz Koenig
0 siblings, 0 replies; 2+ messages in thread
From: Fritz Koenig @ 2019-02-05 20:11 UTC (permalink / raw)
To: Sean Paul; +Cc: Sean Paul, linux-arm-msm, freedreno, dri-devel
On Wed, Jan 30, 2019 at 8:32 AM Sean Paul <sean@poorly.run> wrote:
>
> From: Sean Paul <seanpaul@chromium.org>
>
> 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 <seanpaul@chromium.org>
> ---
> 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,
> --
> Sean Paul, Software Engineer, Google / Chromium OS
>
Reviewed-by: Fritz Koenig <frkoenig@google.com>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-05 20:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30 16:32 [PATCH] drm/msm: dpu: Don't set frame_busy_mask for async updates Sean Paul
2019-02-05 20:11 ` Fritz Koenig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.