[Intel-gfx] [RFC-v5 08/21] drm/i915/pxp: Enable PXP power management

2020-12-10 Thread Huang, Sean Z
the power cycle. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/gt/intel_gt_pm.c| 4 ++ drivers/gpu/drm/i915/i915_drv.c | 4 ++ drivers/gpu/drm/i915/pxp/intel_pxp_context.h | 1 + drivers/gpu/drm/i915/pxp

[Intel-gfx] [RFC-v5 12/21] drm/i915/pxp: User interface for Protected buffer

2020-12-10 Thread Huang, Sean Z
From: Bommu Krishnaiah This api allow user mode to create Protected buffer and context creation. Signed-off-by: Bommu Krishnaiah Cc: Telukuntla Sreedhar Cc: Kondapally Kalyan Cc: Gupta Anshuman Cc: Huang Sean Z --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 15 ++-- drivers

[Intel-gfx] [RFC-v5 00/21] Introduce Intel PXP component - Mesa single session

2020-12-10 Thread Huang, Sean Z
#14 to fix the build problem. Anshuman Gupta (1): drm/i915/pxp: Add plane decryption support Bommu Krishnaiah (2): drm/i915/uapi: introduce drm_i915_gem_create_ext drm/i915/pxp: User interface for Protected buffer Huang, Sean Z (17): drm/i915/pxp: Introduce Intel PXP component drm/i91

[Intel-gfx] [RFC-v5 05/21] drm/i915/pxp: Func to send hardware session termination

2020-12-10 Thread Huang, Sean Z
Implement the functions to allow PXP to send a GPU command, in order to terminate the hardware session, so hardware can recycle this session slot for the next usage. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/pxp/intel_pxp_cmd.c | 156

[Intel-gfx] [RFC-v5 03/21] drm/i915/pxp: Implement funcs to create the TEE channel

2020-12-10 Thread Huang, Sean Z
Implement the funcs to create the TEE channel, so kernel can send the TEE commands directly to TEE for creating the arbitrary (defualt) session. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 3 +- drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm

[Intel-gfx] [RFC-v5 01/21] drm/i915/pxp: Introduce Intel PXP component

2020-12-10 Thread Huang, Sean Z
(a.k.a default session or arbitrary session). So Mesa can allocate the protected buffer, which is encrypted with the leverage of the arbitrary hardware session. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Kconfig | 19 + drivers/gpu/drm/i915/Makefile

[Intel-gfx] [RFC-v5 16/21] drm/i915/pxp: Implement ioctl action to terminate the session

2020-12-10 Thread Huang, Sean Z
Implement the PXP ioctl action to allow userspace driver to terminate the hardware session and cleanup its software session state. PXP sends the session termination command to GPU once receves this ioctl action. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 10

[Intel-gfx] [RFC-v5 04/21] drm/i915/pxp: Create the arbitrary session after boot

2020-12-10 Thread Huang, Sean Z
needs to be re-created after teardown or power event because hardware encryption key won't be valid after such cases. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c | 1 + drivers/gpu/drm/i915/pxp/intel_pxp.h

[Intel-gfx] [RFC-v4 18/21] drm/i915/pxp: Enable ioctl action to query PXP tag

2020-12-09 Thread Huang, Sean Z
Enable the PXP ioctl action to allow userspace driver to query the PXP tag, which is a 32-bit bitwise value indicating the current session info, including protection type, session id, and whether the session is enabled. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c

[Intel-gfx] [RFC-v4 07/21] drm/i915/pxp: Destroy arb session upon teardown

2020-12-09 Thread Huang, Sean Z
Teardown is triggered when the display topology changes and no long meets the secure playback requirement, and hardware trashes all the encryption keys for display. So as a result, PXP should handle such case and terminate the type0 sessions, which including arb session Signed-off-by: Huang, Sean

[Intel-gfx] [RFC-v4 08/21] drm/i915/pxp: Enable PXP power management

2020-12-09 Thread Huang, Sean Z
the power cycle. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/gt/intel_gt_pm.c| 4 ++ drivers/gpu/drm/i915/i915_drv.c | 4 ++ drivers/gpu/drm/i915/pxp/intel_pxp_context.h | 1 + drivers/gpu/drm/i915/pxp

[Intel-gfx] [RFC-v4 10/21] mei: pxp: export pavp client to me client bus

2020-12-09 Thread Huang, Sean Z
From: Vitaly Lubart Export PAVP client to work with i915_cp driver, for binding it uses kernel component framework. Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler --- drivers/misc/mei/Kconfig | 2 + drivers/misc/mei/Makefile | 1 + drivers/misc/mei/pxp/Kconfig |

[Intel-gfx] [RFC-v4 14/21] drm/i915/pxp: Implement ioctl action to reserve session slots

2020-12-09 Thread Huang, Sean Z
With this ioctl action, userspace driver can reserve one or multiple session slot/id assigned by kernel PXP, as the first step of PXP session establishment flow. The session info is stored in the session list structure. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile

[Intel-gfx] [RFC-v4 19/21] drm/i915/pxp: Termiante the session upon app crash

2020-12-09 Thread Huang, Sean Z
PXP should terminate the hardware session and cleanup the software state gracefully when the application has established the protection session, but doesn't close the session correctly due to some cases like application crash. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [RFC-v4 11/21] drm/i915/uapi: introduce drm_i915_gem_create_ext

2020-12-09 Thread Huang, Sean Z
From: Bommu Krishnaiah Same old gem_create but with now with extensions support. This is needed to support various upcoming usecases. For now we use the extensions mechanism to support PAVP. Signed-off-by: Bommu Krishnaiah Signed-off-by: Matthew Auld Cc: Joonas Lahtinen

[Intel-gfx] [RFC-v4 17/21] drm/i915/pxp: Implement ioctl action to send TEE commands

2020-12-09 Thread Huang, Sean Z
Implement the ioctl action to allow userspace driver sends TEE commands via PXP ioctl, instead of TEE iotcl. So we can centralize those protection operations at PXP. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 48 +--- drivers/gpu/drm/i915/pxp

[Intel-gfx] [RFC-v4 21/21] drm/i915/pxp: Enable the PXP ioctl for protected session

2020-12-09 Thread Huang, Sean Z
In the previous commits, we have implemented the PXP ioctl functions. Now we enable those handlers and expose them as PXP ioctl, so allow the userspace driver can establish, set, or destory the protected session via this ioctl. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [RFC-v4 13/21] drm/i915/pxp: Add plane decryption support

2020-12-09 Thread Huang, Sean Z
user_flags instead gem_object_metadata. [Krishna] Cc: Bommu Krishnaiah Cc: Huang, Sean Z Signed-off-by: Anshuman Gupta --- drivers/gpu/drm/i915/display/intel_sprite.c | 21 ++--- drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 19 insertions(+), 3 deletions

[Intel-gfx] [RFC-v4 12/21] drm/i915/pxp: User interface for Protected buffer

2020-12-09 Thread Huang, Sean Z
From: Bommu Krishnaiah This api allow user mode to create Protected buffer and context creation. Signed-off-by: Bommu Krishnaiah Cc: Telukuntla Sreedhar Cc: Kondapally Kalyan Cc: Gupta Anshuman Cc: Huang Sean Z --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 15 ++-- drivers

[Intel-gfx] [RFC-v4 16/21] drm/i915/pxp: Implement ioctl action to terminate the session

2020-12-09 Thread Huang, Sean Z
Implement the PXP ioctl action to allow userspace driver to terminate the hardware session and cleanup its software session state. PXP sends the session termination command to GPU once receves this ioctl action. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 10

[Intel-gfx] [RFC-v4 05/21] drm/i915/pxp: Func to send hardware session termination

2020-12-09 Thread Huang, Sean Z
Implement the functions to allow PXP to send a GPU command, in order to terminate the hardware session, so hardware can recycle this session slot for the next usage. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/pxp/intel_pxp_cmd.c | 156

[Intel-gfx] [RFC-v4 03/21] drm/i915/pxp: Implement funcs to create the TEE channel

2020-12-09 Thread Huang, Sean Z
Implement the funcs to create the TEE channel, so kernel can send the TEE commands directly to TEE for creating the arbitrary (defualt) session. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 3 +- drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm

[Intel-gfx] [RFC-v4 20/21] drm/i915/pxp: Add PXP-related registers into allowlist

2020-12-09 Thread Huang, Sean Z
Add several PXP-related reg into allowlist to allow user space driver to read the those register values. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/i915_reg.h | 6 drivers/gpu/drm/i915/intel_uncore.c | 50 - 2 files changed, 41 insertions(+), 15

[Intel-gfx] [RFC-v4 09/21] drm/i915/pxp: Expose session state for display protection flip

2020-12-09 Thread Huang, Sean Z
Implement the intel_pxp_gem_object_status() to allow i915 display querying the current PXP session state. In the design, display should not perform protection flip on the protected buffers if there is no PXP session alive. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c

[Intel-gfx] [RFC-v4 15/21] drm/i915/pxp: Implement ioctl action to set session in play

2020-12-09 Thread Huang, Sean Z
is ready for secure playback. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c| 11 +- drivers/gpu/drm/i915/pxp/intel_pxp_sm.c | 51 + drivers/gpu/drm/i915/pxp/intel_pxp_sm.h | 2 + 3 files changed, 63 insertions(+), 1 deletion(-) diff --git a/

[Intel-gfx] [RFC-v4 00/21] Introduce Intel PXP component - Mesa single session

2020-12-09 Thread Huang, Sean Z
/i915/uapi: introduce drm_i915_gem_create_ext drm/i915/pxp: User interface for Protected buffer Huang, Sean Z (17): drm/i915/pxp: Introduce Intel PXP component drm/i915/pxp: set KCR reg init during the boot time drm/i915/pxp: Implement funcs to create the TEE channel drm/i915/pxp: Create

[Intel-gfx] [RFC-v4 01/21] drm/i915/pxp: Introduce Intel PXP component

2020-12-09 Thread Huang, Sean Z
(a.k.a default session or arbitrary session). So Mesa can allocate the protected buffer, which is encrypted with the leverage of the arbitrary hardware session. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Kconfig | 19 + drivers/gpu/drm/i915/Makefile

[Intel-gfx] [RFC-v4 06/21] drm/i915/pxp: Enable PXP irq worker and callback stub

2020-12-09 Thread Huang, Sean Z
Create the irq worker that serves as callback handler, those callback stubs should be called while the hardware key teardown occurs. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/gt/intel_gt_irq.c | 4 + drivers/gpu/drm/i915/i915_reg.h | 3 +- drivers/gpu/drm/i915

[Intel-gfx] [RFC-v4 02/21] drm/i915/pxp: set KCR reg init during the boot time

2020-12-09 Thread Huang, Sean Z
Set the KCR init during the boot time, which is required by hardware, to allow us doing further protection operation such as sending commands to GPU or TEE. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers

[Intel-gfx] [RFC-v4 04/21] drm/i915/pxp: Create the arbitrary session after boot

2020-12-09 Thread Huang, Sean Z
needs to be re-created after teardown or power event because hardware encryption key won't be valid after such cases. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c | 1 + drivers/gpu/drm/i915/pxp/intel_pxp.h

Re: [Intel-gfx] [RFC-v3 02/13] drm/i915/pxp: set KCR reg init during the boot time

2020-12-09 Thread Huang, Sean Z
Yes, you're correct. I missed this one and it should be removed from this commit. Best regards, Sean -Original Message- From: Rodrigo Vivi Sent: Wednesday, December 9, 2020 10:08 AM To: Huang, Sean Z Cc: Intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [RFC-v3 02/13] drm/i915/

Re: [Intel-gfx] [RFC-v3 01/13] drm/i915/pxp: Introduce Intel PXP component

2020-12-09 Thread Huang, Sean Z
rigo Vivi Sent: Wednesday, December 9, 2020 10:06 AM To: Huang, Sean Z Cc: Intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [RFC-v3 01/13] drm/i915/pxp: Introduce Intel PXP component On Tue, Dec 08, 2020 at 11:02:55PM -0800, Huang, Sean Z wrote: > PXP (Protected Xe Path) is an i915 co

[Intel-gfx] [RFC-v3 13/13] drm/i915/pxp: Add plane decryption support

2020-12-08 Thread Huang, Sean Z
user_flags instead gem_object_metadata. [Krishna] Cc: Bommu Krishnaiah Cc: Huang, Sean Z Signed-off-by: Anshuman Gupta --- drivers/gpu/drm/i915/display/intel_sprite.c | 21 ++--- drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 19 insertions(+), 3 deletions

[Intel-gfx] [RFC-v3 10/13] mei: pxp: export pavp client to me client bus

2020-12-08 Thread Huang, Sean Z
From: Vitaly Lubart Export PAVP client to work with i915_cp driver, for binding it uses kernel component framework. Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler --- drivers/misc/mei/Kconfig | 2 + drivers/misc/mei/Makefile | 1 + drivers/misc/mei/pxp/Kconfig |

[Intel-gfx] [RFC-v3 05/13] drm/i915/pxp: Func to send hardware session termination

2020-12-08 Thread Huang, Sean Z
Implement the functions to allow PXP to send a GPU command, in order to terminate the hardware session, so hardware can recycle this session slot for the next usage. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/pxp/intel_pxp_cmd.c | 156

[Intel-gfx] [RFC-v3 08/13] drm/i915/pxp: Enable PXP power management

2020-12-08 Thread Huang, Sean Z
the power cycle. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/gt/intel_gt_pm.c| 4 ++ drivers/gpu/drm/i915/i915_drv.c | 4 ++ drivers/gpu/drm/i915/pxp/intel_pxp_context.h | 1 + drivers/gpu/drm/i915/pxp

[Intel-gfx] [RFC-v3 12/13] drm/i915/pxp: User interface for Protected buffer

2020-12-08 Thread Huang, Sean Z
From: Bommu Krishnaiah This api allow user mode to create Protected buffer and context creation. Signed-off-by: Bommu Krishnaiah Cc: Telukuntla Sreedhar Cc: Kondapally Kalyan Cc: Gupta Anshuman Cc: Huang Sean Z --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 15 ++-- drivers

[Intel-gfx] [RFC-v3 04/13] drm/i915/pxp: Create the arbitrary session after boot

2020-12-08 Thread Huang, Sean Z
needs to be re-created after teardown or power event because hardware encryption key won't be valid after such cases. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c | 1 + drivers/gpu/drm/i915/pxp/intel_pxp.h

[Intel-gfx] [RFC-v3 03/13] drm/i915/pxp: Implement funcs to create the TEE channel

2020-12-08 Thread Huang, Sean Z
Implement the funcs to create the TEE channel, so kernel can send the TEE commands directly to TEE for creating the arbitrary (defualt) session. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 3 +- drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm

[Intel-gfx] [RFC-v3 06/13] drm/i915/pxp: Enable PXP irq worker and callback stub

2020-12-08 Thread Huang, Sean Z
Create the irq worker that serves as callback handler, those callback stubs should be called while the hardware key teardown occurs. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/gt/intel_gt_irq.c | 4 + drivers/gpu/drm/i915/i915_reg.h | 3 +- drivers/gpu/drm/i915

[Intel-gfx] [RFC-v3 02/13] drm/i915/pxp: set KCR reg init during the boot time

2020-12-08 Thread Huang, Sean Z
Set the KCR init during the boot time, which is required by hardware, to allow us doing further protection operation such as sending commands to GPU or TEE. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 8 drivers/gpu/drm/i915/pxp/intel_pxp.h | 6 ++ 2

[Intel-gfx] [RFC-v3 09/13] drm/i915/pxp: Expose session state for display protection flip

2020-12-08 Thread Huang, Sean Z
Implement the intel_pxp_gem_object_status() to allow i915 display querying the current PXP session state. In the design, display should not perform protection flip on the protected buffers if there is no PXP session alive. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c

[Intel-gfx] [RFC-v3 07/13] drm/i915/pxp: Destroy arb session upon teardown

2020-12-08 Thread Huang, Sean Z
Teardown is triggered when the display topology changes and no long meets the secure playback requirement, and hardware trashes all the encryption keys for display. So as a result, PXP should handle such case and terminate the type0 sessions, which including arb session Signed-off-by: Huang, Sean

[Intel-gfx] [RFC-v3 01/13] drm/i915/pxp: Introduce Intel PXP component

2020-12-08 Thread Huang, Sean Z
(a.k.a default session or arbitrary session). So Mesa can allocate the protected buffer, which is encrypted with the leverage of the arbitrary hardware session. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Kconfig | 19 + drivers/gpu/drm/i915/Makefile

[Intel-gfx] [RFC-v3 00/13] Introduce Intel PXP component - Mesa single session

2020-12-08 Thread Huang, Sean Z
buffer Huang, Sean Z (9): drm/i915/pxp: Introduce Intel PXP component drm/i915/pxp: set KCR reg init during the boot time drm/i915/pxp: Implement funcs to create the TEE channel drm/i915/pxp: Create the arbitrary session after boot drm/i915/pxp: Func to send hardware session termination

[Intel-gfx] [RFC-v3 11/13] drm/i915/uapi: introduce drm_i915_gem_create_ext

2020-12-08 Thread Huang, Sean Z
From: Bommu Krishnaiah Same old gem_create but with now with extensions support. This is needed to support various upcoming usecases. For now we use the extensions mechanism to support PAVP. Signed-off-by: Bommu Krishnaiah Signed-off-by: Matthew Auld Cc: Joonas Lahtinen

[Intel-gfx] [RFC-v2 01/13] drm/i915/pxp: Introduce Intel PXP component

2020-12-08 Thread Huang, Sean Z
(a.k.a default session or arbitrary session). So Mesa can allocate the protected buffer, which is encrypted with the leverage of the arbitrary hardware session. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Kconfig | 19 + drivers/gpu/drm/i915/Makefile

[Intel-gfx] [RFC-v2 00/13] Introduce Intel PXP component - Mesa single session

2020-12-08 Thread Huang, Sean Z
the pxp init call from i915_drv.c to intel_gt.c - reove the tautology naming Anshuman Gupta (1): drm/i915/pxp: Add plane decryption support Bommu Krishnaiah (2): drm/i915/uapi: introduce drm_i915_gem_create_ext drm/i915/pxp: User interface for Protected buffer Huang, Sean Z (9): drm/i915

[Intel-gfx] [RFC-v2 12/13] drm/i915/pxp: User interface for Protected buffer

2020-12-08 Thread Huang, Sean Z
From: Bommu Krishnaiah This api allow user mode to create Protected buffer and context creation. Signed-off-by: Bommu Krishnaiah Cc: Telukuntla Sreedhar Cc: Kondapally Kalyan Cc: Gupta Anshuman Cc: Huang Sean Z --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 15 ++-- drivers

[Intel-gfx] [RFC-v2 13/13] drm/i915/pxp: Add plane decryption support

2020-12-08 Thread Huang, Sean Z
user_flags instead gem_object_metadata. [Krishna] Cc: Bommu Krishnaiah Cc: Huang, Sean Z Signed-off-by: Anshuman Gupta --- drivers/gpu/drm/i915/display/intel_sprite.c | 21 ++--- drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 19 insertions(+), 3 deletions

[Intel-gfx] [RFC-v2 08/13] drm/i915/pxp: Enable PXP power management

