From b6a8d664f74065dc43c1e88ae4fb2ce4d30458a4 Mon Sep 17 00:00:00 2001 From: Christoph Pillmayer Date: Thu, 16 Apr 2026 12:46:53 +0200 Subject: [PATCH] pan/kmod: Add l2 features to pan_kmod_dev_props --- src/panfrost/lib/kmod/pan_kmod.h | 3 +++ src/panfrost/lib/kmod/panfrost_kmod.c | 2 ++ src/panfrost/lib/kmod/panthor_kmod.c | 1 + 3 files changed, 6 insertions(+) diff --git a/src/panfrost/lib/kmod/pan_kmod.h b/src/panfrost/lib/kmod/pan_kmod.h index 8076e78a5bb..922bfbbfb57 100644 --- a/src/panfrost/lib/kmod/pan_kmod.h +++ b/src/panfrost/lib/kmod/pan_kmod.h @@ -199,6 +199,9 @@ struct pan_kmod_dev_props { /* Texture feature bits. */ uint32_t texture_features[4]; + /* L2 feature bits. */ + uint32_t l2_features; + /* Maximum number of threads per core. */ uint32_t max_threads_per_core; diff --git a/src/panfrost/lib/kmod/panfrost_kmod.c b/src/panfrost/lib/kmod/panfrost_kmod.c index e7a0c1c2cdd..67235ad15cf 100644 --- a/src/panfrost/lib/kmod/panfrost_kmod.c +++ b/src/panfrost/lib/kmod/panfrost_kmod.c @@ -167,6 +167,8 @@ panfrost_dev_query_props(struct panfrost_kmod_dev *panfrost_dev) panfrost_query_raw(fd, DRM_PANFROST_PARAM_MEM_FEATURES, true, 0); props->mmu_features = panfrost_query_raw(fd, DRM_PANFROST_PARAM_MMU_FEATURES, true, 0); + props->l2_features = + panfrost_query_raw(fd, DRM_PANFROST_PARAM_L2_FEATURES, true, 0); for (unsigned i = 0; i < ARRAY_SIZE(props->texture_features); i++) { props->texture_features[i] = panfrost_query_raw( diff --git a/src/panfrost/lib/kmod/panthor_kmod.c b/src/panfrost/lib/kmod/panthor_kmod.c index 2fb06e6bfd2..22845cc0433 100644 --- a/src/panfrost/lib/kmod/panthor_kmod.c +++ b/src/panfrost/lib/kmod/panthor_kmod.c @@ -201,6 +201,7 @@ panthor_dev_query_props(struct panthor_kmod_dev *panthor_dev) .tiler_features = panthor_dev->props.gpu.tiler_features, .mem_features = panthor_dev->props.gpu.mem_features, .mmu_features = panthor_dev->props.gpu.mmu_features, + .l2_features = panthor_dev->props.gpu.l2_features, /* This register does not exist because AFBC is no longer optional. */ .afbc_features = 0,