diff options
author | Koby Elbaz <kelbaz@habana.ai> | 2023-11-28 17:53:15 +0100 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 17:45:09 +0100 |
commit | 082802a3ee09e764bc1513988d6f5889712fe88f (patch) | |
tree | b377f2ff073854b3ae866fe4aa93d2fb880abcc9 /drivers/gpu/drm/xe/xe_pcode.c | |
parent | drm/xe/mocs: update MOCS table for xe2 (diff) | |
download | linux-082802a3ee09e764bc1513988d6f5889712fe88f.tar.xz linux-082802a3ee09e764bc1513988d6f5889712fe88f.zip |
drm/xe: add skip_pcode flag
Per device, set this flag to enable access to the PCODE uC or to skip it.
Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_pcode.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_pcode.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c index 4a240acf7625..b324dc2a5deb 100644 --- a/drivers/gpu/drm/xe/xe_pcode.c +++ b/drivers/gpu/drm/xe/xe_pcode.c @@ -61,6 +61,9 @@ static int pcode_mailbox_rw(struct xe_gt *gt, u32 mbox, u32 *data0, u32 *data1, { int err; + if (gt_to_xe(gt)->info.skip_pcode) + return 0; + lockdep_assert_held(>->pcode.lock); if ((xe_mmio_read32(gt, PCODE_MAILBOX) & PCODE_READY) != 0) @@ -249,6 +252,9 @@ int xe_pcode_init(struct xe_gt *gt) int timeout_us = 180000000; /* 3 min */ int ret; + if (gt_to_xe(gt)->info.skip_pcode) + return 0; + if (!IS_DGFX(gt_to_xe(gt))) return 0; @@ -280,6 +286,9 @@ int xe_pcode_probe(struct xe_gt *gt) { drmm_mutex_init(>_to_xe(gt)->drm, >->pcode.lock); + if (gt_to_xe(gt)->info.skip_pcode) + return 0; + if (!IS_DGFX(gt_to_xe(gt))) return 0; |