Commit afe12a05 authored by Michal Wajdeczko's avatar Michal Wajdeczko

drm/xe: Prefer GT oriented messages in xe_force_wake.c

If possible, we should prefer xe_gt_notice() over drm_notice().
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240611163537.1944-2-michal.wajdeczko@intel.com
parent 24d0d98a
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "regs/xe_gt_regs.h" #include "regs/xe_gt_regs.h"
#include "regs/xe_reg_defs.h" #include "regs/xe_reg_defs.h"
#include "xe_gt.h" #include "xe_gt.h"
#include "xe_gt_printk.h"
#include "xe_mmio.h" #include "xe_mmio.h"
#define XE_FORCE_WAKE_ACK_TIMEOUT_MS 50 #define XE_FORCE_WAKE_ACK_TIMEOUT_MS 50
...@@ -20,12 +21,6 @@ fw_to_gt(struct xe_force_wake *fw) ...@@ -20,12 +21,6 @@ fw_to_gt(struct xe_force_wake *fw)
return fw->gt; 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, static void domain_init(struct xe_force_wake_domain *domain,
enum xe_force_wake_domain_id id, enum xe_force_wake_domain_id id,
struct xe_reg reg, struct xe_reg ack) struct xe_reg reg, struct xe_reg ack)
...@@ -135,7 +130,6 @@ static int domain_sleep_wait(struct xe_gt *gt, ...@@ -135,7 +130,6 @@ static int domain_sleep_wait(struct xe_gt *gt,
int xe_force_wake_get(struct xe_force_wake *fw, int xe_force_wake_get(struct xe_force_wake *fw,
enum xe_force_wake_domains domains) enum xe_force_wake_domains domains)
{ {
struct xe_device *xe = fw_to_xe(fw);
struct xe_gt *gt = fw_to_gt(fw); struct xe_gt *gt = fw_to_gt(fw);
struct xe_force_wake_domain *domain; struct xe_force_wake_domain *domain;
enum xe_force_wake_domains tmp, woken = 0; enum xe_force_wake_domains tmp, woken = 0;
...@@ -153,7 +147,7 @@ int xe_force_wake_get(struct xe_force_wake *fw, ...@@ -153,7 +147,7 @@ int xe_force_wake_get(struct xe_force_wake *fw,
ret = domain_wake_wait(gt, domain); ret = domain_wake_wait(gt, domain);
ret2 |= ret; ret2 |= ret;
if (ret) if (ret)
drm_notice(&xe->drm, "Force wake domain (%d) failed to ack wake, ret=%d\n", xe_gt_notice(gt, "Force wake domain (%d) failed to ack wake, ret=%d\n",
domain->id, ret); domain->id, ret);
} }
fw->awake_domains |= woken; fw->awake_domains |= woken;
...@@ -165,7 +159,6 @@ int xe_force_wake_get(struct xe_force_wake *fw, ...@@ -165,7 +159,6 @@ int xe_force_wake_get(struct xe_force_wake *fw,
int xe_force_wake_put(struct xe_force_wake *fw, int xe_force_wake_put(struct xe_force_wake *fw,
enum xe_force_wake_domains domains) enum xe_force_wake_domains domains)
{ {
struct xe_device *xe = fw_to_xe(fw);
struct xe_gt *gt = fw_to_gt(fw); struct xe_gt *gt = fw_to_gt(fw);
struct xe_force_wake_domain *domain; struct xe_force_wake_domain *domain;
enum xe_force_wake_domains tmp, sleep = 0; enum xe_force_wake_domains tmp, sleep = 0;
...@@ -183,7 +176,7 @@ int xe_force_wake_put(struct xe_force_wake *fw, ...@@ -183,7 +176,7 @@ int xe_force_wake_put(struct xe_force_wake *fw,
ret = domain_sleep_wait(gt, domain); ret = domain_sleep_wait(gt, domain);
ret2 |= ret; ret2 |= ret;
if (ret) if (ret)
drm_notice(&xe->drm, "Force wake domain (%d) failed to ack sleep, ret=%d\n", xe_gt_notice(gt, "Force wake domain (%d) failed to ack sleep, ret=%d\n",
domain->id, ret); domain->id, ret);
} }
fw->awake_domains &= ~sleep; fw->awake_domains &= ~sleep;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment