Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Invert runnable_state / pending enable check and assert
@ 2024-06-13  2:34 Matthew Brost
  2024-06-13  2:39 ` ✗ CI.Patch_applied: failure for " Patchwork
  2024-06-13 18:23 ` [PATCH] " John Harrison
  0 siblings, 2 replies; 4+ messages in thread
From: Matthew Brost @ 2024-06-13  2:34 UTC (permalink / raw)
  To: intel-xe

Rather than checking for pending enable and asserting runnable_state ==
1 in sched done handler, invert these. This is more robust code taking
action based on the G2H message and asserting KMD tracking state is
correct.

Suggested-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_submit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 74552391dc5a..373447758a60 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1782,8 +1782,8 @@ static void handle_sched_done(struct xe_guc *guc, struct xe_exec_queue *q,
 {
 	trace_xe_exec_queue_scheduling_done(q);
 
-	if (exec_queue_pending_enable(q)) {
-		xe_gt_assert(guc_to_gt(guc), runnable_state == 1);
+	if (runnable_state == 1) {
+		xe_gt_assert(guc_to_gt(guc), exec_queue_pending_enable(q));
 
 		q->guc->resume_time = ktime_get();
 		clear_exec_queue_pending_enable(q);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* ✗ CI.Patch_applied: failure for drm/xe: Invert runnable_state / pending enable check and assert
  2024-06-13  2:34 [PATCH] drm/xe: Invert runnable_state / pending enable check and assert Matthew Brost
@ 2024-06-13  2:39 ` Patchwork
  2024-06-13 18:23 ` [PATCH] " John Harrison
  1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2024-06-13  2:39 UTC (permalink / raw)
  To: Matthew Brost; +Cc: intel-xe

== Series Details ==

Series: drm/xe: Invert runnable_state / pending enable check and assert
URL   : https://patchwork.freedesktop.org/series/134796/
State : failure

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: de4f2d210b33 drm-tip: 2024y-06m-12d-19h-26m-21s UTC integration manifest
=== git am output follows ===
error: patch failed: drivers/gpu/drm/xe/xe_guc_submit.c:1782
error: drivers/gpu/drm/xe/xe_guc_submit.c: patch does not apply
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Applying: drm/xe: Invert runnable_state / pending enable check and assert
Patch failed at 0001 drm/xe: Invert runnable_state / pending enable check and assert
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/xe: Invert runnable_state / pending enable check and assert
  2024-06-13  2:34 [PATCH] drm/xe: Invert runnable_state / pending enable check and assert Matthew Brost
  2024-06-13  2:39 ` ✗ CI.Patch_applied: failure for " Patchwork
@ 2024-06-13 18:23 ` John Harrison
  1 sibling, 0 replies; 4+ messages in thread
From: John Harrison @ 2024-06-13 18:23 UTC (permalink / raw)
  To: Matthew Brost, intel-xe

On 6/12/2024 19:34, Matthew Brost wrote:
> Rather than checking for pending enable and asserting runnable_state ==
> 1 in sched done handler, invert these. This is more robust code taking
> action based on the G2H message and asserting KMD tracking state is
> correct.
>
> Suggested-by: John Harrison <John.C.Harrison@Intel.com>
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>

> ---
>   drivers/gpu/drm/xe/xe_guc_submit.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> index 74552391dc5a..373447758a60 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -1782,8 +1782,8 @@ static void handle_sched_done(struct xe_guc *guc, struct xe_exec_queue *q,
>   {
>   	trace_xe_exec_queue_scheduling_done(q);
>   
> -	if (exec_queue_pending_enable(q)) {
> -		xe_gt_assert(guc_to_gt(guc), runnable_state == 1);
> +	if (runnable_state == 1) {
> +		xe_gt_assert(guc_to_gt(guc), exec_queue_pending_enable(q));
>   
>   		q->guc->resume_time = ktime_get();
>   		clear_exec_queue_pending_enable(q);


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] drm/xe: Invert runnable_state / pending enable check and assert
@ 2024-06-14  6:13 Matthew Brost
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Brost @ 2024-06-14  6:13 UTC (permalink / raw)
  To: intel-xe

Rather than checking for pending enable and asserting runnable_state ==
1 in sched done handler, invert these. This is more robust code taking
action based on the G2H message and asserting KMD tracking state is
correct.

Suggested-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>

---
 drivers/gpu/drm/xe/xe_guc_submit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 74552391dc5a..373447758a60 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1782,8 +1782,8 @@ static void handle_sched_done(struct xe_guc *guc, struct xe_exec_queue *q,
 {
 	trace_xe_exec_queue_scheduling_done(q);
 
-	if (exec_queue_pending_enable(q)) {
-		xe_gt_assert(guc_to_gt(guc), runnable_state == 1);
+	if (runnable_state == 1) {
+		xe_gt_assert(guc_to_gt(guc), exec_queue_pending_enable(q));
 
 		q->guc->resume_time = ktime_get();
 		clear_exec_queue_pending_enable(q);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-14  6:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-13  2:34 [PATCH] drm/xe: Invert runnable_state / pending enable check and assert Matthew Brost
2024-06-13  2:39 ` ✗ CI.Patch_applied: failure for " Patchwork
2024-06-13 18:23 ` [PATCH] " John Harrison
  -- strict thread matches above, loose matches on Subject: below --
2024-06-14  6:13 Matthew Brost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox