From: Karunika Choo <karunika.choo@arm.com>
To: Chia-I Wu <olvaffe@gmail.com>
Cc: dri-devel@lists.freedesktop.org, nd@arm.com,
Boris Brezillon <boris.brezillon@collabora.com>,
Steven Price <steven.price@arm.com>,
Liviu Dudau <liviu.dudau@arm.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 4/6] drm/panthor: Add support for Mali-Gx15 family of GPUs
Date: Thu, 24 Jul 2025 09:53:28 +0100 [thread overview]
Message-ID: <1674fa29-db08-4241-929e-4c0354669022@arm.com> (raw)
In-Reply-To: <CAPaKu7S3=8UASg70E9LQcGiqKq319asOwv7pAhBEMAQgwh608Q@mail.gmail.com>
On 24/07/2025 06:40, Chia-I Wu wrote:
> On Mon, Jul 21, 2025 at 3:13 PM Karunika Choo <karunika.choo@arm.com> wrote:
>>
>> Mali-Gx15 introduces a new GPU_FEATURES register that provides
>> information about GPU-wide supported features. The register value will
>> be passed on to userspace via gpu_info.
>>
>> Additionally, Mali-Gx15 presents an 'Immortalis' naming variant
>> depending on the shader core count and presence of Ray Intersection
>> feature support.
>>
>> This patch adds:
>> - support for correctly identifying the model names for Mali-Gx15 GPUs.
>> - arch 11.8 FW binary support
>>
>> Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
>> Signed-off-by: Karunika Choo <karunika.choo@arm.com>
>> ---
>> drivers/gpu/drm/panthor/panthor_fw.c | 1 +
>> drivers/gpu/drm/panthor/panthor_hw.c | 15 +++++++++++++++
>> drivers/gpu/drm/panthor/panthor_regs.h | 3 +++
>> include/uapi/drm/panthor_drm.h | 3 +++
>> 4 files changed, 22 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/panthor/panthor_fw.c b/drivers/gpu/drm/panthor/panthor_fw.c
>> index b7b454d16f12..fa6e0b48a0b2 100644
>> --- a/drivers/gpu/drm/panthor/panthor_fw.c
>> +++ b/drivers/gpu/drm/panthor/panthor_fw.c
>> @@ -1404,3 +1404,4 @@ int panthor_fw_init(struct panthor_device *ptdev)
>> MODULE_FIRMWARE("arm/mali/arch10.8/mali_csffw.bin");
>> MODULE_FIRMWARE("arm/mali/arch10.10/mali_csffw.bin");
>> MODULE_FIRMWARE("arm/mali/arch10.12/mali_csffw.bin");
>> +MODULE_FIRMWARE("arm/mali/arch11.8/mali_csffw.bin");
>> diff --git a/drivers/gpu/drm/panthor/panthor_hw.c b/drivers/gpu/drm/panthor/panthor_hw.c
>> index 7f138974d43b..a7583342d797 100644
>> --- a/drivers/gpu/drm/panthor/panthor_hw.c
>> +++ b/drivers/gpu/drm/panthor/panthor_hw.c
>> @@ -13,6 +13,9 @@ static char *get_gpu_model_name(struct panthor_device *ptdev)
>> const u32 gpu_id = ptdev->gpu_info.gpu_id;
>> const u32 product_id = GPU_PROD_ID_MAKE(GPU_ARCH_MAJOR(gpu_id),
>> GPU_PROD_MAJOR(gpu_id));
>> + const bool ray_intersection = !!(ptdev->gpu_info.gpu_features &
>> + GPU_FEATURES_RAY_INTERSECTION);
>> + const u8 shader_core_count = hweight64(ptdev->gpu_info.shader_present);
>>
>> switch (product_id) {
>> case GPU_PROD_ID_MAKE(10, 2):
>> @@ -23,6 +26,15 @@ static char *get_gpu_model_name(struct panthor_device *ptdev)
>> return "Mali-G510";
>> case GPU_PROD_ID_MAKE(10, 4):
>> return "Mali-G310";
>> + case GPU_PROD_ID_MAKE(11, 2):
>> + if (shader_core_count > 10 && ray_intersection)
>> + return "Mali-G715-Immortalis";
>> + else if (shader_core_count >= 7)
>> + return "Mali-G715";
>> +
>> + fallthrough;
>> + case GPU_PROD_ID_MAKE(11, 3):
>> + return "Mali-G615";
>> }
>>
>> return "(Unknown Mali GPU)";
>> @@ -53,6 +65,9 @@ static void panthor_gpu_info_init(struct panthor_device *ptdev)
>> ptdev->gpu_info.shader_present = gpu_read64(ptdev, GPU_SHADER_PRESENT);
>> ptdev->gpu_info.tiler_present = gpu_read64(ptdev, GPU_TILER_PRESENT);
>> ptdev->gpu_info.l2_present = gpu_read64(ptdev, GPU_L2_PRESENT);
>> +
>> + /* Introduced in arch 11.x */
>> + ptdev->gpu_info.gpu_features = gpu_read64(ptdev, GPU_FEATURES);
> Is this guaranteed to be 0 prior to v11?
>
Hi, This is guaranteed to be zero as it was a reserved register prior to v11.
Kind regards,
Karunika>> }
>>
>> static void panthor_hw_info_init(struct panthor_device *ptdev)
>> diff --git a/drivers/gpu/drm/panthor/panthor_regs.h b/drivers/gpu/drm/panthor/panthor_regs.h
>> index 48bbfd40138c..8bee76d01bf8 100644
>> --- a/drivers/gpu/drm/panthor/panthor_regs.h
>> +++ b/drivers/gpu/drm/panthor/panthor_regs.h
>> @@ -70,6 +70,9 @@
>> #define GPU_PWR_OVERRIDE0 0x54
>> #define GPU_PWR_OVERRIDE1 0x58
>>
>> +#define GPU_FEATURES 0x60
>> +#define GPU_FEATURES_RAY_INTERSECTION BIT(2)
>> +
>> #define GPU_TIMESTAMP_OFFSET 0x88
>> #define GPU_CYCLE_COUNT 0x90
>> #define GPU_TIMESTAMP 0x98
>> diff --git a/include/uapi/drm/panthor_drm.h b/include/uapi/drm/panthor_drm.h
>> index e1f43deb7eca..467d365ed7ba 100644
>> --- a/include/uapi/drm/panthor_drm.h
>> +++ b/include/uapi/drm/panthor_drm.h
>> @@ -327,6 +327,9 @@ struct drm_panthor_gpu_info {
>>
>> /** @pad: MBZ. */
>> __u32 pad;
>> +
>> + /** @gpu_features: Bitmask describing supported GPU-wide features */
>> + __u64 gpu_features;
>> };
>>
>> /**
>> --
>> 2.49.0
>>
next prev parent reply other threads:[~2025-07-24 8:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 21:35 [PATCH v6 0/6] Add support for new Mali GPUs Karunika Choo
2025-07-21 21:35 ` [PATCH v6 1/6] drm/panthor: Add panthor_hw and move gpu_info initialization into it Karunika Choo
2025-07-21 21:35 ` [PATCH v6 2/6] drm/panthor: Simplify getting the GPU model name Karunika Choo
2025-07-21 21:35 ` [PATCH v6 3/6] drm/panthor: Add support for Mali-G710, Mali-G510 and Mali-G310 Karunika Choo
2025-07-21 21:35 ` [PATCH v6 4/6] drm/panthor: Add support for Mali-Gx15 family of GPUs Karunika Choo
2025-07-24 5:40 ` Chia-I Wu
2025-07-24 8:53 ` Karunika Choo [this message]
2025-07-21 21:35 ` [PATCH v6 5/6] drm/panthor: Make MMU cache maintenance use FLUSH_CACHES command Karunika Choo
2025-07-21 21:35 ` [PATCH v6 6/6] drm/panthor: Add support for Mali-Gx20 and Mali-Gx25 GPUs Karunika Choo
2025-07-24 5:56 ` Chia-I Wu
2025-07-24 5:58 ` [PATCH v6 0/6] Add support for new Mali GPUs Chia-I Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1674fa29-db08-4241-929e-4c0354669022@arm.com \
--to=karunika.choo@arm.com \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nd@arm.com \
--cc=olvaffe@gmail.com \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®