[PATCH v4 6/7] drm/panthor: Support GPU_CONTROL cache flush based on feature bit
Karunika Choo
karunika.choo at arm.com
Mon Jul 21 11:35:13 UTC 2025
On 11/06/2025 00:42, Chia-I Wu wrote:
> On Mon, Jun 2, 2025 at 7:42 AM Karunika Choo <karunika.choo at arm.com> wrote:
>>
>> As the FLUSH_MEM and FLUSH_PT commands are deprecated in GPUs from
>> Mali-Gx20 onwards, this patch adds support for performing cache
>> maintenance via the FLUSH_CACHES command in GPU_CONTROL, in place of
>> FLUSH_MEM and FLUSH_PT based on PANTHOR_HW_FEATURE_GPU_CTRL_CACHE_FLUSH
>> feature bit.
>>
>> This patch also enables cache maintenance via GPU_CONTROL for Mali-Gx10
>> and Mali-Gx15 GPUs for consistency.
>>
>> Signed-off-by: Karunika Choo <karunika.choo at arm.com>
>> ---
>> drivers/gpu/drm/panthor/panthor_hw.c | 6 +++++
>> drivers/gpu/drm/panthor/panthor_hw.h | 6 +++++
>> drivers/gpu/drm/panthor/panthor_mmu.c | 35 +++++++++++++++++++++++++++
>> 3 files changed, 47 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/panthor/panthor_hw.c b/drivers/gpu/drm/panthor/panthor_hw.c
>> index f5127a4b02dc..5ec9d7f28368 100644
>> --- a/drivers/gpu/drm/panthor/panthor_hw.c
>> +++ b/drivers/gpu/drm/panthor/panthor_hw.c
>> @@ -99,9 +99,15 @@ static void panthor_hw_info_init(struct panthor_device *ptdev)
>> static struct panthor_hw panthor_hw_devices[] = {
>> {
>> .arch_major = 10,
>> + .features = {
>> + BIT(PANTHOR_HW_FEATURE_GPU_CTRL_CACHE_FLUSH)
>> + },
>> },
>> {
>> .arch_major = 11,
>> + .features = {
>> + BIT(PANTHOR_HW_FEATURE_GPU_CTRL_CACHE_FLUSH)
>> + },
>> },
>> };
> Are there going to be major archs which do not support
> PANTHOR_HW_FEATURE_GPU_CTRL_CACHE_FLUSH? If not, we don't need the
> feature bit.
I have removed the feature bits and applied the change to all CSF GPUs
in v5.
- https://lore.kernel.org/all/20250721111344.1610250-6-karunika.choo@arm.com/
More information about the dri-devel
mailing list