Skip to contentSkip to conversation

drm/msm: dpu: Don't set frame_busy_mask for async updates

PATCH In review Sean Paul 2 participants 2 messages Jan 30, 2019 – Feb 5, 2019

Subsystems (3)
lore
Share & tools
lore

Sean Paul

author reviewer
#0 lore raw

PATCH 1/1 drm/msm: dpu: Don't set frame_busy_mask for async updates

From: Sean Paul <[email protected]>

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).

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +7 -1
index 36158b7d99cd..1a81c4daabc9 100644
@@ -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,
Signature · 6 lines
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 39 lines · Sean Paul

From: Sean Paul <[email protected]>

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).

---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +7 -2
index 36158b7d99cd..1a81c4daabc9 100644
@@ -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,
--
Quoted 2 lines

Sean Paul, Software Engineer, Google / Chromium OS

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel