Skip to contentSkip to conversation

drm/i915: fix the dequeue logic for single_port_submission context

PATCH Superseded Min He 3 participants 6 messages Nov 16, 2016

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Min He

author
#0 lore raw

PATCH 1/1 drm/i915: fix the dequeue logic for single_port_submission context

For a singl_port_submission context, it can only be submitted to port 0, and there shouldn't be any other context in port 1 at the same time. This patch is to implement the correct logic in execlists_dequeue.

---
 drivers/gpu/drm/i915/intel_lrc.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +7 -3
index f50feaa..be83e8c 100644
@@ -424,9 +424,6 @@ static bool can_merge_ctx(const struct i915_gem_context *prev,
 	if (prev != next)
 		return false;
 
-	if (ctx_single_port_submission(prev))
-		return false;
-
 	return true;
 }
 
@@ -477,6 +474,13 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
 		struct drm_i915_gem_request *cursor =
 			rb_entry(rb, typeof(*cursor), priotree.node);
 
+		/* If last ctx is single_submission, it means we can only
+		 * submit this context in port 0, and cannot submit another
+		 * context in port 1 at the same time. So we will break here
+		 * in this situation.
+		 */
+		if (last && ctx_single_port_submission(last->ctx))
+			break;
 		/* Can we combine this request with the current port? It has to
 		 * be the same context/ringbuffer and not have any exceptions
 		 * (e.g. GVT saying never to combine contexts).
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

✓ Fi.CI.BAT: success for drm/i915: fix the dequeue logic for single_port_submission context

== Series Details ==

== Series Details ==

Series: drm/i915: fix the dequeue logic for single_port_submission context
URL : https://patchwork.freedesktop.org/series/15391/
State : success

== Summary ==

Series 15391v1 drm/i915: fix the dequeue logic for single_port_submission context
https://patchwork.freedesktop.org/api/1.0/series/15391/revisions/1/mbox/

fi-bdw-5557u     total:244  pass:229  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:244  pass:204  dwarn:0   dfail:0   fail:0   skip:40 
fi-bxt-t5700     total:244  pass:216  dwarn:0   dfail:0   fail:0   skip:28 
fi-byt-j1900     total:244  pass:216  dwarn:0   dfail:0   fail:0   skip:28 
fi-byt-n2820     total:244  pass:212  dwarn:0   dfail:0   fail:0   skip:32 
fi-hsw-4770      total:244  pass:224  dwarn:0   dfail:0   fail:0   skip:20 
fi-hsw-4770r     total:244  pass:224  dwarn:0   dfail:0   fail:0   skip:20 
fi-ilk-650       total:244  pass:191  dwarn:0   dfail:0   fail:0   skip:53 
fi-ivb-3520m     total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-ivb-3770      total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-kbl-7200u     total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-skl-6260u     total:244  pass:230  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:244  pass:223  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6700k     total:244  pass:222  dwarn:1   dfail:0   fail:0   skip:21 
fi-snb-2520m     total:244  pass:212  dwarn:0   dfail:0   fail:0   skip:32 
fi-snb-2600      total:244  pass:211  dwarn:0   dfail:0   fail:0   skip:33 

a68195b8144bca52c6fe1aa1e541a2ff14bf984e drm-intel-nightly: 2016y-11m-16d-05h-46m-49s UTC integration manifest a1846f4 drm/i915: fix the dequeue logic for single_port_submission context

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3010/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Min He
Quoted 3 lines · Min He

For a singl_port_submission context, it can only be submitted to port 0, and there shouldn't be any other context in port 1 at the same time. This patch is to implement the correct logic in execlists_dequeue.

There's a simpler fix. (Other than fixing the root cause of the bug in gvt.)
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author
#3 lore raw
Quoted 9 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Wednesday, November 16, 2016 2:52 PM
To: He, Min <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix the dequeue logic for single_port_submission context

Quoted 7 lines
Quoted 3 lines · Min He

For a singl_port_submission context, it can only be submitted to port 0, and there shouldn't be any other context in port 1 at the same time. This patch is to implement the correct logic in execlists_dequeue.

There's a simpler fix. (Other than fixing the root cause of the bug in gvt.)

Can you describe this simpler fix? Thanks.

Quoted 4 lines

-Chris

--
Chris Wilson, Intel Open Source Technology Centre

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
Quoted 9 lines · Min
Quoted 9 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Wednesday, November 16, 2016 2:52 PM
To: He, Min <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix the dequeue logic for single_port_submission context

Quoted 8 lines
Quoted 7 lines · Min He
Quoted 3 lines

For a singl_port_submission context, it can only be submitted to port 0, and there shouldn't be any other context in port 1 at the same time. This patch is to implement the correct logic in execlists_dequeue.

There's a simpler fix. (Other than fixing the root cause of the bug in gvt.)

Can you describe this simpler fix? Thanks.

Instead of changing the flow of the logic, add the break inside the cannot merge loop. Then you don't have multiple "cannot merge" questions.

Also, my preferred solution would be to remove the gvt hacks that are impacting other users.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author
#5 lore raw
Quoted 25 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Wednesday, November 16, 2016 3:07 PM
To: He, Min <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix the dequeue logic for single_port_submission context

Quoted 14 lines · Min
Quoted 14 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Wednesday, November 16, 2016 2:52 PM
To: He, Min <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] [PATCH] drm/i915: fix the dequeue logic for single_port_submission context

Quoted 3 lines · Min He

For a singl_port_submission context, it can only be submitted to port 0, and there shouldn't be any other context in port 1 at the same time. This patch is to implement the correct logic in execlists_dequeue.

Quoted 7 lines
Quoted 3 lines
Quoted 2 lines

There's a simpler fix. (Other than fixing the root cause of the bug in gvt.)

Can you describe this simpler fix? Thanks.

Instead of changing the flow of the logic, add the break inside the cannot merge loop. Then you don't have multiple "cannot merge" questions.

Thanks, will send out a v2 patch.

Quoted 7 lines

Also, my preferred solution would be to remove the gvt hacks that are impacting other users.
-Chris

--
Chris Wilson, Intel Open Source Technology Centre

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx