Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Subject: [PATCH v5 1/9] drm/xe/snapshot: Remove drm_err on guc alloc failures
Date: Wed, 21 Feb 2024 14:30:16 +0100	[thread overview]
Message-ID: <20240221133024.898315-1-maarten.lankhorst@linux.intel.com> (raw)

The kernel will complain loudly if allocation fails, no need to do it
ourselves.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/xe/xe_guc_submit.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 3ac51162cfa72..ff77bc8da1b27 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1794,18 +1794,14 @@ struct xe_guc_submit_exec_queue_snapshot *
 xe_guc_exec_queue_snapshot_capture(struct xe_sched_job *job)
 {
 	struct xe_exec_queue *q = job->q;
-	struct xe_guc *guc = exec_queue_to_guc(q);
-	struct xe_device *xe = guc_to_xe(guc);
 	struct xe_gpu_scheduler *sched = &q->guc->sched;
 	struct xe_guc_submit_exec_queue_snapshot *snapshot;
 	int i;
 
 	snapshot = kzalloc(sizeof(*snapshot), GFP_ATOMIC);
 
-	if (!snapshot) {
-		drm_err(&xe->drm, "Skipping GuC Engine snapshot entirely.\n");
+	if (!snapshot)
 		return NULL;
-	}
 
 	snapshot->guc.id = q->guc->id;
 	memcpy(&snapshot->name, &q->name, sizeof(snapshot->name));
@@ -1821,9 +1817,7 @@ xe_guc_exec_queue_snapshot_capture(struct xe_sched_job *job)
 	snapshot->lrc = kmalloc_array(q->width, sizeof(struct lrc_snapshot),
 				      GFP_ATOMIC);
 
-	if (!snapshot->lrc) {
-		drm_err(&xe->drm, "Skipping GuC Engine LRC snapshot.\n");
-	} else {
+	if (snapshot->lrc) {
 		for (i = 0; i < q->width; ++i) {
 			struct xe_lrc *lrc = q->lrc + i;
 
@@ -1851,9 +1845,7 @@ xe_guc_exec_queue_snapshot_capture(struct xe_sched_job *job)
 					       sizeof(struct pending_list_snapshot),
 					       GFP_ATOMIC);
 
-	if (!snapshot->pending_list) {
-		drm_err(&xe->drm, "Skipping GuC Engine pending_list snapshot.\n");
-	} else {
+	if (snapshot->pending_list) {
 		struct xe_sched_job *job_iter;
 
 		i = 0;
-- 
2.43.0


             reply	other threads:[~2024-02-21 13:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 13:30 Maarten Lankhorst [this message]
2024-02-21 13:30 ` [PATCH v5 2/9] drm/xe: Clear all snapshot members after deleting coredump Maarten Lankhorst
2024-02-21 15:09   ` Francois Dugast
2024-02-21 13:30 ` [PATCH v5 3/9] drm/xe: Add uapi for dumpable bos Maarten Lankhorst
2024-02-21 13:30 ` [PATCH v5 4/9] drm/xe: Annotate each dumpable vma as such Maarten Lankhorst
2024-02-21 13:30 ` [PATCH v5 5/9] drm/xe: Add vm snapshot mutex for easily taking a vm snapshot during devcoredump Maarten Lankhorst
2024-02-21 13:30 ` [PATCH v5 6/9] drm/xe: Implement VM snapshot support for BO's and userptr Maarten Lankhorst
2024-02-21 13:30 ` [PATCH v5 7/9] drm/xe: Move lrc snapshot capturing to xe_lrc.c Maarten Lankhorst
2024-02-21 17:56   ` Souza, Jose
2024-02-21 19:27     ` Maarten Lankhorst
2024-02-21 13:30 ` [PATCH v5 8/9] drm/xe: Add infrastructure for delayed LRC capture Maarten Lankhorst
2024-02-21 13:30 ` [PATCH v5 9/9] drm/xe: Implement capture of HWSP and HWCTX Maarten Lankhorst
2024-02-21 17:26   ` Souza, Jose
2024-02-21 17:29     ` Maarten Lankhorst
2024-02-21 17:44       ` Souza, Jose
2024-02-21 17:45   ` Souza, Jose
2024-02-21 17:56   ` Souza, Jose
2024-02-22 15:30     ` Souza, Jose
2024-02-21 13:37 ` ✓ CI.Patch_applied: success for series starting with [v5,1/9] drm/xe/snapshot: Remove drm_err on guc alloc failures Patchwork
2024-02-21 13:38 ` ✗ CI.checkpatch: warning " Patchwork
2024-02-21 13:40 ` ✓ CI.KUnit: success " Patchwork
2024-02-21 13:52 ` ✓ CI.Build: " Patchwork
2024-02-21 13:53 ` ✓ CI.Hooks: " Patchwork
2024-02-21 13:54 ` ✓ CI.checksparse: " Patchwork
2024-02-21 14:02 ` [PATCH v5 1/9] " Francois Dugast
2024-02-21 14:30 ` ✓ CI.BAT: success for series starting with [v5,1/9] " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240221133024.898315-1-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox