Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 13:39:56 -0800	[thread overview]
Message-ID: <761cacef-18c5-490f-a790-fb3b5d439db1@intel.com> (raw)
In-Reply-To: <189089b3-561f-4639-9718-e96c098ee96e@intel.com>


<snip>
>
>>
>>>
>>>> + *  - %DRM_XE_EXEC_QUEUE_SET_PROPERTY_PXP_TYPE - set the type of 
>>>> PXP session
>>>> + *    this queue will be used with. Valid values are listed in enum
>>>> + *    drm_xe_pxp_session_type. %DRM_XE_PXP_TYPE_NONE is the 
>>>> default behavior, so
>>>> + *    there is no need to explicitly set that. When a queue of type
>>>> + *    %DRM_XE_PXP_TYPE_HWDRM is created, the PXP default HWDRM 
>>>> session
>>>> + *    (%XE_PXP_HWDRM_DEFAULT_SESSION) will be started, if isn't 
>>>> already running.
>>>> + *    Given that going into a power-saving state kills PXP HWDRM 
>>>> sessions,
>>>> + *    runtime PM will be blocked while queues of this type are alive.
>>>> + *    All PXP queues will be killed if a PXP invalidation event 
>>>> occurs.
>>> Seems odd to say 'values are listed in ...' and then go on to 
>>> describe each type and provide extra information about them. Seems 
>>> like the extra details should be part of the enum documentation 
>>> instead of here?
>>
>> This is documentation specific to how this ioctl handles those 
>> values, so it belongs here. The 'values are listed in ...' sentence 
>> was about being future proof, in case we update the enum in the 
>> future and don't need to add any extra explanation here.
>>
> That is an argument for having a single point of documentation and 
> that point being the point of definition. Then, if new values are 
> added it is immediately obvious what documentation needs to be updated.

Still not convinced. Having the ioctl-specific info in the enum 
definition would mean having to list the behavior each enum value has 
for each ioctl that uses it; IMO it's cleaner to have them in the ioctl 
documentation itself so it's easy to make clear which special behavior 
applies to which ioctl. Also, when I said not adding any extra 
explanation here for future extensions I was not referring to a mistake; 
for example, compute sessions (which we don't currently support) don't 
have any of the extra requirements that HWDRM sessions have, so we 
wouldn't need to add any extra explanation to this ioctl if we added 
support for those.

Daniele

>
> John.
>
>> Daniele
>>
>>>
>>> John.
>>>
>>>> + *
>>>>    * The example below shows how to use @drm_xe_exec_queue_create 
>>>> to create
>>>>    * a simple exec_queue (no parallel submission) of class
>>>>    * &DRM_XE_ENGINE_CLASS_RENDER.
>>>> @@ -1108,7 +1126,7 @@ struct drm_xe_exec_queue_create {
>>>>   #define DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY        0
>>>>   #define   DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY        0
>>>>   #define   DRM_XE_EXEC_QUEUE_SET_PROPERTY_TIMESLICE 1
>>>> -
>>>> +#define   DRM_XE_EXEC_QUEUE_SET_PROPERTY_PXP_TYPE        2
>>>>       /** @extensions: Pointer to the first extension struct, if 
>>>> any */
>>>>       __u64 extensions;
>>>>   @@ -1694,6 +1712,26 @@ struct drm_xe_oa_stream_info {
>>>>       __u64 reserved[3];
>>>>   };
>>>>   +/**
>>>> + * enum drm_xe_pxp_session_type - Supported PXP session types.
>>>> + *
>>>> + * We currently only support HWDRM sessions, which are used for 
>>>> protected
>>>> + * content that ends up being displayed, but the HW supports 
>>>> multiple types, so
>>>> + * we might extend support in the future.
>>>> + */
>>>> +enum drm_xe_pxp_session_type {
>>>> +    /** @DRM_XE_PXP_TYPE_NONE: PXP not used */
>>>> +    DRM_XE_PXP_TYPE_NONE = 0,
>>>> +    /**
>>>> +     * @DRM_XE_PXP_TYPE_HWDRM: HWDRM sessions are used for content 
>>>> that ends
>>>> +     * up on the display.
>>>> +     */
>>>> +    DRM_XE_PXP_TYPE_HWDRM = 1,
>>>> +};
>>>> +
>>>> +/* ID of the protected content session managed by Xe when PXP is 
>>>> active */
>>>> +#define DRM_XE_PXP_HWDRM_DEFAULT_SESSION 0xf
>>>> +
>>>>   #if defined(__cplusplus)
>>>>   }
>>>>   #endif
>>
>


  reply	other threads:[~2024-11-14 21:40 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 [this message]
2024-11-15  0:47         ` Daniele Ceraolo Spurio
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=761cacef-18c5-490f-a790-fb3b5d439db1@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