[Intel-gfx] [PATCH 08/27] drm/i915/pxp: Read register to check hardware session state

2020-11-15 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 | 176 drivers/gpu/drm/i915

[Intel-gfx] [PATCH 12/27] drm/i915/pxp: Func to send hardware session termination

2020-11-15 Thread Huang, Sean Z
Implement the functions to allow ring0 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 | 309 drivers/gpu/drm

[Intel-gfx] [PATCH 23/27] mei: bus: enable pavp device.

2020-11-15 Thread Huang, Sean Z
From: Tomas Winkler Enable protected audio video path client on mei client bus. Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus-fixup.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c index 4e30fa98fe7d..042399b397c9

[Intel-gfx] [PATCH 09/27] drm/i915/pxp: Implement funcs to get/set PXP tag

2020-11-15 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 | 105 drivers

[Intel-gfx] [PATCH 27/27] drm/i915/pxp: Add plane decryption support

2020-11-15 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] [PATCH 07/27] drm/i915/pxp: Add PXP-related registers into allowlist

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

[Intel-gfx] [PATCH 20/27] drm/i915/pxp: Create the arbitrary session after boot

2020-11-15 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 | 50 +++- drivers/gpu/drm/i915/pxp/intel_pxp.h | 2 + drivers/gpu/drm/i915/pxp

[Intel-gfx] [PATCH 14/27] drm/i915/pxp: Enable ioctl action to query PXP tag

2020-11-15 Thread Huang, Sean Z
Enable the PXP ioctl action to allow ring3 PXP 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| 7

[Intel-gfx] [PATCH 04/27] drm/i915/pxp: set KCR reg init during the boot time

2020-11-15 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 | 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c| 11

[Intel-gfx] [PATCH 24/27] mei: pxp: export pavp client to me client bus

2020-11-15 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] [PATCH 03/27] drm/i915/pxp: Add PXP context for logical hardware states.

2020-11-15 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 | 32 ++-- drivers/gpu/drm/i915/pxp/intel_pxp.h | 3 ++ drivers

[Intel-gfx] [PATCH 17/27] drm/i915/pxp: Enable PXP power management

2020-11-15 Thread Huang, Sean Z
after the power cycle. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_drv.c | 8 +++ drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 82 + drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 16 + 4 files changed

[Intel-gfx] [PATCH 01/27] drm/i915/pxp: Introduce Intel PXP component

2020-11-15 Thread Huang, Sean Z
. 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/Makefile| 4 drivers/gpu/drm/i915/i915_drv.c | 4 drivers/gpu/drm/i915/i915_drv.h | 4

[Intel-gfx] [PATCH 25/27] drm/i915/uapi: introduce drm_i915_gem_create_ext for TGL

2020-11-15 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 Cc: Joonas Lahtinen joonas.lahti...@linux.intel.com Cc: Matthew Auld

[Intel-gfx] [PATCH 06/27] drm/i915: Rename the whitelist to allowlist

2020-11-15 Thread Huang, Sean Z
Rename the whitelist to allowlist as suggested Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/intel_uncore.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 1c14a07eba7d

[Intel-gfx] [PATCH 11/27] drm/i915/pxp: Enable ioctl action to set session in play

2020-11-15 Thread Huang, Sean Z
for secure playback. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c| 4 ++ drivers/gpu/drm/i915/pxp/intel_pxp_sm.c | 92 + drivers/gpu/drm/i915/pxp/intel_pxp_sm.h | 2 + 3 files changed, 98 insertions(+) diff --git a/drivers/gpu/drm/i915/pxp/in

[Intel-gfx] [PATCH 21/27] drm/i915/pxp: Add i915 trace logs for PXP operations

2020-11-15 Thread Huang, Sean Z
Add several i915 trace logs for PXP calls for debugging or performance measurement, including: (1) PXP ioctl (2) PXP teardown callbacks To trun on this feature, we need to set "CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS=y" in .config for compiling the Linux kernel. Signed-off-by: Hua

[Intel-gfx] [PATCH 10/27] drm/i915/pxp: Enable ioctl action to reserve session slot

2020-11-15 Thread Huang, Sean Z
With this ioctl action, ring3 driver can reserve a specific session slot/id assigned by ring0 PXP, as the first step of PXP session establishment flow. Ring3 PXP stores the session info in the session list structure. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c| 20

[Intel-gfx] [PATCH 22/27] drm/i915/pxp: Expose session state for display protection flip

2020-11-15 Thread Huang, Sean Z
Implement the intel_pxp_gem_object_status() to allow ring0 i915 display querying the current PXP session state. In the design, ring0 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-gfx] [PATCH 26/27] drm/i915/pavp: User interface for Protected buffer

2020-11-15 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] [PATCH 19/27] drm/i915/pxp: Enable ioctl action to send TEE commands

2020-11-15 Thread Huang, Sean Z
Enable the ioctl action to allow ring3 driver sends TEE commands via ring0 PXP ioctl, instead of TEE iotcl. So we can centralize those protection operations at ring0 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] [PATCH 02/27] drm/i915/pxp: Enable PXP irq worker and callback stub

2020-11-15 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] [PATCH 15/27] drm/i915/pxp: Destroy all type0 sessions upon teardown

2020-11-15 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, ring0 PXP should handle such case and terminate all the type0 sessions. Signed-off-by: Huang, Sean Z --- drivers

[Intel-gfx] [PATCH 05/27] drm/i915/pxp: Enable ioctl action to set the ring3 context

2020-11-15 Thread Huang, Sean Z
Enable one ioctl action to allow ring3 driver to set its ring3 context, so ring0 PXP can track the context id through this ring3 context list. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c | 59

[Intel-gfx] [PATCH 18/27] drm/i915/pxp: Implement funcs to create the TEE channel

2020-11-15 Thread Huang, Sean Z
-developed-by: Tomas Winkler Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 6 + drivers/gpu/drm/i915/pxp/intel_pxp.c | 5 + drivers/gpu/drm/i915/pxp/intel_pxp_tee.c

[Intel-gfx] [PATCH 06/27] drm/i915: Rename the whitelist to allowlist

2020-11-15 Thread Huang, Sean Z
Rename the whitelist to allowlist as suggested Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/intel_uncore.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 1c14a07eba7d

[Intel-gfx] [PATCH 10/27] drm/i915/pxp: Enable ioctl action to reserve session slot

2020-11-15 Thread Huang, Sean Z
With this ioctl action, ring3 driver can reserve a specific session slot/id assigned by ring0 PXP, as the first step of PXP session establishment flow. Ring3 PXP stores the session info in the session list structure. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c| 20

[Intel-gfx] [PATCH 04/27] drm/i915/pxp: set KCR reg init during the boot time

2020-11-15 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 | 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c| 11

[Intel-gfx] [PATCH 26/27] drm/i915/pavp: User interface for Protected buffer

2020-11-15 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] [PATCH 09/27] drm/i915/pxp: Implement funcs to get/set PXP tag

2020-11-15 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 | 105 drivers

[Intel-gfx] [PATCH 18/27] drm/i915/pxp: Implement funcs to create the TEE channel

2020-11-15 Thread Huang, Sean Z
-developed-by: Tomas Winkler Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 6 + drivers/gpu/drm/i915/pxp/intel_pxp.c | 5 + drivers/gpu/drm/i915/pxp/intel_pxp_tee.c

[Intel-gfx] [PATCH 05/27] drm/i915/pxp: Enable ioctl action to set the ring3 context

2020-11-15 Thread Huang, Sean Z
Enable one ioctl action to allow ring3 driver to set its ring3 context, so ring0 PXP can track the context id through this ring3 context list. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c | 59

[Intel-gfx] [PATCH 20/27] drm/i915/pxp: Create the arbitrary session after boot

2020-11-15 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 | 50 +++- drivers/gpu/drm/i915/pxp/intel_pxp.h | 2 + drivers/gpu/drm/i915/pxp

[Intel-gfx] [PATCH 21/27] drm/i915/pxp: Add i915 trace logs for PXP operations

2020-11-15 Thread Huang, Sean Z
Add several i915 trace logs for PXP calls for debugging or performance measurement, including: (1) PXP ioctl (2) PXP teardown callbacks To trun on this feature, we need to set "CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS=y" in .config for compiling the Linux kernel. Signed-off-by: Hua

[Intel-gfx] [PATCH 19/27] drm/i915/pxp: Enable ioctl action to send TEE commands

2020-11-15 Thread Huang, Sean Z
Enable the ioctl action to allow ring3 driver sends TEE commands via ring0 PXP ioctl, instead of TEE iotcl. So we can centralize those protection operations at ring0 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] [PATCH 07/27] drm/i915/pxp: Add PXP-related registers into allowlist

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

[Intel-gfx] [PATCH 12/27] drm/i915/pxp: Func to send hardware session termination

2020-11-15 Thread Huang, Sean Z
Implement the functions to allow ring0 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 | 309 drivers/gpu/drm

[Intel-gfx] [PATCH 24/27] mei: pxp: export pavp client to me client bus

2020-11-15 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] [PATCH 17/27] drm/i915/pxp: Enable PXP power management

2020-11-15 Thread Huang, Sean Z
after the power cycle. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_drv.c | 8 +++ drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 82 + drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 16 + 4 files changed

[Intel-gfx] [PATCH 22/27] drm/i915/pxp: Expose session state for display protection flip

