Skip to content

Commit

Permalink
drm/asahi: workqueue: Tweak some debug logs
Browse files Browse the repository at this point in the history
Silence some logs that are possible and harmless in rare cases, add more
debug to another log that is questionable.

Signed-off-by: Asahi Lina <[email protected]>
  • Loading branch information
asahilina committed Jul 17, 2024
1 parent 474b75c commit 01f6f6f
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions drivers/gpu/drm/asahi/workqueue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,16 @@ impl Job::ver {
} else if let Some(work) = inner.pending.first() {
Some(work.get_fence())
} else {
pr_err!("WorkQueue: Cannot submit, but queue is empty?\n");
pr_err!(
"WorkQueue: Cannot submit, but queue is empty? {} > {}, {} > {} (pend={} ls={:#x?} lc={:#x?})\n",
inner.free_slots(),
self.event_count,
inner.free_space(),
self.pending.len(),
inner.pending.len(),
inner.last_submitted,
inner.last_completed,
);
None
}
}
Expand Down Expand Up @@ -739,7 +748,11 @@ impl WorkQueue for WorkQueue::ver {
let event = inner.event.as_ref();
let value = match event {
None => {
pr_err!("WorkQueue: signal() called but no event?\n");
mod_pr_debug!("WorkQueue: signal() called but no event?\n");

if inner.pending_jobs > 0 || !inner.pending.is_empty() {
pr_crit!("WorkQueue: signal() called with no event and pending jobs.\n");
}
return true;
}
Some(event) => event.0.current(),
Expand Down Expand Up @@ -836,7 +849,11 @@ impl WorkQueue for WorkQueue::ver {
let mut inner = self.inner.lock();

if inner.event.is_none() {
pr_err!("WorkQueue: signal_fault() called but no event?\n");
mod_pr_debug!("WorkQueue: signal_fault() called but no event?\n");

if inner.pending_jobs > 0 || !inner.pending.is_empty() {
pr_crit!("WorkQueue: signal_fault() called with no event and pending jobs.\n");
}
return;
}

Expand Down Expand Up @@ -865,7 +882,11 @@ impl WorkQueue for WorkQueue::ver {
let mut inner = self.inner.lock();

if inner.event.is_none() {
pr_err!("WorkQueue: fail_all() called but no event?\n");
mod_pr_debug!("WorkQueue: fail_all() called but no event?\n");

if inner.pending_jobs > 0 || !inner.pending.is_empty() {
pr_crit!("WorkQueue: fail_all() called with no event and pending jobs.\n");
}
return;
}

Expand Down

0 comments on commit 01f6f6f

Please sign in to comment.