From: Steven Price <steven.price@arm.com>
To: "Adrián Larumbe" <adrian.larumbe@collabora.com>,
linux-kernel@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org,
Boris Brezillon <boris.brezillon@collabora.com>,
kernel@collabora.com, Rob Herring <robh@kernel.org>,
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>
Subject: Re: [PATCH v2 1/4] drm/panfrost: Introduce uAPI for JM context creation
Date: Wed, 10 Sep 2025 16:42:30 +0100 [thread overview]
Message-ID: <0627247d-4ab3-41c5-90ac-18912a96403b@arm.com> (raw)
In-Reply-To: <20250904001054.147465-2-adrian.larumbe@collabora.com>
On 04/09/2025 01:07, Adrián Larumbe wrote:
> From: Boris Brezillon <boris.brezillon@collabora.com>
>
> The new uAPI lets user space query the KM driver for the available
> priorities a job can be given at submit time. These are managed through
> the notion of a context, for which we also provide new creation and
> destruction ioctls.
>
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
> ---
> include/uapi/drm/panfrost_drm.h | 50 +++++++++++++++++++++++++++++++++
> 1 file changed, 50 insertions(+)
>
> diff --git a/include/uapi/drm/panfrost_drm.h b/include/uapi/drm/panfrost_drm.h
> index ed67510395bd..e8b47c9f6976 100644
> --- a/include/uapi/drm/panfrost_drm.h
> +++ b/include/uapi/drm/panfrost_drm.h
> @@ -22,6 +22,8 @@ extern "C" {
> #define DRM_PANFROST_PERFCNT_DUMP 0x07
> #define DRM_PANFROST_MADVISE 0x08
> #define DRM_PANFROST_SET_LABEL_BO 0x09
> +#define DRM_PANFROST_JM_CTX_CREATE 0x0a
> +#define DRM_PANFROST_JM_CTX_DESTROY 0x0b
>
> #define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit)
> #define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo)
> @@ -31,6 +33,8 @@ extern "C" {
> #define DRM_IOCTL_PANFROST_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset)
> #define DRM_IOCTL_PANFROST_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MADVISE, struct drm_panfrost_madvise)
> #define DRM_IOCTL_PANFROST_SET_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_SET_LABEL_BO, struct drm_panfrost_set_label_bo)
> +#define DRM_IOCTL_PANFROST_JM_CTX_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_CREATE, struct drm_panfrost_jm_ctx_create)
> +#define DRM_IOCTL_PANFROST_JM_CTX_DESTROY DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_JM_CTX_DESTROY, struct drm_panfrost_jm_ctx_destroy)
>
> /*
> * Unstable ioctl(s): only exposed when the unsafe unstable_ioctls module
> @@ -71,6 +75,12 @@ struct drm_panfrost_submit {
>
> /** A combination of PANFROST_JD_REQ_* */
> __u32 requirements;
> +
> + /** JM context handle. Zero if you want to use the default context. */
> + __u32 jm_ctx_handle;
> +
> + /** Padding field. MBZ. */
> + __u32 pad;
> };
>
> /**
> @@ -177,6 +187,7 @@ enum drm_panfrost_param {
> DRM_PANFROST_PARAM_AFBC_FEATURES,
> DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP,
> DRM_PANFROST_PARAM_SYSTEM_TIMESTAMP_FREQUENCY,
> + DRM_PANFROST_PARAM_ALLOWED_JM_CTX_PRIORITIES,
> };
>
> struct drm_panfrost_get_param {
> @@ -299,6 +310,45 @@ struct panfrost_dump_registers {
> __u32 value;
> };
>
> +enum drm_panfrost_jm_ctx_priority {
> + /**
> + * @PANFROST_JM_CTX_PRIORITY_LOW: Low priority context.
> + */
> + PANFROST_JM_CTX_PRIORITY_LOW = 0,
> +
> + /**
> + * @PANFROST_JM_CTX_PRIORITY_MEDIUM: Medium priority context.
> + */
> + PANFROST_JM_CTX_PRIORITY_MEDIUM,
> +
> + /**
> + * @PANFROST_JM_CTX_PRIORITY_HIGH: High priority context.
> + *
> + * Requires CAP_SYS_NICE or DRM_MASTER.
> + */
> + PANFROST_JM_CTX_PRIORITY_HIGH,
> +};
> +
> +struct drm_panfrost_jm_ctx_create {
> + /** @handle: Handle of the created JM context */
> + __u32 handle;
> +
> + /** @priority: Context priority (see enum drm_panfrost_jm_ctx_priority). */
> + __u32 priority;
> +};
> +
> +struct drm_panfrost_jm_ctx_destroy {
> + /**
> + * @handle: Handle of the JM context to destroy.
> + *
> + * Must be a valid context handle returned by DRM_IOCTL_PANTHOR_JM_CTX_CREATE.
> + */
> + __u32 handle;
> +
> + /** @pad: Padding field, MBZ. */
> + __u32 pad;
> +};
> +
> #if defined(__cplusplus)
> }
> #endif
next prev parent reply other threads:[~2025-09-10 15:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 0:07 [PATCH v2 0/4] Introduce Panfrost JM contexts Adrián Larumbe
2025-09-04 0:07 ` [PATCH v2 1/4] drm/panfrost: Introduce uAPI for JM context creation Adrián Larumbe
2025-09-10 15:42 ` Steven Price [this message]
2025-09-04 0:08 ` [PATCH v2 2/4] drm/panfrost: Introduce JM contexts for manging job resources Adrián Larumbe
2025-09-10 15:42 ` Steven Price
2025-09-10 15:52 ` Boris Brezillon
2025-09-10 15:56 ` Steven Price
2025-09-10 16:50 ` Boris Brezillon
2025-09-11 9:30 ` Steven Price
2025-09-12 10:57 ` Adrián Larumbe
2025-09-11 12:54 ` Adrián Larumbe
2025-09-04 0:08 ` [PATCH v2 3/4] drm/panfrost: Expose JM context IOCTLs to UM Adrián Larumbe
2025-09-10 15:42 ` Steven Price
2025-09-11 19:34 ` Adrián Larumbe
2025-09-04 0:08 ` [PATCH v2 4/4] drm/panfrost: Display list of device JM contexts over debugfs Adrián Larumbe
2025-09-10 15:42 ` Steven Price
2025-09-11 14:07 ` Adrián Larumbe
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=0627247d-4ab3-41c5-90ac-18912a96403b@arm.com \
--to=steven.price@arm.com \
--cc=adrian.larumbe@collabora.com \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--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®