2020-11-15 Thread Huang, Sean Z
Implement the intel_pxp_gem_object_status() to allow ring0 i915 display querying the current PXP session state. In the design, ring0 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-gfx] [PATCH 13/27] drm/i915/pxp: Enable ioctl action to terminate the session

2020-11-15 Thread Huang, Sean Z
Enable the PXP ioctl action to allow ring3 PXP to terminate the hardware session and cleanup its software session state. Ring0 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| 7

[Intel-gfx] [PATCH 15/27] drm/i915/pxp: Destroy all type0 sessions upon teardown

2020-11-15 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, ring0 PXP should handle such case and terminate all the type0 sessions. Signed-off-by: Huang, Sean Z --- drivers

[Intel-gfx] [PATCH 14/27] drm/i915/pxp: Enable ioctl action to query PXP tag

2020-11-15 Thread Huang, Sean Z
Enable the PXP ioctl action to allow ring3 PXP 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| 7

[Intel-gfx] [PATCH 08/27] drm/i915/pxp: Read register to check hardware session state

2020-11-15 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 | 176 drivers/gpu/drm/i915

[Intel-gfx] [PATCH 03/27] drm/i915/pxp: Add PXP context for logical hardware states.

2020-11-15 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 | 32 ++-- drivers/gpu/drm/i915/pxp/intel_pxp.h | 3 ++ drivers

[Intel-gfx] [PATCH 25/27] drm/i915/uapi: introduce drm_i915_gem_create_ext for TGL

2020-11-15 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 Cc: Joonas Lahtinen joonas.lahti...@linux.intel.com Cc: Matthew Auld

[Intel-gfx] [PATCH 01/27] drm/i915/pxp: Introduce Intel PXP component

2020-11-15 Thread Huang, Sean Z
. 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/Makefile| 4 drivers/gpu/drm/i915/i915_drv.c | 4 drivers/gpu/drm/i915/i915_drv.h | 4

[Intel-gfx] [PATCH 27/27] drm/i915/pxp: Add plane decryption support

2020-11-15 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] [PATCH 16/27] drm/i915/pxp: Termiante the session upon app crash

2020-11-15 Thread Huang, Sean Z
Ring0 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

[Intel-gfx] [PATCH 02/27] drm/i915/pxp: Enable PXP irq worker and callback stub

2020-11-15 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] [PATCH 23/27] mei: bus: enable pavp device.

2020-11-15 Thread Huang, Sean Z
From: Tomas Winkler Enable protected audio video path client on mei client bus. Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus-fixup.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c index 4e30fa98fe7d..042399b397c9

[Intel-gfx] [PATCH 11/27] drm/i915/pxp: Enable ioctl action to set session in play

2020-11-15 Thread Huang, Sean Z
for secure playback. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c| 4 ++ drivers/gpu/drm/i915/pxp/intel_pxp_sm.c | 92 + drivers/gpu/drm/i915/pxp/intel_pxp_sm.h | 2 + 3 files changed, 98 insertions(+) diff --git a/drivers/gpu/drm/i915/pxp/in

[Intel-gfx] [PATCH v2 13/27] drm/i915/pxp: Enable ioctl action to terminate the session

2020-11-14 Thread Huang, Sean Z
Enable the PXP ioctl action to allow ring3 PXP to terminate the hardware session and cleanup its software session state. Ring0 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| 7

[Intel-gfx] [PATCH v2 18/27] drm/i915/pxp: Implement funcs to create the TEE channel

2020-11-14 Thread Huang, Sean Z
-developed-by: Tomas Winkler Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 6 + drivers/gpu/drm/i915/pxp/intel_pxp.c | 4 + drivers/gpu/drm/i915/pxp/intel_pxp_tee.c

[Intel-gfx] [PATCH v2 19/27] drm/i915/pxp: Enable ioctl action to send TEE commands

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

[Intel-gfx] [PATCH v2 22/27] drm/i915/pxp: Expose session state for display protection flip

2020-11-14 Thread Huang, Sean Z
Implement the intel_pxp_gem_object_status() to allow ring0 i915 display querying the current PXP session state. In the design, ring0 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-gfx] [PATCH v2 10/27] drm/i915/pxp: Enable ioctl action to reserve session slot

2020-11-14 Thread Huang, Sean Z
With this ioctl action, ring3 driver can reserve a specific session slot/id assigned by ring0 PXP, as the first step of PXP session establishment flow. Ring3 PXP stores the session info in the session list structure. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c| 20

[Intel-gfx] [PATCH v2 26/27] drm/i915/pavp: User interface for Protected buffer

2020-11-14 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] [PATCH v2 15/27] drm/i915/pxp: Destroy all type0 sessions upon teardown

2020-11-14 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, ring0 PXP should handle such case and terminate all the type0 sessions. Signed-off-by: Huang, Sean Z --- drivers

