Commit 152ca51d authored by Matthew Brost's avatar Matthew Brost

drm/xe: Use LRC prefix rather than CTX prefix in lrc desc defines

The sparc build fails [1] due to CTX_VALID being redefined. Fix this by
using a better naming convention of LRC_VALID as this define is used in
setting bits in the lrc descriptor. To be uniform, change other define
with LRC prefix too.

[1] https://lore.kernel.org/all/20240123111235.3097079-1-geert@linux-m68k.org/

v2:
- s/LEGACY_64B_CONTEXT/LRC_LEGACY_64B_CONTEXT (Lucas)

Fixes: 0bc519d2 ("drm/xe: Remove GEN[0-9]*_ prefixes")
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240123212638.1605626-1-matthew.brost@intel.com
parent d83d8ae2
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
#include "xe_sriov.h" #include "xe_sriov.h"
#include "xe_vm.h" #include "xe_vm.h"
#define CTX_VALID (1 << 0) #define LRC_VALID (1 << 0)
#define CTX_PRIVILEGE (1 << 8) #define LRC_PRIVILEGE (1 << 8)
#define CTX_ADDRESSING_MODE_SHIFT 3 #define LRC_ADDRESSING_MODE_SHIFT 3
#define LEGACY_64B_CONTEXT 3 #define LRC_LEGACY_64B_CONTEXT 3
#define ENGINE_CLASS_SHIFT 61 #define ENGINE_CLASS_SHIFT 61
#define ENGINE_INSTANCE_SHIFT 48 #define ENGINE_INSTANCE_SHIFT 48
...@@ -786,15 +786,15 @@ int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe, ...@@ -786,15 +786,15 @@ int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
(q->usm.acc_notify << ACC_NOTIFY_S) | (q->usm.acc_notify << ACC_NOTIFY_S) |
q->usm.acc_trigger); q->usm.acc_trigger);
lrc->desc = CTX_VALID; lrc->desc = LRC_VALID;
lrc->desc |= LEGACY_64B_CONTEXT << CTX_ADDRESSING_MODE_SHIFT; lrc->desc |= LRC_LEGACY_64B_CONTEXT << LRC_ADDRESSING_MODE_SHIFT;
/* TODO: Priority */ /* TODO: Priority */
/* While this appears to have something about privileged batches or /* While this appears to have something about privileged batches or
* some such, it really just means PPGTT mode. * some such, it really just means PPGTT mode.
*/ */
if (vm) if (vm)
lrc->desc |= CTX_PRIVILEGE; lrc->desc |= LRC_PRIVILEGE;
if (GRAPHICS_VERx100(xe) < 1250) { if (GRAPHICS_VERx100(xe) < 1250) {
lrc->desc |= (u64)hwe->instance << ENGINE_INSTANCE_SHIFT; lrc->desc |= (u64)hwe->instance << ENGINE_INSTANCE_SHIFT;
......
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