drm/xe: Remove duplicate media_ver
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 22 Feb 2023 00:27:05 +0000 (16:27 -0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:29:06 +0000 (18:29 -0500)
media_verx100 supersedes the info from media_ver. Leave media_ver in the
struct xe_device_desc, used in xe_pci.c since it's easier to define
common parts of the platforms like that. However all the rest of the
driver should be using media_verx100 that is more future proof.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/216
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_mmio.c
drivers/gpu/drm/xe/xe_pci.c

index 4c4a912..c9f74dc 100644 (file)
@@ -77,8 +77,6 @@ struct xe_device {
                u8 tile_count;
                /** @vm_max_level: Max VM level */
                u8 vm_max_level;
-               /** @media_ver: Media version */
-               u8 media_ver;
                /** @supports_usm: Supports unified shared memory */
                bool supports_usm;
                /** @has_asid: Has address space ID */
index ba327b1..c414ece 100644 (file)
@@ -287,7 +287,7 @@ static void xe_mmio_probe_tiles(struct xe_device *xe)
        mtcfg = xe_mmio_read64(gt, XEHP_MTCFG_ADDR.reg);
        adj_tile_count = xe->info.tile_count =
                REG_FIELD_GET(TILE_COUNT, mtcfg) + 1;
-       if (xe->info.media_ver >= 13)
+       if (xe->info.media_verx100 >= 1300)
                xe->info.tile_count *= 2;
 
        drm_info(&xe->drm, "tile_count: %d, adj_tile_count %d\n",
index 2b1c80b..88e2864 100644 (file)
@@ -408,7 +408,6 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        xe->info.vram_flags = desc->vram_flags;
        xe->info.tile_count = desc->max_tiles;
        xe->info.vm_max_level = desc->vm_max_level;
-       xe->info.media_ver = desc->media_ver;
        xe->info.supports_usm = desc->supports_usm;
        xe->info.has_asid = desc->has_asid;
        xe->info.has_flat_ccs = desc->has_flat_ccs;