[Intel-gfx] [PATCH v2 14/27] drm/i915/pxp: Enable ioctl action to query PXP tag

2020-11-14 Thread Huang, Sean Z
Enable the PXP ioctl action to allow ring3 PXP 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| 7

[Intel-gfx] [PATCH v2 23/27] mei: bus: enable pavp device.

2020-11-14 Thread Huang, Sean Z
From: Tomas Winkler Enable protected audio video path client on mei client bus. Signed-off-by: Tomas Winkler --- drivers/misc/mei/bus-fixup.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c index 4e30fa98fe7d..042399b397c9

[Intel-gfx] [PATCH v2 02/27] drm/i915/pxp: Enable PXP irq worker and callback stub

2020-11-14 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] [PATCH v2 06/27] drm/i915: Rename the whitelist to allowlist

2020-11-14 Thread Huang, Sean Z
Rename the whitelist to allowlist as suggested Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/intel_uncore.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 1c14a07eba7d

[Intel-gfx] [PATCH v2 09/27] drm/i915/pxp: Implement funcs to get/set PXP tag

2020-11-14 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 | 105 drivers

[Intel-gfx] [PATCH v2 05/27] drm/i915/pxp: Enable ioctl action to set the ring3 context

2020-11-14 Thread Huang, Sean Z
Enable one ioctl action to allow ring3 driver to set its ring3 context, so ring0 PXP can track the context id through this ring3 context list. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c | 59

[Intel-gfx] [PATCH v2 04/27] drm/i915/pxp: set KCR reg init during the boot time

2020-11-14 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 | 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c| 11

[Intel-gfx] [PATCH v2 27/27] drm/i915/pxp: Add plane decryption support

2020-11-14 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] [PATCH v2 08/27] drm/i915/pxp: Read register to check hardware session state

2020-11-14 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 | 176 drivers/gpu/drm/i915

[Intel-gfx] [PATCH v2 12/27] drm/i915/pxp: Func to send hardware session termination

2020-11-14 Thread Huang, Sean Z
Implement the functions to allow ring0 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 | 309 drivers/gpu/drm

[Intel-gfx] [PATCH v2 21/27] drm/i915/pxp: Add i915 trace logs for PXP operations

2020-11-14 Thread Huang, Sean Z
Add several i915 trace logs for PXP calls for debugging or performance measurement, including: (1) PXP ioctl (2) PXP teardown callbacks To trun on this feature, we need to set "CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS=y" in .config for compiling the Linux kernel. Signed-off-by: Hua

[Intel-gfx] [PATCH v2 24/27] mei: pxp: export pavp client to me client bus

2020-11-14 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] [PATCH v2 20/27] drm/i915/pxp: Create the arbitrary session after boot

2020-11-14 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 | 50 +++- drivers/gpu/drm/i915/pxp/intel_pxp.h | 2 + drivers/gpu/drm/i915/pxp

[Intel-gfx] [PATCH v2 17/27] drm/i915/pxp: Enable PXP power management

2020-11-14 Thread Huang, Sean Z
after the power cycle. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile | 3 +- drivers/gpu/drm/i915/i915_drv.c | 8 +++ drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 82 + drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 16 + 4 files changed

[Intel-gfx] [PATCH v2 07/27] drm/i915/pxp: Add PXP-related registers into allowlist

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

[Intel-gfx] [PATCH v2 01/27] drm/i915/pxp: Introduce Intel PXP component

2020-11-14 Thread Huang, Sean Z
. 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/Makefile| 4 drivers/gpu/drm/i915/i915_drv.c | 4 drivers/gpu/drm/i915/i915_drv.h | 4

[Intel-gfx] [PATCH v2 25/27] drm/i915/uapi: introduce drm_i915_gem_create_ext for TGL

2020-11-14 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 Cc: Joonas Lahtinen joonas.lahti...@linux.intel.com Cc: Matthew Auld

[Intel-gfx] [PATCH v2 11/27] drm/i915/pxp: Enable ioctl action to set session in play

2020-11-14 Thread Huang, Sean Z
for secure playback. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c| 4 ++ drivers/gpu/drm/i915/pxp/intel_pxp_sm.c | 92 + drivers/gpu/drm/i915/pxp/intel_pxp_sm.h | 2 + 3 files changed, 98 insertions(+) diff --git a/drivers/gpu/drm/i915/pxp/in

[Intel-gfx] [PATCH v2 16/27] drm/i915/pxp: Termiante the session upon app crash

2020-11-14 Thread Huang, Sean Z
Ring0 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

[Intel-gfx] [PATCH v2 03/27] drm/i915/pxp: Add PXP context for logical hardware states.

2020-11-14 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 | 32 ++-- drivers/gpu/drm/i915/pxp/intel_pxp.h | 3 ++ drivers

<    1   2   3   4   5   6