2020-12-08 Thread Huang, Sean Z
the power cycle. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/gt/intel_gt_pm.c| 4 ++ drivers/gpu/drm/i915/i915_drv.c | 4 ++ drivers/gpu/drm/i915/pxp/intel_pxp_context.h | 1 + drivers/gpu/drm/i915/pxp

[Intel-gfx] [RFC-v2 09/13] drm/i915/pxp: Expose session state for display protection flip

2020-12-08 Thread Huang, Sean Z
Implement the intel_pxp_gem_object_status() to allow i915 display querying the current PXP session state. In the design, display should not perform protection flip on the protected buffers if there is no PXP session alive. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c

[Intel-gfx] [RFC-v2 10/13] mei: pxp: export pavp client to me client bus

2020-12-08 Thread Huang, Sean Z
From: Vitaly Lubart Export PAVP client to work with i915_cp driver, for binding it uses kernel component framework. Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler --- drivers/misc/mei/Kconfig | 2 + drivers/misc/mei/Makefile | 1 + drivers/misc/mei/pxp/Kconfig |

[Intel-gfx] [RFC-v2 06/13] drm/i915/pxp: Enable PXP irq worker and callback stub

2020-12-08 Thread Huang, Sean Z
Create the irq worker that serves as callback handler, those callback stubs should be called while the hardware key teardown occurs. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/gt/intel_gt_irq.c | 4 + drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915

[Intel-gfx] [RFC-v2 11/13] drm/i915/uapi: introduce drm_i915_gem_create_ext

2020-12-08 Thread Huang, Sean Z
From: Bommu Krishnaiah Same old gem_create but with now with extensions support. This is needed to support various upcoming usecases. For now we use the extensions mechanism to support PAVP. Signed-off-by: Bommu Krishnaiah Signed-off-by: Matthew Auld Cc: Joonas Lahtinen

[Intel-gfx] [RFC-v2 07/13] drm/i915/pxp: Destroy arb session upon teardown

2020-12-08 Thread Huang, Sean Z
Teardown is triggered when the display topology changes and no long meets the secure playback requirement, and hardware trashes all the encryption keys for display. So as a result, PXP should handle such case and terminate the type0 sessions, which including arb session Signed-off-by: Huang, Sean

[Intel-gfx] [RFC-v2 03/13] drm/i915/pxp: Implement funcs to create the TEE channel

2020-12-08 Thread Huang, Sean Z
Implement the funcs to create the TEE channel, so kernel can send the TEE commands directly to TEE for creating the arbitrary (defualt) session. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 3 +- drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm

[Intel-gfx] [RFC-v2 04/13] drm/i915/pxp: Create the arbitrary session after boot

2020-12-08 Thread Huang, Sean Z
needs to be re-created after teardown or power event because hardware encryption key won't be valid after such cases. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c | 1 + drivers/gpu/drm/i915/pxp/intel_pxp.h

[Intel-gfx] [RFC-v2 05/13] drm/i915/pxp: Func to send hardware session termination

2020-12-08 Thread Huang, Sean Z
Implement the functions to allow PXP to send a GPU command, in order to terminate the hardware session, so hardware can recycle this session slot for the next usage. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/pxp/intel_pxp_cmd.c | 156

[Intel-gfx] [RFC-v2 02/13] drm/i915/pxp: set KCR reg init during the boot time

2020-12-08 Thread Huang, Sean Z
Set the KCR init during the boot time, which is required by hardware, to allow us doing further protection operation such as sending commands to GPU or TEE. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 8 drivers/gpu/drm/i915/pxp/intel_pxp.h | 6 ++ 2

Re: [Intel-gfx] [RFC-v1 09/16] drm/i915/pxp: Func to send hardware session termination

2020-12-08 Thread Huang, Sean Z
or them. Please share some source code or example commit doing so if it's necessary. Thanks. Best regards, Sean -Original Message- From: Joonas Lahtinen Sent: Monday, December 7, 2020 4:21 AM To: Huang, Sean Z ; Intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [RFC-v1 09/16] drm

Re: [Intel-gfx] [RFC-v1 08/16] drm/i915/pxp: Create the arbitrary session after boot

2020-12-08 Thread Huang, Sean Z
I have removed the dead code that specific for multi-session, and will upload the new version soon. -Original Message- From: Joonas Lahtinen Sent: Monday, December 7, 2020 4:01 AM To: Huang, Sean Z ; Intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [RFC-v1 08/16] drm/i915/pxp

Re: [Intel-gfx] [RFC-v1 07/16] drm/i915/pxp: Implement funcs to create the TEE channel

