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>
Subject: [PATCH 1/4] drm/xe: Prefer GT oriented messages in xe_force_wake.c
Date: Mon, 10 Jun 2024 20:37:54 +0200	[thread overview]
Message-ID: <20240610183757.1812-2-michal.wajdeczko@intel.com> (raw)
In-Reply-To: <20240610183757.1812-1-michal.wajdeczko@intel.com>

If possible, we should prefer xe_gt_notice() over drm_notice().
While at it, undo line split of fw_to_gt() function signature.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/xe/xe_force_wake.c | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_force_wake.c b/drivers/gpu/drm/xe/xe_force_wake.c
index b2d385daff4b..2497f0f65aa0 100644
--- a/drivers/gpu/drm/xe/xe_force_wake.c
+++ b/drivers/gpu/drm/xe/xe_force_wake.c
@@ -10,22 +10,16 @@
 #include "regs/xe_gt_regs.h"
 #include "regs/xe_reg_defs.h"
 #include "xe_gt.h"
+#include "xe_gt_printk.h"
 #include "xe_mmio.h"
 
 #define XE_FORCE_WAKE_ACK_TIMEOUT_MS	50
 
-static struct xe_gt *
-fw_to_gt(struct xe_force_wake *fw)
+static struct xe_gt *fw_to_gt(struct xe_force_wake *fw)
 {
 	return fw->gt;
 }
 
-static struct xe_device *
-fw_to_xe(struct xe_force_wake *fw)
-{
-	return gt_to_xe(fw_to_gt(fw));
-}
-
 static void domain_init(struct xe_force_wake_domain *domain,
 			enum xe_force_wake_domain_id id,
 			struct xe_reg reg, struct xe_reg ack)
@@ -135,7 +129,6 @@ static int domain_sleep_wait(struct xe_gt *gt,
 int xe_force_wake_get(struct xe_force_wake *fw,
 		      enum xe_force_wake_domains domains)
 {
-	struct xe_device *xe = fw_to_xe(fw);
 	struct xe_gt *gt = fw_to_gt(fw);
 	struct xe_force_wake_domain *domain;
 	enum xe_force_wake_domains tmp, woken = 0;
@@ -153,8 +146,8 @@ int xe_force_wake_get(struct xe_force_wake *fw,
 		ret = domain_wake_wait(gt, domain);
 		ret2 |= ret;
 		if (ret)
-			drm_notice(&xe->drm, "Force wake domain (%d) failed to ack wake, ret=%d\n",
-				   domain->id, ret);
+			xe_gt_notice(gt, "Force wake domain (%d) failed to ack wake, ret=%d\n",
+				     domain->id, ret);
 	}
 	fw->awake_domains |= woken;
 	spin_unlock_irqrestore(&fw->lock, flags);
@@ -165,7 +158,6 @@ int xe_force_wake_get(struct xe_force_wake *fw,
 int xe_force_wake_put(struct xe_force_wake *fw,
 		      enum xe_force_wake_domains domains)
 {
-	struct xe_device *xe = fw_to_xe(fw);
 	struct xe_gt *gt = fw_to_gt(fw);
 	struct xe_force_wake_domain *domain;
 	enum xe_force_wake_domains tmp, sleep = 0;
@@ -183,8 +175,8 @@ int xe_force_wake_put(struct xe_force_wake *fw,
 		ret = domain_sleep_wait(gt, domain);
 		ret2 |= ret;
 		if (ret)
-			drm_notice(&xe->drm, "Force wake domain (%d) failed to ack sleep, ret=%d\n",
-				   domain->id, ret);
+			xe_gt_notice(gt, "Force wake domain (%d) failed to ack sleep, ret=%d\n",
+				     domain->id, ret);
 	}
 	fw->awake_domains &= ~sleep;
 	spin_unlock_irqrestore(&fw->lock, flags);
-- 
2.43.0


  reply	other threads:[~2024-06-10 18:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-10 18:37 [PATCH 0/4] Prepare Xe force-wake code for VFs Michal Wajdeczko
2024-06-10 18:37 ` Michal Wajdeczko [this message]
2024-06-10 19:44   ` [PATCH 1/4] drm/xe: Prefer GT oriented messages in xe_force_wake.c Rodrigo Vivi
2024-06-10 18:37 ` [PATCH 2/4] drm/xe: Include additional info on failed force-wake operation Michal Wajdeczko
2024-06-10 19:47   ` Rodrigo Vivi
2024-06-10 18:37 ` [PATCH 3/4] drm/xe: Combine common force-wake code into helpers Michal Wajdeczko
2024-06-10 19:51   ` Rodrigo Vivi
2024-06-10 18:37 ` [PATCH 4/4] drm/xe/vf: Ignore force-wake requests if VF Michal Wajdeczko
2024-06-10 19:51   ` Rodrigo Vivi
2024-06-10 18:54 ` ✓ CI.Patch_applied: success for Prepare Xe force-wake code for VFs Patchwork
2024-06-10 18:54 ` ✓ CI.checkpatch: " Patchwork
2024-06-10 18:55 ` ✓ CI.KUnit: " Patchwork
2024-06-10 19:07 ` ✓ CI.Build: " Patchwork
2024-06-10 19:09 ` ✓ CI.Hooks: " Patchwork
2024-06-10 19:10 ` ✓ CI.checksparse: " Patchwork
2024-06-11  6:09 ` ✓ CI.Patch_applied: success for Prepare Xe force-wake code for VFs (rev2) Patchwork
2024-06-11  6:09 ` ✓ CI.checkpatch: " Patchwork
2024-06-11  6:10 ` ✓ CI.KUnit: " Patchwork
2024-06-11  6:22 ` ✓ CI.Build: " Patchwork
2024-06-11  6:24 ` ✗ CI.Hooks: failure " Patchwork
2024-06-11  6:25 ` ✓ CI.checksparse: success " Patchwork
2024-06-11  7:08 ` ✓ CI.BAT: " Patchwork
2024-06-11  8:45 ` ✓ CI.FULL: " 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=20240610183757.1812-2-michal.wajdeczko@intel.com \
    --to=michal.wajdeczko@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