Skip to content

Commit ed906b7

Browse files
rtauro1895lucasdemarchi
authored andcommitted
drm/xe/nvm: Use root tile mmio
To allow initialization of nvm during early probe for future usecases, use root tile instead of root gt to access mmios, as gt is not yet initialized at early probe. v2: fix commit message (Lucas) Signed-off-by: Riana Tauro <riana.tauro@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://lore.kernel.org/r/20250825103537.2551837-1-riana.tauro@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent 12267f8 commit ed906b7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/xe/xe_nvm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ static void xe_nvm_release_dev(struct device *dev)
3939

4040
static bool xe_nvm_non_posted_erase(struct xe_device *xe)
4141
{
42-
struct xe_gt *gt = xe_root_mmio_gt(xe);
42+
struct xe_mmio *mmio = xe_root_tile_mmio(xe);
4343

4444
if (xe->info.platform != XE_BATTLEMAGE)
4545
return false;
46-
return !(xe_mmio_read32(&gt->mmio, XE_REG(GEN12_CNTL_PROTECTED_NVM_REG)) &
46+
return !(xe_mmio_read32(mmio, XE_REG(GEN12_CNTL_PROTECTED_NVM_REG)) &
4747
NVM_NON_POSTED_ERASE_CHICKEN_BIT);
4848
}
4949

5050
static bool xe_nvm_writable_override(struct xe_device *xe)
5151
{
52-
struct xe_gt *gt = xe_root_mmio_gt(xe);
52+
struct xe_mmio *mmio = xe_root_tile_mmio(xe);
5353
bool writable_override;
5454
resource_size_t base;
5555

@@ -72,7 +72,7 @@ static bool xe_nvm_writable_override(struct xe_device *xe)
7272
}
7373

7474
writable_override =
75-
!(xe_mmio_read32(&gt->mmio, HECI_FWSTS2(base)) &
75+
!(xe_mmio_read32(mmio, HECI_FWSTS2(base)) &
7676
HECI_FW_STATUS_2_NVM_ACCESS_MODE);
7777
if (writable_override)
7878
drm_info(&xe->drm, "NVM access overridden by jumper\n");

0 commit comments

Comments
 (0)