mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 v4 7/7] drm/panthor: Add support for Mali-Gx20 and Mali-Gx25 GPUs
Date: Mon, 21 Jul 2025 12:44:48 +0100	[thread overview]
Message-ID: <9f30764e-14fe-4674-bdf7-eb53097bc51e@arm.com> (raw)
In-Reply-To: <CAPaKu7TFYuDNns1wwkb9RdZqgurQhAGMMOrOOUsg35umqLNL8w@mail.gmail.com>

On 11/06/2025 00:45, Chia-I Wu wrote:
> On Mon, Jun 2, 2025 at 7:34 AM Karunika Choo <karunika.choo@arm.com> wrote:
>>
>> Mali-Gx20 and Mali-Gx25 deprecates the use of FLUSH_MEM and FLUSH_PT
>> MMU_AS commands in favour of cache maintenance via
>> GPU_COMMAND's FLUSH_CACHES and FLUSH_PA_RANGE.
>>
>> They also introduce the following registers:
>> - GPU_COMMAND_ARG0~1
>> - SHADER_PWRFEATURES
>> - AMBA_FEATURES
>> - AMBA_ENABLE
>>
>> This patch enables FLUSH_CACHES for both families of GPUs via the
>> PANTHOR_HW_FEATURE_GPU_CTRL_CACHE_FLUSH bit until FLUSH_PA_RANGE support
>> is added. It also adds the aforementioned register definitions and
>> firmware binary support for arch 12.8 and 13.8.
> <snipped>
>> diff --git a/drivers/gpu/drm/panthor/panthor_regs.h b/drivers/gpu/drm/panthor/panthor_regs.h
>> index 4eaa2b612756..8e01440f8743 100644
>> --- a/drivers/gpu/drm/panthor/panthor_regs.h
>> +++ b/drivers/gpu/drm/panthor/panthor_regs.h
>> @@ -89,6 +89,8 @@
>>
>>  #define GPU_DOORBELL_FEATURES                          0xC0
>>
>> +#define GPU_COMMAND_ARG(n)                             (0xD0 + ((n) * 8))
>> +
>>  #define GPU_SHADER_PRESENT                             0x100
>>  #define GPU_TILER_PRESENT                              0x110
>>  #define GPU_L2_PRESENT                                 0x120
>> @@ -98,6 +100,8 @@
>>  #define L2_READY                                       0x160
>>
>>  #define SHADER_PWRON                                   0x180
>> +#define SHADER_PWRFEATURES                             0x188
>> +#define   SHADER_PWRFEATURES_RAY_TRACING_UNIT          BIT(0)
>>  #define TILER_PWRON                                    0x190
>>  #define L2_PWRON                                       0x1A0
>>
>> @@ -125,6 +129,13 @@
>>  #define   GPU_COHERENCY_ACE                            1
>>  #define   GPU_COHERENCY_NONE                           31
>>
>> +#define AMBA_FEATURES                                  0x300
>> +#define   AMBA_FEATURES_ACE_LITE                       BIT(0)
>> +#define   AMBA_FEATURES_ACE                            BIT(1)
>> +#define   AMBA_FEATURES_SHAREABLE_CACHE_SUPPORT                BIT(5)
>> +
>> +#define AMBA_ENABLE                                    0x304
> We still use GPU_COHERENCY_FEATURES / GPU_COHERENCY_PROTOCOL even on
> v12 and v13.  I suppose they are compatible with AMBA_FEATURES /
> AMBA_ENABLE to some degree?  We should unify them.
Hello,

Due to some changes in the fields between AMBA_ENABLE and
GPU_COHERENCY_PROTOCOL, namely SHAREABLE_CACHE_SUPPORT, which has a
value of BIT(5), the previous assumption that FEATURE = BIT(PROTOCOL)
for GPU_COHERENCY_FEATURES is no longer valid.

As such, I have updated the field Macros for GPU_COHERENCY_FEATURES to
enable merging of the two register fields. Hopefully this addresses your
comments.

Kind regards,
Karunika

  reply	other threads:[~2025-07-21 11:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 14:32 [PATCH v4 0/7] Add GPU specific initialization framework to support new Mali GPUs Karunika Choo
2025-06-02 14:32 ` [PATCH v4 1/7] drm/panthor: Add GPU specific initialization framework Karunika Choo
2025-06-10 23:12   ` Chia-I Wu
2025-07-21 11:28     ` Karunika Choo
2025-06-02 14:32 ` [PATCH v4 2/7] drm/panthor: Move GPU info initialization into panthor_hw.c Karunika Choo
2025-06-02 14:32 ` [PATCH v4 3/7] drm/panthor: Simplify getting the GPU model name Karunika Choo
2025-06-10 23:32   ` Chia-I Wu
2025-07-21 11:33     ` Karunika Choo
2025-06-02 14:32 ` [PATCH v4 4/7] drm/panthor: Add support for Mali-G710, Mali-G510 and Mali-G310 Karunika Choo
2025-06-02 14:32 ` [PATCH v4 5/7] drm/panthor: Add support for Mali-Gx15 family of GPUs Karunika Choo
2025-06-02 14:32 ` [PATCH v4 6/7] drm/panthor: Support GPU_CONTROL cache flush based on feature bit Karunika Choo
2025-06-10 23:42   ` Chia-I Wu
2025-07-21 11:35     ` Karunika Choo
2025-06-23 10:23   ` Steven Price
2025-07-21 11:39     ` Karunika Choo
2025-06-02 14:32 ` [PATCH v4 7/7] drm/panthor: Add support for Mali-Gx20 and Mali-Gx25 GPUs Karunika Choo
2025-06-10 23:45   ` Chia-I Wu
2025-07-21 11:44     ` Karunika Choo [this message]
2025-06-23 10:23 ` [PATCH v4 0/7] Add GPU specific initialization framework to support new Mali GPUs Steven Price

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=9f30764e-14fe-4674-bdf7-eb53097bc51e@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®