Skip to content

Commit 8491b0e

Browse files
committed
drm/xe/snapshot: Remove drm_err on guc alloc failures
The kernel will complain loudly if allocation fails, no need to do it ourselves. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Francois Dugast <francois.dugast@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240221133024.898315-1-maarten.lankhorst@linux.intel.com
1 parent bb619d7 commit 8491b0e

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

drivers/gpu/drm/xe/xe_guc_submit.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,18 +1794,14 @@ struct xe_guc_submit_exec_queue_snapshot *
17941794
xe_guc_exec_queue_snapshot_capture(struct xe_sched_job *job)
17951795
{
17961796
struct xe_exec_queue *q = job->q;
1797-
struct xe_guc *guc = exec_queue_to_guc(q);
1798-
struct xe_device *xe = guc_to_xe(guc);
17991797
struct xe_gpu_scheduler *sched = &q->guc->sched;
18001798
struct xe_guc_submit_exec_queue_snapshot *snapshot;
18011799
int i;
18021800

18031801
snapshot = kzalloc(sizeof(*snapshot), GFP_ATOMIC);
18041802

1805-
if (!snapshot) {
1806-
drm_err(&xe->drm, "Skipping GuC Engine snapshot entirely.\n");
1803+
if (!snapshot)
18071804
return NULL;
1808-
}
18091805

18101806
snapshot->guc.id = q->guc->id;
18111807
memcpy(&snapshot->name, &q->name, sizeof(snapshot->name));
@@ -1821,9 +1817,7 @@ xe_guc_exec_queue_snapshot_capture(struct xe_sched_job *job)
18211817
snapshot->lrc = kmalloc_array(q->width, sizeof(struct lrc_snapshot),
18221818
GFP_ATOMIC);
18231819

1824-
if (!snapshot->lrc) {
1825-
drm_err(&xe->drm, "Skipping GuC Engine LRC snapshot.\n");
1826-
} else {
1820+
if (snapshot->lrc) {
18271821
for (i = 0; i < q->width; ++i) {
18281822
struct xe_lrc *lrc = q->lrc + i;
18291823

@@ -1851,9 +1845,7 @@ xe_guc_exec_queue_snapshot_capture(struct xe_sched_job *job)
18511845
sizeof(struct pending_list_snapshot),
18521846
GFP_ATOMIC);
18531847

1854-
if (!snapshot->pending_list) {
1855-
drm_err(&xe->drm, "Skipping GuC Engine pending_list snapshot.\n");
1856-
} else {
1848+
if (snapshot->pending_list) {
18571849
struct xe_sched_job *job_iter;
18581850

18591851
i = 0;

0 commit comments

Comments
 (0)