Commit f73716fd authored by Mary Guillemard's avatar Mary Guillemard Committed by Steven Price
Browse files

drm/panthor: Add PANTHOR_GROUP_PRIORITY_REALTIME group priority



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: default avatarMary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: default avatarSteven Price <steven.price@arm.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: default avatarSteven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240909064820.34982-3-mary.guillemard@collabora.com
parent 9f8e1c93
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */
+0 −2
Original line number Diff line number Diff line
@@ -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,

+7 −0
Original line number Diff line number Diff line
@@ -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,
};

/**