Skip to content

Commit 89642db

Browse files
mbrost05Thomas Hellström
authored andcommitted
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: 0bc519d ("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: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240123212638.1605626-1-matthew.brost@intel.com (cherry picked from commit 152ca51) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
1 parent ef87557 commit 89642db

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/gpu/drm/xe/xe_lrc.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
#include "xe_map.h"
2222
#include "xe_vm.h"
2323

24-
#define CTX_VALID (1 << 0)
25-
#define CTX_PRIVILEGE (1 << 8)
26-
#define CTX_ADDRESSING_MODE_SHIFT 3
27-
#define LEGACY_64B_CONTEXT 3
24+
#define LRC_VALID (1 << 0)
25+
#define LRC_PRIVILEGE (1 << 8)
26+
#define LRC_ADDRESSING_MODE_SHIFT 3
27+
#define LRC_LEGACY_64B_CONTEXT 3
2828

2929
#define ENGINE_CLASS_SHIFT 61
3030
#define ENGINE_INSTANCE_SHIFT 48
@@ -762,15 +762,15 @@ int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
762762
(q->usm.acc_notify << ACC_NOTIFY_S) |
763763
q->usm.acc_trigger);
764764

765-
lrc->desc = CTX_VALID;
766-
lrc->desc |= LEGACY_64B_CONTEXT << CTX_ADDRESSING_MODE_SHIFT;
765+
lrc->desc = LRC_VALID;
766+
lrc->desc |= LRC_LEGACY_64B_CONTEXT << LRC_ADDRESSING_MODE_SHIFT;
767767
/* TODO: Priority */
768768

769769
/* While this appears to have something about privileged batches or
770770
* some such, it really just means PPGTT mode.
771771
*/
772772
if (vm)
773-
lrc->desc |= CTX_PRIVILEGE;
773+
lrc->desc |= LRC_PRIVILEGE;
774774

775775
if (GRAPHICS_VERx100(xe) < 1250) {
776776
lrc->desc |= (u64)hwe->instance << ENGINE_INSTANCE_SHIFT;

0 commit comments

Comments
 (0)