Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	Matthew Brost <matthew.brost@intel.com>
Subject: [PATCH 2/4] drm/xe/guc: Drop redundant logs about invalid G2H length
Date: Tue,  5 Nov 2024 18:30:30 +0100	[thread overview]
Message-ID: <20241105173032.1947-3-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20241105173032.1947-1-michal.wajdeczko@intel.com>

We are now logging details of the failed G2H message (including
its length) at the GuC CT component. Drop now redundant log from
the GuC submit code.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/xe_guc_submit.c | 28 ++++++----------------------
 1 file changed, 6 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 7afcc243037c..4481890be941 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1884,15 +1884,12 @@ static void handle_sched_done(struct xe_guc *guc, struct xe_exec_queue *q,
 
 int xe_guc_sched_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
 {
-	struct xe_device *xe = guc_to_xe(guc);
 	struct xe_exec_queue *q;
 	u32 guc_id = msg[0];
 	u32 runnable_state = msg[1];
 
-	if (unlikely(len < 2)) {
-		drm_err(&xe->drm, "Invalid length %u", len);
+	if (unlikely(len < 2))
 		return -EPROTO;
-	}
 
 	q = g2h_exec_queue_lookup(guc, guc_id);
 	if (unlikely(!q))
@@ -1926,14 +1923,11 @@ static void handle_deregister_done(struct xe_guc *guc, struct xe_exec_queue *q)
 
 int xe_guc_deregister_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
 {
-	struct xe_device *xe = guc_to_xe(guc);
 	struct xe_exec_queue *q;
 	u32 guc_id = msg[0];
 
-	if (unlikely(len < 1)) {
-		drm_err(&xe->drm, "Invalid length %u", len);
+	if (unlikely(len < 1))
 		return -EPROTO;
-	}
 
 	q = g2h_exec_queue_lookup(guc, guc_id);
 	if (unlikely(!q))
@@ -1955,14 +1949,11 @@ int xe_guc_deregister_done_handler(struct xe_guc *guc, u32 *msg, u32 len)
 int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len)
 {
 	struct xe_gt *gt = guc_to_gt(guc);
-	struct xe_device *xe = guc_to_xe(guc);
 	struct xe_exec_queue *q;
 	u32 guc_id = msg[0];
 
-	if (unlikely(len < 1)) {
-		drm_err(&xe->drm, "Invalid length %u", len);
+	if (unlikely(len < 1))
 		return -EPROTO;
-	}
 
 	q = g2h_exec_queue_lookup(guc, guc_id);
 	if (unlikely(!q))
@@ -2002,10 +1993,8 @@ int xe_guc_error_capture_handler(struct xe_guc *guc, u32 *msg, u32 len)
 {
 	u32 status;
 
-	if (unlikely(len != XE_GUC_ACTION_STATE_CAPTURE_NOTIFICATION_DATA_LEN)) {
-		xe_gt_dbg(guc_to_gt(guc), "Invalid length %u", len);
+	if (unlikely(len != XE_GUC_ACTION_STATE_CAPTURE_NOTIFICATION_DATA_LEN))
 		return -EPROTO;
-	}
 
 	status = msg[0] & XE_GUC_STATE_CAPTURE_EVENT_STATUS_MASK;
 	if (status == XE_GUC_STATE_CAPTURE_EVENT_STATUS_NOSPACE)
@@ -2020,14 +2009,11 @@ int xe_guc_exec_queue_memory_cat_error_handler(struct xe_guc *guc, u32 *msg,
 					       u32 len)
 {
 	struct xe_gt *gt = guc_to_gt(guc);
-	struct xe_device *xe = guc_to_xe(guc);
 	struct xe_exec_queue *q;
 	u32 guc_id = msg[0];
 
-	if (unlikely(len < 1)) {
-		drm_err(&xe->drm, "Invalid length %u", len);
+	if (unlikely(len < 1))
 		return -EPROTO;
-	}
 
 	q = g2h_exec_queue_lookup(guc, guc_id);
 	if (unlikely(!q))
@@ -2052,10 +2038,8 @@ int xe_guc_exec_queue_reset_failure_handler(struct xe_guc *guc, u32 *msg, u32 le
 	u8 guc_class, instance;
 	u32 reason;
 
-	if (unlikely(len != 3)) {
-		drm_err(&xe->drm, "Invalid length %u", len);
+	if (unlikely(len != 3))
 		return -EPROTO;
-	}
 
 	guc_class = msg[0];
 	instance = msg[1];
-- 
2.43.0


  parent reply	other threads:[~2024-11-05 17:30 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05 17:30 [PATCH 0/4] GuC: Improve handling of the malformed G2H Michal Wajdeczko
2024-11-05 17:30 ` [PATCH 1/4] drm/xe/guc: Log content of the failed G2H message Michal Wajdeczko
2024-11-05 19:30   ` Matthew Brost
2024-11-05 17:30 ` Michal Wajdeczko [this message]
2024-11-05 19:31   ` [PATCH 2/4] drm/xe/guc: Drop redundant logs about invalid G2H length Matthew Brost
2024-11-05 17:30 ` [PATCH 3/4] drm/xe/guc: Don't read data from G2H prior to length check Michal Wajdeczko
2024-11-05 19:36   ` Matthew Brost
2024-11-05 20:01     ` Michal Wajdeczko
2024-11-06  1:32       ` Matthew Brost
2024-11-05 17:30 ` [PATCH 4/4] drm/xe/guc: Don't treat GuC generic CAT error as protocol error Michal Wajdeczko
2024-11-05 20:13   ` Michal Wajdeczko
2024-11-05 20:45   ` [PATCH v2 " Michal Wajdeczko
2024-11-06  1:24     ` Matthew Brost
2024-11-05 17:38 ` ✓ CI.Patch_applied: success for GuC: Improve handling of the malformed G2H Patchwork
2024-11-05 17:38 ` ✓ CI.checkpatch: " Patchwork
2024-11-05 17:39 ` ✓ CI.KUnit: " Patchwork
2024-11-05 17:52 ` ✓ CI.Build: " Patchwork
2024-11-05 17:54 ` ✓ CI.Hooks: " Patchwork
2024-11-05 17:56 ` ✓ CI.checksparse: " Patchwork
2024-11-05 18:37 ` ✓ CI.BAT: " Patchwork
2024-11-05 20:51 ` ✓ CI.Patch_applied: success for GuC: Improve handling of the malformed G2H (rev2) Patchwork
2024-11-05 20:52 ` ✓ CI.checkpatch: " Patchwork
2024-11-05 20:53 ` ✓ CI.KUnit: " Patchwork
2024-11-05 21:04 ` ✓ CI.Build: " Patchwork
2024-11-05 21:07 ` ✓ CI.Hooks: " Patchwork
2024-11-05 21:08 ` ✓ CI.checksparse: " Patchwork
2024-11-05 21:36 ` ✓ CI.BAT: " Patchwork
2024-11-06 22:55 ` ✗ CI.FULL: failure for GuC: Improve handling of the malformed G2H Patchwork
2024-11-07  1:06 ` ✗ CI.FULL: failure for GuC: Improve handling of the malformed G2H (rev2) Patchwork
2024-11-07  9:21   ` Michal Wajdeczko

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=20241105173032.1947-3-michal.wajdeczko@intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    /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