]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/panthor: Add PANTHOR_GROUP_PRIORITY_REALTIME group priority
authorMary Guillemard <mary.guillemard@collabora.com>
Mon, 9 Sep 2024 06:48:20 +0000 (08:48 +0200)
committerSteven Price <steven.price@arm.com>
Wed, 25 Sep 2024 14:25:51 +0000 (15:25 +0100)
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.

v2:
- Add Steven Price r-b

v3:
- Add Boris Brezillon r-b

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240909064820.34982-3-mary.guillemard@collabora.com
drivers/gpu/drm/panthor/panthor_drv.c
drivers/gpu/drm/panthor/panthor_sched.c
include/uapi/drm/panthor_drm.h

index 0caf9e9a8c453fc3822020dd35e120b3ea81a071..7b1db2adcb4c52f10c34fc209ba25e708552e671 100644 (file)
@@ -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 */
index 42afdf0ddb7ece54971912e3bb4353e3d37656ae..a9e3b1ccccc7bd4b31b7777cfd4865db0c9cb5a9 100644 (file)
@@ -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,
 
index 1fd8473548ac63d7433162d7bb54eda02e8fefb4..011a555e46740ccc5cf60ae52c220e7c6048101b 100644 (file)
@@ -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,
 };
 
 /**