2020-12-08 Thread Huang, Sean Z
Thanks, Yes for single session there is no ioctl exposed so I correct the commit description. Best regards, Sean -Original Message- From: Joonas Lahtinen Sent: Monday, December 7, 2020 3:56 AM To: Huang, Sean Z ; Intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [RFC-v1 07/16

Re: [Intel-gfx] [RFC-v1 04/16] drm/i915/pxp: set KCR reg init during the boot time

2020-12-08 Thread Huang, Sean Z
--Original Message- From: Joonas Lahtinen Sent: Monday, December 7, 2020 3:11 AM To: Huang, Sean Z ; Intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [RFC-v1 04/16] drm/i915/pxp: set KCR reg init during the boot time Quoting Huang, Sean Z (2020-12-07 02:21:22) > Set the KCR init d

Re: [Intel-gfx] [RFC-v1 06/16] drm/i915/pxp: Implement funcs to get/set PXP tag

2020-12-08 Thread Huang, Sean Z
Hi Joonas, Yes, I have removed this commit for single session patch series. -Original Message- From: Joonas Lahtinen Sent: Monday, December 7, 2020 3:52 AM To: Huang, Sean Z ; Intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [RFC-v1 06/16] drm/i915/pxp: Implement funcs to get

Re: [Intel-gfx] [RFC-v1 03/16] drm/i915/pxp: Add PXP context for logical hardware states.

2020-12-08 Thread Huang, Sean Z
> will be, so can't recommend better names. DONE > In this series, there will be no user space context ID, but only a singleton > implicit session. So we should not need any tracking code. DONE -Original Message- From: Joonas Lahtinen Sent: Monday, December 7, 2020 2:51 AM To: Huang,

Re: [Intel-gfx] [RFC-v1 02/16] drm/i915/pxp: Enable PXP irq worker and callback stub

2020-12-07 Thread Huang, Sean Z
way earlier than they >are used. >We should be adding the base structs at most and extending them as we add more >functionality as we go. DONE, Thanks for capturing this, this enum is for session management only and I have removed this. -Original Message- From: Joonas Lahtinen Sent:

Re: [Intel-gfx] [RFC-v1 01/16] drm/i915/pxp: Introduce Intel PXP component

2020-12-07 Thread Huang, Sean Z
-Original Message----- From: Huang, Sean Z Sent: Monday, December 7, 2020 10:26 AM To: Joonas Lahtinen ; Intel-gfx@lists.freedesktop.org Subject: RE: [Intel-gfx] [RFC-v1 01/16] drm/i915/pxp: Introduce Intel PXP component Hi Joonas, Thanks for the details review. I have apply the modification

Re: [Intel-gfx] [RFC-v1 01/16] drm/i915/pxp: Introduce Intel PXP component

2020-12-07 Thread Huang, Sean Z
lly want to tighten the scope to intel_pxp and call this > from intel_gt_fini(), so signature should look like: void > intel_pxp_fini(struct intel_pxp *pxp) DONE Best regards, Sean -Original Message- From: Joonas Lahtinen Sent: Monday, December 7, 2020 2:01 AM To: Huang, Sean Z ; Int

[Intel-gfx] [RFC-v1 16/16] drm/i915/pxp: Add plane decryption support

2020-12-06 Thread Huang, Sean Z
user_flags instead gem_object_metadata. [Krishna] Cc: Bommu Krishnaiah Cc: Huang, Sean Z Signed-off-by: Anshuman Gupta --- drivers/gpu/drm/i915/display/intel_sprite.c | 21 ++--- drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 19 insertions(+), 3 deletions

[Intel-gfx] [RFC-v1 08/16] drm/i915/pxp: Create the arbitrary session after boot

2020-12-06 Thread Huang, Sean Z
needs to be re-created after teardown or power event because hardware encryption key won't be valid after such cases. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 47 ++- drivers/gpu/drm/i915/pxp/intel_pxp.h | 7 + drivers/gpu/drm/i915/pxp/intel_pxp_sm.c

[Intel-gfx] [RFC-v1 03/16] drm/i915/pxp: Add PXP context for logical hardware states.

2020-12-06 Thread Huang, Sean Z
Add PXP context which represents combined view of driver and logical HW states. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 3 +- drivers/gpu/drm/i915/pxp/intel_pxp.c | 29 - drivers/gpu/drm/i915/pxp/intel_pxp.h | 3 ++ drivers

[Intel-gfx] [RFC-v1 11/16] drm/i915/pxp: Enable PXP power management

2020-12-06 Thread Huang, Sean Z
the power cycle. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.c | 8 +++ drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 70 + drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 31 +++ 4 files changed

[Intel-gfx] [RFC-v1 12/16] drm/i915/pxp: Expose session state for display protection flip

2020-12-06 Thread Huang, Sean Z
Implement the intel_pxp_gem_object_status() to allow i915 display querying the current PXP session state. In the design, display should not perform protection flip on the protected buffers if there is no PXP session alive. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c

[Intel-gfx] [RFC-v1 06/16] drm/i915/pxp: Implement funcs to get/set PXP tag

2020-12-06 Thread Huang, Sean Z
Implement the functions to get/set the PXP tag, which is 32-bit bitwise value containing the hardware session info, such as its session id, protection mode or whether it's enabled. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp_sm.c | 125 ++-- drivers

[Intel-gfx] [RFC-v1 14/16] drm/i915/uapi: introduce drm_i915_gem_create_ext

2020-12-06 Thread Huang, Sean Z
From: Bommu Krishnaiah Same old gem_create but with now with extensions support. This is needed to support various upcoming usecases. For now we use the extensions mechanism to support PAVP. Signed-off-by: Bommu Krishnaiah Signed-off-by: Matthew Auld Cc: Joonas Lahtinen

[Intel-gfx] [RFC-v1 13/16] mei: pxp: export pavp client to me client bus

2020-12-06 Thread Huang, Sean Z
From: Vitaly Lubart Export PAVP client to work with i915_cp driver, for binding it uses kernel component framework. Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler --- drivers/misc/mei/Kconfig | 2 + drivers/misc/mei/Makefile | 1 + drivers/misc/mei/pxp/Kconfig |

[Intel-gfx] [RFC-v1 05/16] drm/i915/pxp: Read register to check hardware session state

2020-12-06 Thread Huang, Sean Z
Implement the functions to check the hardware protected session state via reading the hardware register session in play. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.h| 3 + drivers/gpu/drm/i915/pxp/intel_pxp_sm.c | 177 drivers/gpu/drm/i915

[Intel-gfx] [RFC-v1 07/16] drm/i915/pxp: Implement funcs to create the TEE channel

2020-12-06 Thread Huang, Sean Z
Currently ring3 driver sends the TEE commands directly to TEE, but later, as our design, we would like to make ring3 sending the TEE commands via the ring0 PXP ioctl action instead of TEE ioctl, so we can centralize those protection operations at ring0 PXP. Signed-off-by: Huang, Sean Z

[Intel-gfx] [RFC-v1 15/16] drm/i915/pxp: User interface for Protected buffer

2020-12-06 Thread Huang, Sean Z
From: Bommu Krishnaiah This api allow user mode to create Protected buffer and context creation. Signed-off-by: Bommu Krishnaiah Cc: Telukuntla Sreedhar Cc: Kondapally Kalyan Cc: Gupta Anshuman Cc: Huang Sean Z --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 15 ++-- drivers

[Intel-gfx] [RFC-v1 10/16] drm/i915/pxp: Destroy arb session upon teardown

2020-12-06 Thread Huang, Sean Z
Teardown is triggered when the display topology changes and no long meets the secure playback requirement, and hardware trashes all the encryption keys for display. So as a result, PXP should handle such case and terminate the type0 sessions, which including arb session Signed-off-by: Huang, Sean

[Intel-gfx] [RFC-v1 04/16] drm/i915/pxp: set KCR reg init during the boot time

2020-12-06 Thread Huang, Sean Z
Set the KCR init during the boot time, which is required by hardware, to allow us doing further protection operation such as sending commands to GPU or TEE Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/pxp/intel_pxp.c| 11

[Intel-gfx] [RFC-v1 09/16] drm/i915/pxp: Func to send hardware session termination

2020-12-06 Thread Huang, Sean Z
Implement the functions to allow PXP to send a GPU command, in order to terminate the hardware session, so hardware can recycle this session slot for the next usage. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp_sm.c | 150 1 file changed, 150

[Intel-gfx] [RFC-v1 02/16] drm/i915/pxp: Enable PXP irq worker and callback stub

2020-12-06 Thread Huang, Sean Z
Create the irq worker that serves as callback handler, those callback stubs should be called while the hardware key teardown occurs. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/gt/intel_gt_irq.c | 4 ++ drivers/gpu/drm/i915/i915_reg.h| 1 + drivers/gpu/drm/i915/pxp

[Intel-gfx] [RFC-v1 00/16] Introduce Intel PXP component - Mesa single session

2020-12-06 Thread Huang, Sean Z
for Protected buffer Huang, Sean Z (12): drm/i915/pxp: Introduce Intel PXP component drm/i915/pxp: Enable PXP irq worker and callback stub drm/i915/pxp: Add PXP context for logical hardware states. drm/i915/pxp: set KCR reg init during the boot time drm/i915/pxp: Read register to check hardware

[Intel-gfx] [RFC-v1 01/16] drm/i915/pxp: Introduce Intel PXP component

2020-12-06 Thread Huang, Sean Z
, and destroy each session. It will also provide the communication chanel to TEE (Trusted Execution Environment) for the protected hardware session creation. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Kconfig | 19 drivers/gpu/drm/i915/Makefile| 4

Re: [Intel-gfx] [RFC-v4 24/26] drm/i915/pxp: User interface for Protected buffer

2020-12-04 Thread Huang, Sean Z
: Lionel Landwerlin Sent: Friday, December 4, 2020 6:24 AM To: Huang, Sean Z ; Intel-gfx@lists.freedesktop.org Cc: Bommu, Krishnaiah ; Kondapally, Kalyan Subject: Re: [Intel-gfx] [RFC-v4 24/26] drm/i915/pxp: User interface for Protected buffer On 02/12/2020 06:03, Huang, Sean Z wrote: > F

[Intel-gfx] [RFC-v4 19/26] drm/i915/pxp: Create the arbitrary session after boot

2020-12-01 Thread Huang, Sean Z
needs to be re-created after teardown or power event because hardware encryption key won't be valid after such cases. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 47 +++- drivers/gpu/drm/i915/pxp/intel_pxp.h | 7 drivers/gpu/drm/i915

[Intel-gfx] [RFC-v4 16/26] drm/i915/pxp: Enable PXP power management

2020-12-01 Thread Huang, Sean Z
the power cycle. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/i915_drv.c | 8 +++ drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 72 + drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 31 +++ 4 files changed

[Intel-gfx] [RFC-v4 17/26] drm/i915/pxp: Implement funcs to create the TEE channel

2020-12-01 Thread Huang, Sean Z
Currently ring3 driver sends the TEE commands directly to TEE, but later, as our design, we would like to make ring3 sending the TEE commands via the ring0 PXP ioctl action instead of TEE ioctl, so we can centralize those protection operations at ring0 PXP. Signed-off-by: Huang, Sean Z

[Intel-gfx] [RFC-v4 13/26] drm/i915/pxp: Enable ioctl action to query PXP tag

2020-12-01 Thread Huang, Sean Z
Enable the PXP ioctl action to allow user space driver to query the PXP tag, which is a 32-bit bitwise value indicating the current session info, including protection type, session id, and whether the session is enabled. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c

[Intel-gfx] [RFC-v4 07/26] drm/i915/pxp: Read register to check hardware session state

2020-12-01 Thread Huang, Sean Z
Implement the functions to check the hardware protected session state via reading the hardware register session in play. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.h| 3 + drivers/gpu/drm/i915/pxp/intel_pxp_sm.c | 177 drivers/gpu/drm/i915

[Intel-gfx] [RFC-v4 24/26] drm/i915/pxp: User interface for Protected buffer

2020-12-01 Thread Huang, Sean Z
From: Bommu Krishnaiah This api allow user mode to create Protected buffer and context creation. Signed-off-by: Bommu Krishnaiah Cc: Telukuntla Sreedhar Cc: Kondapally Kalyan Cc: Gupta Anshuman Cc: Huang Sean Z --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 15 ++-- drivers

[Intel-gfx] [RFC-v4 15/26] drm/i915/pxp: Termiante the session upon app crash

2020-12-01 Thread Huang, Sean Z
PXP should terminate the hardware session and cleanup the software state gracefully when the application has established the protection session, but doesn't close the session correctly due to some cases like application crash. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [RFC-v4 23/26] drm/i915/uapi: introduce drm_i915_gem_create_ext

2020-12-01 Thread Huang, Sean Z
From: Bommu Krishnaiah Same old gem_create but with now with extensions support. This is needed to support various upcoming usecases. For now we use the extensions mechanism to support PAVP. Signed-off-by: Bommu Krishnaiah Signed-off-by: Matthew Auld Cc: Joonas Lahtinen

[Intel-gfx] [RFC-v4 05/26] drm/i915/pxp: Implement ioctl action to set the user space context

2020-12-01 Thread Huang, Sean Z
Implement one ioctl action to allow user space driver to set its user space context, so PXP can track the context id through this user space context list. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 57 drivers/gpu/drm/i915/pxp

[Intel-gfx] [RFC-v4 22/26] mei: pxp: export pavp client to me client bus

2020-12-01 Thread Huang, Sean Z
From: Vitaly Lubart Export PAVP client to work with i915_cp driver, for binding it uses kernel component framework. Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler --- drivers/misc/mei/Kconfig | 2 + drivers/misc/mei/Makefile | 1 + drivers/misc/mei/pxp/Kconfig |

[Intel-gfx] [RFC-v4 18/26] drm/i915/pxp: Implement ioctl action to send TEE commands

2020-12-01 Thread Huang, Sean Z
Implement the ioctl action to allow user space driver sends TEE commands via PXP ioctl, instead of TEE iotcl. So we can centralize those protection operations at PXP. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 14 ++ drivers/gpu/drm/i915/pxp/intel_pxp.h

[Intel-gfx] [RFC-v4 21/26] drm/i915/pxp: Expose session state for display protection flip

2020-12-01 Thread Huang, Sean Z
Implement the intel_pxp_gem_object_status() to allow i915 display querying the current PXP session state. In the design, display should not perform protection flip on the protected buffers if there is no PXP session alive. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c

[Intel-gfx] [RFC-v4 06/26] drm/i915/pxp: Add PXP-related registers into allowlist

2020-12-01 Thread Huang, Sean Z
Add several PXP-related reg into allowlist to allow user space driver to read the those register values. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/i915_reg.h | 6 drivers/gpu/drm/i915/intel_uncore.c | 50 - 2 files changed, 41 insertions(+), 15

<    1   2   3   4   5   6   >