drm/xe: Remove duplicate media_ver
Subsystems (2)
PATCH 1/1 drm/xe: Remove duplicate media_ver
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.
Signed-off-by Lucas De Marchi <[email protected]>
--- drivers/gpu/drm/xe/xe_device_types.h | 2 -- drivers/gpu/drm/xe/xe_mmio.c | 2 +- drivers/gpu/drm/xe/xe_pci.c | 1 - 3 files changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/xe/xe_device_types.h +0 -2
@@ -82,8 +82,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 */
drivers/gpu/drm/xe/xe_mmio.c +1 -1
@@ -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",
drivers/gpu/drm/xe/xe_pci.c +0 -1
@@ -485,7 +485,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;
Signature · 1 line
2.39.0
Quoted 4 lines · Lucas De Marchi
media_verx100supersedes the info frommedia_ver. Leavemedia_verin the structxe_device_desc, used inxe_pci.csince it's easier to define common parts of the platforms like that. However all the rest of the driver should be usingmedia_verx100that is more future proof.
Reviewed-by José Roberto de Souza <[email protected]>
Quoted 47 lines
Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/xe/xe_device_types.h | 2 -- drivers/gpu/drm/xe/xe_mmio.c | 2 +- drivers/gpu/drm/xe/xe_pci.c | 1 - 3 files changed, 1 insertion(+), 4 deletions(-)drivers/gpu/drm/xe/xe_device_types.h +0
-2@@ -82,8 +82,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 */ drivers/gpu/drm/xe/xe_mmio.c +1
-1@@ -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",drivers/gpu/drm/xe/xe_pci.c +0
-1@@ -485,7 +485,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;