From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: John Harrison <john.c.harrison@intel.com>,
<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v2 07/12] drm/xe/pxp: Add spport for PXP-using queues
Date: Thu, 14 Nov 2024 16:47:59 -0800 [thread overview]
Message-ID: <afeab73d-df94-4a5e-ab70-87cd4d545f79@intel.com> (raw)
In-Reply-To: <189089b3-561f-4639-9718-e96c098ee96e@intel.com>
<snip>
>>>> @@ -343,6 +377,24 @@ static int exec_queue_set_timeslice(struct
>>>> xe_device *xe, struct xe_exec_queue *
>>>> return 0;
>>>> }
>>>> +static int
>>>> +exec_queue_set_pxp_type(struct xe_device *xe, struct xe_exec_queue
>>>> *q, u64 value)
>>>> +{
>>>> + BUILD_BUG_ON(DRM_XE_PXP_TYPE_NONE != 0);
>>> Why a build bug for something that is a simple 'enum { X=0 }'? It's
>>> not like there is some complex macro calculation that could be
>>> broken by some seemingly unrelated change.
>>
>> This was more to make sure that the default value for the extension
>> was 0. Given that this is UAPI and therefore can't change anyway,
>> I'll drop the BUG_ON
>>
>>>
>>>> +
>>>> + if (value == DRM_XE_PXP_TYPE_NONE)
>>>> + return 0;
>>> This doesn't need to shut any existing PXP down? Is it not possible
>>> to dynamically change the type?
>>
>> No, this can only be set at queue creation time
> Would be good to add a comment about that? Maybe even an assert or
> something to ensure this is not called post creation?
Missed this comment on my first read through. All extension functions
are guaranteed to only be called at creation time, so there is no risk
of this being called later.
Daniele
>
>
>>
>>>
>>>> +
>>>> + if (!xe_pxp_is_enabled(xe->pxp))
>>>> + return -ENODEV;
>>>> +
>>>> + /* we only support HWDRM sessions right now */
>>>> + if (XE_IOCTL_DBG(xe, value != DRM_XE_PXP_TYPE_HWDRM))
>>>> + return -EINVAL;
>>>> +
>>>> + return xe_pxp_exec_queue_set_type(xe->pxp, q,
>>>> DRM_XE_PXP_TYPE_HWDRM);
>>>> +}
>>>> +
>>>> typedef int (*xe_exec_queue_set_property_fn)(struct xe_device *xe,
>>>> struct xe_exec_queue *q,
>>>> u64 value);
>>>> @@ -350,6 +402,7 @@ typedef int
>>>> (*xe_exec_queue_set_property_fn)(struct xe_device *xe,
>>>> static const xe_exec_queue_set_property_fn
>>>> exec_queue_set_property_funcs[] = {
>>>> [DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY] =
>>>> exec_queue_set_priority,
>>>> [DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE] =
>>>> exec_queue_set_timeslice,
>>>> + [DRM_XE_EXEC_QUEUE_SET_PROPERTY_PXP_TYPE] =
>>>> exec_queue_set_pxp_type,
>>>> };
>>>> static int exec_queue_user_ext_set_property(struct xe_device *xe,
next prev parent reply other threads:[~2024-11-15 0:48 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-16 19:00 [PATCH v2 00/12] Add PXP HWDRM support Daniele Ceraolo Spurio
2024-08-16 19:00 ` [PATCH v2 01/12] drm/xe/pxp: Initialize PXP structure and KCR reg Daniele Ceraolo Spurio
2024-10-04 20:29 ` John Harrison
2024-08-16 19:00 ` [PATCH v2 02/12] drm/xe/pxp: Allocate PXP execution resources Daniele Ceraolo Spurio
2024-08-19 9:19 ` Jani Nikula
2024-10-04 20:30 ` John Harrison
2024-11-06 22:25 ` Daniele Ceraolo Spurio
2024-08-16 19:00 ` [PATCH v2 03/12] drm/xe/pxp: Add VCS inline termination support Daniele Ceraolo Spurio
2024-10-04 22:25 ` John Harrison
2024-11-06 23:49 ` Daniele Ceraolo Spurio
2024-11-14 18:46 ` John Harrison
2024-08-16 19:00 ` [PATCH v2 04/12] drm/xe/pxp: Add GSC session invalidation support Daniele Ceraolo Spurio
2024-10-07 20:05 ` John Harrison
2024-11-07 0:15 ` Daniele Ceraolo Spurio
2024-08-16 19:00 ` [PATCH v2 05/12] drm/xe/pxp: Handle the PXP termination interrupt Daniele Ceraolo Spurio
2024-10-08 0:34 ` John Harrison
2024-11-07 0:33 ` Daniele Ceraolo Spurio
2024-11-14 19:46 ` John Harrison
2024-08-16 19:00 ` [PATCH v2 06/12] drm/xe/pxp: Add GSC session initialization support Daniele Ceraolo Spurio
2024-10-08 18:43 ` John Harrison
2024-11-07 22:37 ` Daniele Ceraolo Spurio
2024-11-14 20:36 ` John Harrison
2024-08-16 19:00 ` [PATCH v2 07/12] drm/xe/pxp: Add spport for PXP-using queues Daniele Ceraolo Spurio
2024-10-08 23:55 ` John Harrison
2024-11-07 23:57 ` Daniele Ceraolo Spurio
2024-11-14 21:20 ` John Harrison
2024-11-14 21:39 ` Daniele Ceraolo Spurio
2024-11-15 0:47 ` Daniele Ceraolo Spurio [this message]
2024-10-09 10:07 ` Jani Nikula
2024-08-16 19:00 ` [PATCH v2 08/12] drm/xe/pxp: add a query for PXP status Daniele Ceraolo Spurio
2024-10-09 0:09 ` John Harrison
2024-11-12 21:29 ` Daniele Ceraolo Spurio
2024-08-16 19:00 ` [PATCH v2 09/12] drm/xe/pxp: Add API to mark a BO as using PXP Daniele Ceraolo Spurio
2024-10-09 0:42 ` John Harrison
2024-11-12 22:23 ` Daniele Ceraolo Spurio
2024-11-15 17:49 ` John Harrison
2024-11-15 18:03 ` Daniele Ceraolo Spurio
2024-08-16 19:00 ` [PATCH v2 10/12] drm/xe/pxp: add PXP PM support Daniele Ceraolo Spurio
2024-08-26 21:55 ` Daniele Ceraolo Spurio
2024-10-09 1:12 ` John Harrison
2024-11-12 22:27 ` Daniele Ceraolo Spurio
2024-08-16 19:00 ` [PATCH v2 11/12] drm/xe/pxp: Add PXP debugfs support Daniele Ceraolo Spurio
2024-10-09 1:26 ` John Harrison
2024-08-16 19:00 ` [PATCH v2 12/12] drm/xe/pxp: Enable PXP for MTL and LNL Daniele Ceraolo Spurio
2024-10-09 1:27 ` John Harrison
2024-08-16 19:06 ` ✓ CI.Patch_applied: success for Add PXP HWDRM support (rev2) Patchwork
2024-08-16 19:07 ` ✗ CI.checkpatch: warning " Patchwork
2024-08-16 19:08 ` ✓ CI.KUnit: success " Patchwork
2024-08-16 19:23 ` ✓ CI.Build: " Patchwork
2024-08-16 19:25 ` ✗ CI.Hooks: failure " Patchwork
2024-08-16 19:27 ` ✓ CI.checksparse: success " Patchwork
2024-08-16 20:11 ` ✗ CI.BAT: failure " Patchwork
2024-08-17 4:53 ` ✗ CI.FULL: " Patchwork
2024-08-19 14:33 ` [PATCH v2 00/12] Add PXP HWDRM support Souza, Jose
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=afeab73d-df94-4a5e-ab70-87cd4d545f79@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=john.c.harrison@intel.com \
/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