Skip to contentSkip to conversation

drm/msm/mdp5: Fix wait-for-commit for cmd panels

PATCH Applied Iskren Chernev 5 participants 5 messages Jan 27, 2021 – Mar 1, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/msm/mdp5: Fix wait-for-commit for cmd panels

Before the offending commit in msm_atomic_commit_tail wait_flush was called once per frame, after the commit was submitted. After it wait_flush is also called at the beginning to ensure previous potentially async commits are done.

For cmd panels the source of wait_flush is a ping-pong irq notifying a completion. The completion needs to be notified with complete_all so multiple waiting parties (new async committers) can proceed.

Fixes 2d99ced787e3d ("drm/msm: async commit support")
---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c +1 -1
index 0c8f9f88301fa..f5d71b2740793 100644
@@ -1180,7 +1180,7 @@ static void mdp5_crtc_pp_done_irq(struct mdp_irq *irq, uint32_t irqstatus)
 	struct mdp5_crtc *mdp5_crtc = container_of(irq, struct mdp5_crtc,
 								pp_done);
 
-	complete(&mdp5_crtc->pp_completion);
+	complete_all(&mdp5_crtc->pp_completion);
 }
 
 static void mdp5_crtc_wait_for_pp_done(struct drm_crtc *crtc)

base-commit: 59fa6a163ffabc1bf25c5e0e33899e268a96d3cc

Signature · 1 line
2.30.0
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 5 lines · Iskren Chernev

Before the offending commit in msm_atomic_commit_tail wait_flush was called once per frame, after the commit was submitted. After it wait_flush is also called at the beginning to ensure previous potentially async commits are done.

Quoted 7 lines

For cmd panels the source of wait_flush is a ping-pong irq notifying a completion. The completion needs to be notified with complete_all so multiple waiting parties (new async committers) can proceed.

Fixes 2d99ced787e3d ("drm/msm: async commit support")

Nice job tracking down this fix!

Tested-by on v1 1/1
#2 lore raw
In reply to Iskren Chernev

Hi Iskren,

Quoted 5 lines · On Mittwoch, 27. Jänner 2021 16:24:40 CET Iskren Chernev wrote:

Before the offending commit in msm_atomic_commit_tail wait_flush was called once per frame, after the commit was submitted. After it wait_flush is also called at the beginning to ensure previous potentially async commits are done.

Quoted 8 lines

For cmd panels the source of wait_flush is a ping-pong irq notifying a completion. The completion needs to be notified with complete_all so multiple waiting parties (new async committers) can proceed.

Fixes 2d99ced787e3d ("drm/msm: async commit support")

---

I've tested this now on fairphone-fp2 and lge-nexus5-hammerhead, works great!

Regards
Luca

Tested-by on v1 1/1
#3 lore raw
In reply to Iskren Chernev
Quoted 5 lines · Iskren Chernev

Before the offending commit in msm_atomic_commit_tail wait_flush was called once per frame, after the commit was submitted. After it wait_flush is also called at the beginning to ensure previous potentially async commits are done.

Quoted 8 lines

For cmd panels the source of wait_flush is a ping-pong irq notifying a completion. The completion needs to be notified with complete_all so multiple waiting parties (new async committers) can proceed.

Fixes 2d99ced787e3d ("drm/msm: async commit support")

Tested on msm8974pro samsung-klte, finally got 60 fps instead of 13 in kmscube.

#4 lore raw
In reply to Iskren Chernev
This patch was applied to qcom/linux.git (refs/heads/for-next):

Hello:

This patch was applied to qcom/linux.git (refs/heads/for-next):

Quoted 10 lines · On Wed, 27 Jan 2021 17:24:40 +0200 you wrote:

Before the offending commit in msm_atomic_commit_tail wait_flush was called once per frame, after the commit was submitted. After it wait_flush is also called at the beginning to ensure previous potentially async commits are done.

For cmd panels the source of wait_flush is a ping-pong irq notifying a completion. The completion needs to be notified with complete_all so multiple waiting parties (new async committers) can proceed.

[...]

Here is the summary with links:
- drm/msm/mdp5: Fix wait-for-commit for cmd panels

    https://git.kernel.org/qcom/c/68e4f01fddb4

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html