drm/xe: Track whether platform has LLC
authorMatt Roper <matthew.d.roper@intel.com>
Mon, 10 Apr 2023 18:39:09 +0000 (11:39 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 19 Dec 2023 23:31:41 +0000 (18:31 -0500)
Some driver initialization is conditional on the presence of an LLC.
Add an extra feature flag to support this.

Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20230410183910.2696628-2-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_pci.c

index f1011ddb585014d003b3869cc409b5522448c7fd..f3cf5a4e5ab23a27e54fb6b3f3e549611d2bb998 100644 (file)
@@ -92,6 +92,8 @@ struct xe_device {
                u8 has_flat_ccs:1;
                /** @has_4tile: Whether tile-4 tiling is supported */
                u8 has_4tile:1;
+               /** @has_llc: Device has a shared CPU+GPU last level cache */
+               u8 has_llc:1;
                /** @has_range_tlb_invalidation: Has range based TLB invalidations */
                u8 has_range_tlb_invalidation:1;
                /** @has_link_copy_engines: Whether the platform has link copy engines */
index 2524ee1c73e32a5a2f28c0eb27348018a8e52028..1ea175d6a7d3299fb3feeae3b21ac7452be96553 100644 (file)
@@ -55,6 +55,7 @@ struct xe_device_desc {
         * should eventually move entirely into the display code's own logic.
         */
        u8 has_4tile:1;
+       u8 has_llc:1;
 };
 
 #define PLATFORM(x)            \
@@ -172,6 +173,7 @@ static const struct xe_device_desc tgl_desc = {
        .graphics = &graphics_xelp,
        .media = &media_xem,
        PLATFORM(XE_TIGERLAKE),
+       .has_llc = 1,
        .require_force_probe = true,
 };
 
@@ -179,6 +181,7 @@ static const struct xe_device_desc adl_s_desc = {
        .graphics = &graphics_xelp,
        .media = &media_xem,
        PLATFORM(XE_ALDERLAKE_S),
+       .has_llc = 1,
        .require_force_probe = true,
 };
 
@@ -188,6 +191,7 @@ static const struct xe_device_desc adl_p_desc = {
        .graphics = &graphics_xelp,
        .media = &media_xem,
        PLATFORM(XE_ALDERLAKE_P),
+       .has_llc = 1,
        .require_force_probe = true,
        .subplatforms = (const struct xe_subplatform_desc[]) {
                { XE_SUBPLATFORM_ADLP_RPLU, "RPLU", adlp_rplu_ids },
@@ -491,6 +495,7 @@ static int xe_info_init(struct xe_device *xe,
        xe->info.graphics_name = graphics_desc->name;
        xe->info.media_name = media_desc ? media_desc->name : "none";
        xe->info.has_4tile = desc->has_4tile;
+       xe->info.has_llc = desc->has_llc;
 
        xe->info.dma_mask_size = graphics_desc->dma_mask_size;
        xe->info.vram_flags = graphics_desc->vram_flags;