[Intel-xe] [PATCH 2/3] drm/xe: Track whether platform has LLC

Lucas De Marchi lucas.demarchi at intel.com
Tue Apr 11 07:00:23 UTC 2023


On Mon, Apr 10, 2023 at 11:39:09AM -0700, Matt Roper wrote:
>Some driver initialization is conditional on the presence of an LLC.
>Add an extra feature flag to support this.
>
>Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
>---
> drivers/gpu/drm/xe/xe_device_types.h | 2 ++
> drivers/gpu/drm/xe/xe_pci.c          | 5 +++++
> 2 files changed, 7 insertions(+)
>
>diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
>index 9ce6e348dd29..42a82dd7631a 100644
>--- a/drivers/gpu/drm/xe/xe_device_types.h
>+++ b/drivers/gpu/drm/xe/xe_device_types.h
>@@ -98,6 +98,8 @@ struct xe_device {
> 		u8 has_flat_ccs:1;
> 		/** @has_4tile: Whether tile-4 tiling is supported */
> 		u8 has_4tile:1;
>+		/** @has_llc: Device as a shared CPU+GPU last level cache */

				     ^has?

other than that,


Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

Lucas De Marchi

>+		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 */
>diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
>index b92d8b5a391e..4b01d8c538ae 100644
>--- a/drivers/gpu/drm/xe/xe_pci.c
>+++ b/drivers/gpu/drm/xe/xe_pci.c
>@@ -56,6 +56,7 @@ struct xe_device_desc {
> 	 * should eventually move entirely into the display code's own logic.
> 	 */
> 	u8 has_4tile:1;
>+	u8 has_llc:1;
> };
>
> __diag_push();
>@@ -176,6 +177,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,
> };
>
>@@ -183,6 +185,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,
> };
>
>@@ -192,6 +195,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 },
>@@ -497,6 +501,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;
>-- 
>2.39.2
>


More information about the Intel-xe mailing list