]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/stolen: Convert register access to use xe_mmio
authorMatt Roper <matthew.d.roper@intel.com>
Tue, 10 Sep 2024 23:47:36 +0000 (16:47 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Wed, 11 Sep 2024 22:17:51 +0000 (15:17 -0700)
Stop using GT pointers for register access.

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240910234719.3335472-61-matthew.d.roper@intel.com
drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c

index f7113cf6109d5997a013b8644a7f8af39e25175c..423856cc18d4005a91e2556a12466b79a28f64f2 100644 (file)
@@ -60,7 +60,7 @@ bool xe_ttm_stolen_cpu_access_needs_ggtt(struct xe_device *xe)
 static s64 detect_bar2_dgfx(struct xe_device *xe, struct xe_ttm_stolen_mgr *mgr)
 {
        struct xe_tile *tile = xe_device_get_root_tile(xe);
-       struct xe_gt *mmio = xe_root_mmio_gt(xe);
+       struct xe_mmio *mmio = xe_root_tile_mmio(xe);
        struct pci_dev *pdev = to_pci_dev(xe->drm.dev);
        u64 stolen_size;
        u64 tile_offset;
@@ -94,7 +94,7 @@ static u32 get_wopcm_size(struct xe_device *xe)
        u32 wopcm_size;
        u64 val;
 
-       val = xe_mmio_read64_2x32(xe_root_mmio_gt(xe), STOLEN_RESERVED);
+       val = xe_mmio_read64_2x32(xe_root_tile_mmio(xe), STOLEN_RESERVED);
        val = REG_FIELD_GET64(WOPCM_SIZE_MASK, val);
 
        switch (val) {
@@ -119,7 +119,7 @@ static u32 detect_bar2_integrated(struct xe_device *xe, struct xe_ttm_stolen_mgr
        u32 stolen_size, wopcm_size;
        u32 ggc, gms;
 
-       ggc = xe_mmio_read32(xe_root_mmio_gt(xe), GGC);
+       ggc = xe_mmio_read32(xe_root_tile_mmio(xe), GGC);
 
        /*
         * Check GGMS: it should be fixed 0x3 (8MB), which corresponds to the
@@ -159,7 +159,7 @@ static u32 detect_bar2_integrated(struct xe_device *xe, struct xe_ttm_stolen_mgr
        stolen_size -= wopcm_size;
 
        if (media_gt && XE_WA(media_gt, 14019821291)) {
-               u64 gscpsmi_base = xe_mmio_read64_2x32(media_gt, GSCPSMI_BASE)
+               u64 gscpsmi_base = xe_mmio_read64_2x32(&media_gt->mmio, GSCPSMI_BASE)
                        & ~GENMASK_ULL(5, 0);
 
                /*