From: Mihail Atanassov <mihail.atanassov@arm.com>
To: Steven Price <steven.price@arm.com>,
Mary Guillemard <mary.guillemard@collabora.com>,
linux-kernel@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org,
Boris Brezillon <boris.brezillon@collabora.com>,
Christopher Healy <healych@amazon.com>,
kernel@collabora.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>, Daniel Vetter <daniel@ffwll.ch>,
nd <nd@arm.com>
Subject: Re: [PATCH 1/2] drm/panthor: Add PANTHOR_GROUP_PRIORITY_REALTIME group priority
Date: Thu, 5 Sep 2024 17:22:10 +0100 [thread overview]
Message-ID: <8f4329e3-613a-49b1-9d01-0e8451bea54e@arm.com> (raw)
In-Reply-To: <d24272d4-e21a-4f62-8797-ce29dd6d2147@arm.com>
On 05/09/2024 16:41, Steven Price wrote:
> Hi Mihail,
>
> On 05/09/2024 14:54, Mihail Atanassov wrote:
>> Hi Mary,
>>
>> On 05/09/2024 12:13, Mary Guillemard wrote:
>>> This adds a new value to drm_panthor_group_priority exposing the
>>> realtime priority to userspace.
>>>
>>> This is required to implement NV_context_priority_realtime in Mesa.
>>>
>>> Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
>>> ---
>>> drivers/gpu/drm/panthor/panthor_drv.c | 2 +-
>>> drivers/gpu/drm/panthor/panthor_sched.c | 2 --
>>> include/uapi/drm/panthor_drm.h | 7 +++++++
>>> 3 files changed, 8 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/panthor/panthor_drv.c
>>> b/drivers/gpu/drm/panthor/panthor_drv.c
>>> index 0caf9e9a8c45..7b1db2adcb4c 100644
>>> --- a/drivers/gpu/drm/panthor/panthor_drv.c
>>> +++ b/drivers/gpu/drm/panthor/panthor_drv.c
>>> @@ -1041,7 +1041,7 @@ static int group_priority_permit(struct drm_file
>>> *file,
>>> u8 priority)
>>> {
>>> /* Ensure that priority is valid */
>>> - if (priority > PANTHOR_GROUP_PRIORITY_HIGH)
>>> + if (priority > PANTHOR_GROUP_PRIORITY_REALTIME)
>>> return -EINVAL;
>>> /* Medium priority and below are always allowed */
>>> diff --git a/drivers/gpu/drm/panthor/panthor_sched.c
>>> b/drivers/gpu/drm/panthor/panthor_sched.c
>>> index 91a31b70c037..86908ada7335 100644
>>> --- a/drivers/gpu/drm/panthor/panthor_sched.c
>>> +++ b/drivers/gpu/drm/panthor/panthor_sched.c
>>> @@ -137,8 +137,6 @@ enum panthor_csg_priority {
>>> * non-real-time groups. When such a group becomes executable,
>>> * it will evict the group with the lowest non-rt priority if
>>> * there's no free group slot available.
>>> - *
>>> - * Currently not exposed to userspace.
>>> */
>>> PANTHOR_CSG_PRIORITY_RT,
>>> diff --git a/include/uapi/drm/panthor_drm.h
>>> b/include/uapi/drm/panthor_drm.h
>>> index 1fd8473548ac..011a555e4674 100644
>>> --- a/include/uapi/drm/panthor_drm.h
>>> +++ b/include/uapi/drm/panthor_drm.h
>>> @@ -720,6 +720,13 @@ enum drm_panthor_group_priority {
>>> * Requires CAP_SYS_NICE or DRM_MASTER.
>>> */
>>> PANTHOR_GROUP_PRIORITY_HIGH,
>>> +
>>> + /**
>>> + * @PANTHOR_GROUP_PRIORITY_REALTIME: Realtime priority group.
>>> + *
>>> + * Requires CAP_SYS_NICE or DRM_MASTER.
>>> + */
>>> + PANTHOR_GROUP_PRIORITY_REALTIME,
>>
>> This is a uapi change, but doesn't have a corresponding driver version
>> bump in the same patch. You also document the addition of this enum
>> value in the next patch, which also is a tad wonky. If you reversed the
>> order of the patches, they'd make more sense IMO.
>
> You can't reverse the order because then the version bump would be
> before all the features were present. Generally we put the version bump
> at the end of a patch series because it's indicating to user space that
> the new features can be used. This way round if a bisect lands in the
> middle of the series then the new priority is there but won't be used
> because user space won't know about it (which is fine).
>
Ack.
> Steve
>
>>> };
>>> /**
>>
>
--
Mihail Atanassov <mihail.atanassov@arm.com>
next prev parent reply other threads:[~2024-09-05 16:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 11:13 [PATCH 0/2] drm/panthor: Expose realtime group priority and allowed priorites to userspace Mary Guillemard
2024-09-05 11:13 ` [PATCH 1/2] drm/panthor: Add PANTHOR_GROUP_PRIORITY_REALTIME group priority Mary Guillemard
2024-09-05 13:54 ` Mihail Atanassov
2024-09-05 15:41 ` Steven Price
2024-09-05 16:22 ` Mihail Atanassov [this message]
2024-09-05 15:41 ` Steven Price
2024-09-05 11:13 ` [PATCH 2/2] drm/panthor: Add DEV_QUERY_GROUP_PRIORITIES_INFO dev query Mary Guillemard
2024-09-05 15:41 ` 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=8f4329e3-613a-49b1-9d01-0e8451bea54e@arm.com \
--to=mihail.atanassov@arm.com \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=healych@amazon.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mary.guillemard@collabora.com \
--cc=mripard@kernel.org \
--cc=nd@arm.com \
--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®