[PATCH v6 2/8] drm/i915/pxp: Add MTL hw-plumbing enabling for KCR operation

2023-02-27 Thread Alan Previn
header file for PXP to be consistent with other i915 global subsystems. Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/gt/intel_gt_irq.c | 3 +- drivers/gpu/drm/i915/pxp/intel_pxp.c | 32 drivers/gpu/drm/i915/pxp/intel_pxp

[PATCH v6 3/8] drm/i915/pxp: Add MTL helpers to submit Heci-Cmd-Packet to GSC

2023-02-27 Thread Alan Previn
example, requiring a retry). Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 2 + .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c | 108 ++ .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.h | 76 +

[PATCH v6 8/8] drm/i915/pxp: Enable PXP with MTL-GSC-CS

2023-02-27 Thread Alan Previn
Enable PXP with MTL-GSC-CS: add the has_pxp into device info and increase the debugfs teardown timeouts to align with new GSC-CS + firmware specs. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c | 9

[PATCH v6 7/8] drm/i915/pxp: On MTL, KCR enabling doesn't wait on tee component

2023-02-27 Thread Alan Previn
27;s init, fini and resume. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp.c| 19 +++ drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 3 ++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.c b/drivers/g

[PATCH v6 4/8] drm/i915/pxp: Add GSC-CS backend to send GSC fw messages

2023-02-27 Thread Alan Previn
-off-by: Alan Previn --- .../drm/i915/pxp/intel_pxp_cmd_interface_43.h | 4 + drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c| 239 +- drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h| 4 + drivers/gpu/drm/i915/pxp/intel_pxp_types.h| 6 + 4 files changed, 251 insertions(+), 2

[PATCH v2 1/9] drm/i915/pxp: Add MTL PXP GSC-CS back-end skeleton

2023-01-11 Thread Alan Previn
Add MTL PXP GSC-CS back-end stub functions hook them up from PXP front-end and PXP session management functions. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c | 19 +++-- drivers/gpu/drm/i915/pxp

[PATCH v2 2/9] drm/i915/pxp: Add GSC-CS back-end resource init and cleanup

2023-01-11 Thread Alan Previn
time allocation of resources in GSC-CS init and clean them up in fini. Signed-off-by: Alan Previn --- .../drm/i915/pxp/intel_pxp_cmd_interface_43.h | 6 +- drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c| 216 +- drivers/gpu/drm/i915/pxp/intel_pxp_types.h| 5 + 3 files changed

[PATCH v2 0/9] drm/i915/pxp: Add MTL PXP Support

2023-01-11 Thread Alan Previn
when building with CONFIG_PXP disabled. - more alignment with gsc_mtl_header structure from the HDCP Alan Previn (9): drm/i915/pxp: Add MTL PXP GSC-CS back-end skeleton drm/i915/pxp: Add GSC-CS back-end resource init and cleanup drm/i915/pxp: Add MTL hw-plumbing enabling for KCR operation

[PATCH v2 7/9] drm/i915/pxp: MTL-KCR interrupt ctrl's are in GT-0

2023-01-11 Thread Alan Previn
e for uncore when touching IRQ registers despite the pxp->ctrl_gt being the media-tile. No difference for legacy of course. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_irq.c | 23 +--- drivers/gpu/

[PATCH v2 5/9] drm/i915/pxp: Add GSC-CS backend to send GSC fw messages

2023-01-11 Thread Alan Previn
: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c | 93 ++ 1 file changed, 93 insertions(+) diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c index 97ca187e6fde..ff235822743e 100644 --- a/drivers/gpu/drm/i915/pxp

[PATCH v2 8/9] drm/i915/pxp: On MTL, KCR enabling doesn't wait on tee component

2023-01-11 Thread Alan Previn
W on PXP's init, fini and resume. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 52 ++-- drivers/gpu/drm/i915/pxp/intel_pxp.h | 4 +- drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 10 ++--- drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 13

[PATCH v2 6/9] drm/i915/pxp: Add ARB session creation with new PXP API Ver4.3

2023-01-11 Thread Alan Previn
Add MTL's function for ARB session creation using PXP firmware version 4.3 ABI structure format. Before checking the return status, look at the GSC-CS-Mem-Header's pending-bit which means the GSC firmware is busy and we should resubmit. Signed-off-by: Alan Previn --- .../dr

[PATCH v2 4/9] drm/i915/pxp: Add MTL helpers to submit Heci-Cmd-Packet to GSC

2023-01-11 Thread Alan Previn
to handle everything else from input/output packet size verification to handling the responses from security firmware (such as requiring a retry). Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gt/intel_gpu_comma

[PATCH v2 9/9] drm/i915/pxp: Enable PXP with MTL-GSC-CS

2023-01-11 Thread Alan Previn
Enable PXP with MTL-GSC-CS: add the has_pxp into device info and increase the timeouts for new GSC-CS + firmware specs. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/pxp/intel_pxp_session.c | 2 +- 2 files changed, 2 insertions(+), 1

[PATCH v2 3/9] drm/i915/pxp: Add MTL hw-plumbing enabling for KCR operation

2023-01-11 Thread Alan Previn
header file for PXP to be consistent with other i915 global subsystems. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/gt/intel_gt_irq.c | 3 +- drivers/gpu/drm/i915/pxp/intel_pxp.c | 35 drivers/gpu/drm/i915/pxp/intel_pxp_regs.h| 26 +++

[PATCH v4 0/6] drm/i915/pxp: Add missing cleanup steps for PXP global-teardown

2023-01-11 Thread Alan Previn
t enabled in KConfig. Changes from prior revs: v1: - Dont need to teardown non-arbitration sessions (Juston). - Fix builds when PXP is enabled in config (Alan/CI-build). - Fix the broken pm-suspend-resume symmetry when we do this pxp-session-teardown during i915s pm_suspend_pr

[PATCH v4 1/6] mei: mei-me: resume device in prepare

2023-01-11 Thread Alan Previn
callbacks. Signed-off-by: Alexander Usyskin Signed-off-by: Alan Previn --- drivers/misc/mei/pci-me.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c index 704cd0caa172..4280759739f0 100644 --- a/drivers

[PATCH v4 2/6] drm/i915/pxp: add device link between i915 and mei_pxp

2023-01-11 Thread Alan Previn
From: Alexander Usyskin Add device link with i915 as consumer and mei_pxp as supplier to ensure proper ordering of power flows. V2: condition on absence of heci_pxp to filter out DG Signed-off-by: Alexander Usyskin Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 7

[PATCH v4 3/6] mei: clean pending read with vtag on bus

2023-01-11 Thread Alan Previn
: Alan Previn --- drivers/misc/mei/client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 9ddb854b8155..5c19097266fe 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -1343,7 +1343,9 @@ static

[PATCH v4 4/6] drm/i915/pxp: Invalidate all PXP fw sessions during teardown

2023-01-11 Thread Alan Previn
or each of them. However, for the upstream i915 driver we only support the arbitration session that can be created so that will be the only session we will cleanup. Signed-off-by: Alan Previn Reviewed-by: Juston Li --- drivers/gpu/drm/i915/pxp/intel_pxp.h | 1 + .../dr

[PATCH v4 6/6] drm/i915/pxp: Pxp hw init should be in resume_complete

2023-01-11 Thread Alan Previn
this change. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/gt/intel_gt_pm.h | 1 + drivers/gpu/drm/i915/i915_driver.c | 20 ++-- drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 6 +++--- 4 files changed, 23 insertions(

[PATCH v4 5/6] drm/i915/pxp: Trigger the global teardown for before suspending

2023-01-11 Thread Alan Previn
x27;s suspend_prepare code path. Signed-off-by: Alan Previn Reviewed-by: Juston Li --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 60 +--- drivers/gpu/drm/i915/pxp/intel_pxp.h | 1 + drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_session.c

[PATCH v5 0/6] drm/i915/pxp: Add missing cleanup steps for PXP global-teardown

2023-01-12 Thread Alan Previn
t enabled in KConfig. Changes from prior revs: v1: - Dont need to teardown non-arbitration sessions (Juston). - Fix builds when PXP is enabled in config (Alan/CI-build). - Fix the broken pm-suspend-resume symmetry when we do this pxp-session-teardown during i915s pm_suspend_pr

[PATCH v5 1/6] mei: mei-me: resume device in prepare

2023-01-12 Thread Alan Previn
callbacks. Signed-off-by: Alexander Usyskin Signed-off-by: Alan Previn --- drivers/misc/mei/pci-me.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c index 704cd0caa172..9f6ff06a94fd 100644 --- a/drivers

[PATCH v5 2/6] drm/i915/pxp: add device link between i915 and mei_pxp

2023-01-12 Thread Alan Previn
From: Alexander Usyskin Add device link with i915 as consumer and mei_pxp as supplier to ensure proper ordering of power flows. V2: condition on absence of heci_pxp to filter out DG Signed-off-by: Alexander Usyskin Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 7

[PATCH v5 6/6] drm/i915/pxp: Pxp hw init should be in resume_complete

2023-01-12 Thread Alan Previn
this change. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/gt/intel_gt_pm.h | 1 + drivers/gpu/drm/i915/i915_driver.c | 20 ++-- drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 6 +++--- 4 files changed, 23 insertions(

[PATCH v5 3/6] mei: clean pending read with vtag on bus

2023-01-12 Thread Alan Previn
: Alan Previn --- drivers/misc/mei/client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 9ddb854b8155..5c19097266fe 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -1343,7 +1343,9 @@ static

[PATCH v5 5/6] drm/i915/pxp: Trigger the global teardown for before suspending

2023-01-12 Thread Alan Previn
x27;s suspend_prepare code path. Signed-off-by: Alan Previn Reviewed-by: Juston Li --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 60 +--- drivers/gpu/drm/i915/pxp/intel_pxp.h | 1 + drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_session.c

[PATCH v5 4/6] drm/i915/pxp: Invalidate all PXP fw sessions during teardown

2023-01-12 Thread Alan Previn
or each of them. However, for the upstream i915 driver we only support the arbitration session that can be created so that will be the only session we will cleanup. Signed-off-by: Alan Previn Reviewed-by: Juston Li --- drivers/gpu/drm/i915/pxp/intel_pxp.h | 1 + .../dr

[PATCH 1/1] drm/i915/gsc: Fix the Driver-FLR completion

2023-01-19 Thread Alan Previn
and new code comments for detail. This is new direction from HW architecture folks. Signed-off-by: Alan Previn Fixes: 5a44fcd73498 ("drm/i915/gsc: Do a driver-FLR on unload if GSC was loaded") --- drivers/gpu/drm/i915/intel_uncore.c | 7 +++ 1 file changed, 7 insertions(+) diff --

[PATCH v6 0/6] drm/i915/pxp: Add missing cleanup steps for PXP global-teardown

2023-01-23 Thread Alan Previn
t enabled in KConfig. Changes from prior revs: v1: - Dont need to teardown non-arbitration sessions (Juston). - Fix builds when PXP is enabled in config (Alan/CI-build). - Fix the broken pm-suspend-resume symmetry when we do this pxp-session-teardown during i915s pm_suspend_pr

[PATCH v6 6/6] drm/i915/pxp: Pxp hw init should be in resume_complete

2023-01-23 Thread Alan Previn
this change. Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio Acked-by: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_driver.c | 20 ++-- drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 6 +++--- 3 files change

[PATCH v6 4/6] drm/i915/pxp: Invalidate all PXP fw sessions during teardown

2023-01-23 Thread Alan Previn
or each of them. However, for the upstream i915 driver we only support the arbitration session that can be created so that will be the only session we will cleanup. Signed-off-by: Alan Previn Reviewed-by: Juston Li Acked-by: Rodrigo Vivi --- drivers/gpu/drm/i915/pxp/intel_pxp.h | 1

[PATCH v6 3/6] mei: clean pending read with vtag on bus

2023-01-23 Thread Alan Previn
From: Alexander Usyskin Client on bus have only one vtag map slot and should disregard the vtag value when cleaning pending read flag. Fixes read flow control message unexpectedly generated when clent on bus send messages with different vtags. Signed-off-by: Alexander Usyskin Reviewed-by: Tomas

[PATCH v6 1/6] mei: mei-me: resume device in prepare

2023-01-23 Thread Alan Previn
From: Alexander Usyskin Asynchronous runtime resume is not possible while the system is suspending. The power management subsystem resumes the device only in the suspend phase, not in the prepare phase. Force resume device in prepare to allow drivers on mei bus to communicate in their prepare cal

[PATCH v6 5/6] drm/i915/pxp: Trigger the global teardown for before suspending

2023-01-23 Thread Alan Previn
x27;s suspend_prepare code path. Signed-off-by: Alan Previn Reviewed-by: Juston Li --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 65 +--- drivers/gpu/drm/i915/pxp/intel_pxp.h | 1 + drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_session.c

[PATCH v6 2/6] drm/i915/pxp: add device link between i915 and mei_pxp

2023-01-23 Thread Alan Previn
From: Alexander Usyskin Add device link with i915 as consumer and mei_pxp as supplier to ensure proper ordering of power flows. V2: condition on absence of heci_pxp to filter out DG Signed-off-by: Alexander Usyskin --- drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 11 +++ drivers/gpu/d

[PATCH v3 1/8] drm/i915/pxp: Add GSC-CS back-end resource init and cleanup

2023-01-25 Thread Alan Previn
#x27; send-message function. Do this one time allocation of gsccs specific resources in a new gsccs source file with intel_pxp_gsccs_init / fini functions and hook them up from the PXP front-end. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/dr

[PATCH v3 2/8] drm/i915/pxp: Add MTL hw-plumbing enabling for KCR operation

2023-01-25 Thread Alan Previn
header file for PXP to be consistent with other i915 global subsystems. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/gt/intel_gt_irq.c | 3 +- drivers/gpu/drm/i915/pxp/intel_pxp.c | 32 drivers/gpu/drm/i915/pxp/intel_pxp_regs.h| 27 +

[PATCH v3 3/8] drm/i915/pxp: Add MTL helpers to submit Heci-Cmd-Packet to GSC

2023-01-25 Thread Alan Previn
example, requiring a retry). Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 2 + .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c | 110 ++ .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.h | 76 +

[PATCH v3 8/8] drm/i915/pxp: Enable PXP with MTL-GSC-CS

2023-01-25 Thread Alan Previn
Enable PXP with MTL-GSC-CS: add the has_pxp into device info and increase the timeouts for new GSC-CS + firmware specs. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/pxp/intel_pxp_session.c | 2 +- 2 files changed, 2 insertions(+), 1

[PATCH v3 0/8] drm/i915/pxp: Add MTL PXP Support

2023-01-25 Thread Alan Previn
nimize the changes without introducing a common abstraction helper for suspend/resume/init/fini codes that have to change the kcr power state. Alan Previn (8): drm/i915/pxp: Add GSC-CS back-end resource init and cleanup drm/i915/pxp: Add MTL hw-plumbing enabling for KCR operat

[PATCH v3 4/8] drm/i915/pxp: Add GSC-CS backend to send GSC fw messages

2023-01-25 Thread Alan Previn
freeing of these buffers in gsccs init and fini. Signed-off-by: Alan Previn --- .../drm/i915/pxp/intel_pxp_cmd_interface_43.h | 4 + drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c| 174 +- drivers/gpu/drm/i915/pxp/intel_pxp_types.h| 6 + 3 files changed, 183 insertions(+), 1

[PATCH v3 6/8] drm/i915/pxp: MTL-KCR interrupt ctrl's are in GT-0

2023-01-25 Thread Alan Previn
e for uncore when touching IRQ registers despite the pxp->ctrl_gt being the media-tile. No difference for legacy of course. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_irq.c | 24 +--- drivers/gpu/

[PATCH v3 5/8] drm/i915/pxp: Add ARB session creation with new PXP API Ver4.3

2023-01-25 Thread Alan Previn
Add MTL's function for ARB session creation using PXP firmware version 4.3 ABI structure format. Before checking the return status, look at the GSC-CS-Mem-Header's pending-bit which means the GSC firmware is busy and we should resubmit. Signed-off-by: Alan Previn --- drivers/gpu/dr

[PATCH v3 7/8] drm/i915/pxp: On MTL, KCR enabling doesn't wait on tee component

2023-01-25 Thread Alan Previn
27;s init, fini and resume. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp.c| 19 +++ drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 3 ++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.c b/drivers/g

[PATCH v7 0/6] drm/i915/pxp: Add missing cleanup steps for PXP global-teardown

2023-01-25 Thread Alan Previn
t enabled in KConfig. Changes from prior revs: v1: - Dont need to teardown non-arbitration sessions (Juston). - Fix builds when PXP is enabled in config (Alan/CI-build). - Fix the broken pm-suspend-resume symmetry when we do this pxp-session-teardown during i915s pm_suspend_pr

[PATCH v7 5/6] drm/i915/pxp: Trigger the global teardown for before suspending

2023-01-25 Thread Alan Previn
x27;s suspend_prepare code path. v2 : Split __pxp_global_teardown_locked helper into two variants for teardown-with-restart vs teardown-for-suspend/shutdown. Signed-off-by: Alan Previn Reviewed-by: Juston Li Acked-by: Rodrigo Vivi --- drivers/gpu/drm/i915/pxp/intel_pxp.c

[PATCH v7 1/6] mei: mei-me: resume device in prepare

2023-01-25 Thread Alan Previn
callbacks. Signed-off-by: Alexander Usyskin Reviewed-by: Tomas Winkler Signed-off-by: Alan Previn --- drivers/misc/mei/pci-me.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c index 5bf0d50d55a0

[PATCH v7 6/6] drm/i915/pxp: Pxp hw init should be in resume_complete

2023-01-25 Thread Alan Previn
this change. Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio Acked-by: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_driver.c | 20 ++-- drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 6 +++--- 3 files change

[PATCH v7 3/6] mei: clean pending read with vtag on bus

2023-01-25 Thread Alan Previn
: Tomas Winkler Signed-off-by: Alan Previn --- drivers/misc/mei/client.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 9ddb854b8155..5c19097266fe 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c

[PATCH v7 4/6] drm/i915/pxp: Invalidate all PXP fw sessions during teardown

2023-01-25 Thread Alan Previn
or each of them. However, for the upstream i915 driver we only support the arbitration session that can be created so that will be the only session we will cleanup. Signed-off-by: Alan Previn Reviewed-by: Juston Li Acked-by: Rodrigo Vivi --- drivers/gpu/drm/i915/pxp/intel_pxp.h | 1

[PATCH v7 2/6] drm/i915/pxp: add device link between i915 and mei_pxp

2023-01-25 Thread Alan Previn
From: Alexander Usyskin Add device link with i915 as consumer and mei_pxp as supplier to ensure proper ordering of power flows. V2: condition on absence of heci_pxp to filter out DG Signed-off-by: Alexander Usyskin Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp_tee.c

[PATCH v6 1/1] drm/i915/pxp: Promote pxp subsystem to top-level of i915

2022-11-29 Thread Alan Previn
me for similar refactoring Signed-off-by: Alan Previn --- .../drm/i915/display/skl_universal_plane.c| 2 +- drivers/gpu/drm/i915/gem/i915_gem_context.c | 6 +- drivers/gpu/drm/i915/gem/i915_gem_create.c| 2 +- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 2 +- drivers/gpu

[PATCH v7 1/1] drm/i915/pxp: Promote pxp subsystem to top-level of i915

2022-12-01 Thread Alan Previn
pdated global-checkers for per-GT callers (such as other files within PXP) to avoid unnecessary GT-reparsing, expose a replacement helper like the prior ones. (Daniele). v1: - Add one more patch to the series for the intel_pxp suspend/resume for similar refactoring Signed

[PATCH v8 1/1] drm/i915/pxp: Promote pxp subsystem to top-level of i915

2022-12-02 Thread Alan Previn
e newpxp. (Rodrigo) - In the case intel_pxp_fini is called during driver unload but after i915 loading failed without pxp being allocated, check i915->pxp before referencing it. (Alan) v6: - Remove HAS_PXP macro and replace it with intel_pxp_is_supported because

[PATCH v9 1/1] drm/i915/pxp: Promote pxp subsystem to top-level of i915

2022-12-06 Thread Alan Previn
ble newpxp. (Rodrigo) - In the case intel_pxp_fini is called during driver unload but after i915 loading failed without pxp being allocated, check i915->pxp before referencing it. (Alan) v6: - Remove HAS_PXP macro and replace it with intel_pxp_is_supported

[PATCH v10 1/1] drm/i915/pxp: Promote pxp subsystem to top-level of i915

2022-12-06 Thread Alan Previn
ble newpxp. (Rodrigo) - In the case intel_pxp_fini is called during driver unload but after i915 loading failed without pxp being allocated, check i915->pxp before referencing it. (Alan) v6: - Remove HAS_PXP macro and replace it with intel_pxp_is_supported

[PATCH v11 1/1] drm/i915/pxp: Promote pxp subsystem to top-level of i915

2022-12-07 Thread Alan Previn
' through out instead of local variable newpxp. (Rodrigo) - In the case intel_pxp_fini is called during driver unload but after i915 loading failed without pxp being allocated, check i915->pxp before referencing it. (Alan) v6: - Remove HAS_PXP macro a

[PATCH v12 1/1] drm/i915/pxp: Promote pxp subsystem to top-level of i915

2022-12-08 Thread Alan Previn
intel_pxp_init use 'i915->pxp' through out instead of local variable newpxp. (Rodrigo) - In the case intel_pxp_fini is called during driver unload but after i915 loading failed without pxp being allocated, check i915->pxp before referenci

[PATCH 1/1] drm/i915/pxp: Use drm_dbg if arb session failed due to fw version

2022-12-20 Thread Alan Previn
ually get a -ENODEV for the protected context creation which is the correct behavior and we don't create unnecessary drm_error's in our dmesg (for what is unsupported platforms). Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_cmn.h | 1 + drivers/g

[PATCH v2 1/1] drm/i915/pxp: Use drm_dbg if arb session failed due to fw version

2022-12-20 Thread Alan Previn
ually get a -ENODEV for the protected context creation which is the correct behavior and we don't create unnecessary drm_error's in our dmesg (for what is unsupported platforms). Changes from prio revs: v1 : - print incorrect version from input packet, not output. Signed-off-

[PATCH v3 1/1] drm/i915/pxp: Use drm_dbg if arb session failed due to fw version

2022-12-21 Thread Alan Previn
put packet, not output. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_cmn.h | 1 + drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 4 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_cmd_interface_cmn.h b/drivers/g

[PATCH v3 0/7] drm/i915/pxp: Add missing cleanup steps for PXP global-teardown

2022-12-21 Thread Alan Previn
t enabled in KConfig. Changes from prior revs: v1: - Dont need to teardown non-arbitration sessions (Juston). - Fix builds when PXP is enabled in config (Alan/CI-build). - Fix the broken pm-suspend-resume symmetry when we do this pxp-session-teardown during i915s pm_suspend_pr

[PATCH v3 3/7] mei: clean pending read with vtag on bus

2022-12-21 Thread Alan Previn
From: Alexander Usyskin Client on bus have only one vtag map slot and should disregard the vtag value when cleaning pending read flag. Fixes read flow control message unexpectedly generated when clent on bus send messages with different vtags. Signed-off-by: Alexander Usyskin --- drivers/misc/

[PATCH v3 4/7] drm/i915/pxp: Invalidate all PXP fw sessions during teardown

2022-12-21 Thread Alan Previn
or each of them. However, for the upstream i915 driver we only support the arbitration session that can be created so that will be the only session we will cleanup. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp.h | 1 + .../drm/i915/pxp/intel_pxp_cmd_interface

[PATCH v3 6/7] drm/i915/pxp: Pxp hw init should be in resume_complete

2022-12-21 Thread Alan Previn
this change. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/gt/intel_gt_pm.h | 1 + drivers/gpu/drm/i915/i915_driver.c | 20 ++-- drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_pm.h | 6 +++--- 4 files changed, 23 insertions(

[PATCH v3 2/7] drm/i915/pxp: add device link between i915 and mei_pxp

2022-12-21 Thread Alan Previn
From: Alexander Usyskin Add device link with i915 as consumer and mei_pxp as supplier to ensure proper ordering of power flows. V2: condition on absence of heci_pxp to filter out DG Signed-off-by: Alexander Usyskin --- drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 7 +++ 1 file changed, 7 in

[PATCH v3 1/7] mei: mei-me: resume device in prepare

2022-12-21 Thread Alan Previn
From: Alexander Usyskin Async runtime resume is not possible while system is suspending. The power management subsystem resumes device only in the suspend phase, not in the prepare phase. Force resume device in prepare to allow drivers on mei bus to communicate in prepare callbacks. Signed-off-b

[PATCH v3 5/7] drm/i915/pxp: Trigger the global teardown for before suspending

2022-12-21 Thread Alan Previn
x27;s suspend_prepare code path. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 60 +--- drivers/gpu/drm/i915/pxp/intel_pxp.h | 1 + drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_session.c | 9 ++- drivers/gp

[PATCH v3 7/7] HAX: force enable PXP Kconfig

2022-12-21 Thread Alan Previn
Force PXP configs on for CI testing to trigger full subtests in IGT's gem_pxp as opposed to the partial "unsupported hw substests". Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/Kconfig | 2 +- drivers/misc/mei/pxp/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion

[PATCH 1/9] drm/i915/pxp: Add MTL PXP GSC-CS back-end skeleton

2023-01-10 Thread Alan Previn
Add MTL PXP GSC-CS back-end stub functions hook them up from PXP front-end and PXP session management functions. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c | 19 +--- drivers/gpu/drm/i915/pxp

[PATCH 3/9] drm/i915/pxp: Add MTL hw-plumbing enabling for KCR operation

2023-01-10 Thread Alan Previn
header file for PXP to be consistent with other i915 global subsystems. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/gt/intel_gt_irq.c | 3 +- drivers/gpu/drm/i915/pxp/intel_pxp.c | 35 drivers/gpu/drm/i915/pxp/intel_pxp_regs.h| 26 +++

[PATCH 4/9] drm/i915/pxp: Add MTL helpers to submit Heci-Cmd-Packet to GSC

2023-01-10 Thread Alan Previn
to handle everything else from input/output packet size verification to handling the responses from security firmware (such as requiring a retry). Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gt/intel_gpu_comma

[PATCH 2/9] drm/i915/pxp: Add GSC-CS back-end resource init and cleanup

2023-01-10 Thread Alan Previn
time allocation of resources in GSC-CS init and clean them up in fini. Signed-off-by: Alan Previn --- .../drm/i915/pxp/intel_pxp_cmd_interface_43.h | 6 +- drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c| 216 +- drivers/gpu/drm/i915/pxp/intel_pxp_types.h| 5 + 3 files changed

[PATCH 5/9] drm/i915/pxp: Add GSC-CS backend-teelink for send-message function

2023-01-10 Thread Alan Previn
Populate the backend-teelink abstraction layer using GSC-CS engine for MTL (and future) products. The PXP backend for sending messages Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c | 92 ++ 1 file changed, 92 insertions(+) diff --git a/drivers

[PATCH 5/9] drm/i915/pxp: Add GSC-CS backend to send GSC fw messages

2023-01-10 Thread Alan Previn
: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c | 92 ++ 1 file changed, 92 insertions(+) diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c index 97ca187e6fde..84045e18591e 100644 --- a/drivers/gpu/drm/i915/pxp

[PATCH 8/9] drm/i915/pxp: On MTL, KCR HW can be enabled instantly

2023-01-10 Thread Alan Previn
me. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 52 ++-- drivers/gpu/drm/i915/pxp/intel_pxp.h | 4 +- drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 10 ++--- drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 13 +- 4 files changed, 49 insertions(+

[PATCH 6/9] drm/i915/pxp: Add ARB session creation with new PXP API Ver4.3

2023-01-10 Thread Alan Previn
Add MTL's function for ARB session creation using PXP firmware version 4.3 ABI structure format. Before checking the return status, look at the GSC-CS-Mem-Header's pending-bit which means the GSC firmware is busy and we should resubmit. Signed-off-by: Alan Previn --- .../dr

[PATCH 8/9] drm/i915/pxp: On MTL, KCR enabling doesn't wait on tee component

2023-01-10 Thread Alan Previn
W on PXP's init, fini and resume. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 52 ++-- drivers/gpu/drm/i915/pxp/intel_pxp.h | 4 +- drivers/gpu/drm/i915/pxp/intel_pxp_pm.c | 10 ++--- drivers/gpu/drm/i915/pxp/intel_pxp_tee.c | 13

[PATCH 7/9] drm/i915/pxp: MTL-KCR interrupt ctrl's are in GT-0

2023-01-10 Thread Alan Previn
e for uncore when touching IRQ registers despite the pxp->ctrl_gt being the media-tile. No difference for legacy of course. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c | 2 +- drivers/gpu/drm/i915/pxp/intel_pxp_irq.c | 23 +--- drivers/gpu/

[PATCH 0/9] drm/i915/pxp: Add MTL PXP Support

2023-01-10 Thread Alan Previn
, the format of the message is slightly different with a 2-layer packetization that is explained in detail in Patch #4. Also, the second layer which is the actual PXP firmware packet is now rev'd to version 4.3 for MTL that is defined in Patch #6. Alan Previn (9): drm/i915/pxp: Add MTL PXP G

[PATCH 9/9] drm/i915/pxp: Enable PXP with MTL-GSC-CS

2023-01-10 Thread Alan Previn
Enable PXP with MTL-GSC-CS: add the has_pxp into device info and increase the timeouts for new GSC-CS + firmware specs. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/pxp/intel_pxp_session.c | 2 +- 2 files changed, 2 insertions(+), 1

[PATCH 7/9] drm/i915/pxp: MTL-KCR is in media-tile but IRQ-ctrl's in root

2023-01-10 Thread Alan Previn
Add a helper for KCR hw interrupt enable/disable functions. For MTL onwards, it will get the GT-0's handle including the uncore fw bits and use that despite the pxp->ctrl_gt being the media-tile. No difference for legacy of course. Signed-off-by: Alan Previn --- drivers/gpu/drm/

[PATCH v8 0/8] drm/i915/pxp: Add MTL PXP Support

2023-04-20 Thread Alan Previn
submit.* files that was part of the hdcp merge (adding only the difference of the non-priv submision). Fix the non-priv submission helper to use the ww-aware versions of request creation + submission (some re-ordeing and calling i915_gem_ww_ctx_init and i

[PATCH v8 2/8] drm/i915/pxp: Add MTL hw-plumbing enabling for KCR operation

2023-04-20 Thread Alan Previn
header file for PXP to be consistent with other i915 global subsystems. Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/gt/intel_gt_irq.c | 3 +- drivers/gpu/drm/i915/pxp/intel_pxp.c | 32 drivers/gpu/drm/i915/pxp/intel_pxp

[PATCH v8 8/8] drm/i915/pxp: Enable PXP with MTL-GSC-CS

2023-04-20 Thread Alan Previn
Enable PXP with MTL-GSC-CS: add the has_pxp into device info and increase the debugfs teardown timeouts to align with new GSC-CS + firmware specs. Now that we have 3 places that are selecting pxp timeouts based on tee vs gsccs back-end, let's add a helper. Signed-off-by: Alan Previn Review

[PATCH v8 6/8] drm/i915/uapi/pxp: Add a GET_PARAM for PXP

2023-04-20 Thread Alan Previn
ate a PXP context and boot very early. There is no way to avoid this today. Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio Acked-by: Lionel Landwerlin --- drivers/gpu/drm/i915/i915_getparam.c | 5 + include/uapi/drm/i915_drm.h | 14 ++ 2 files change

[PATCH v8 1/8] drm/i915/pxp: Add GSC-CS back-end resource init and cleanup

2023-04-20 Thread Alan Previn
#x27; send-message function. Do this one time allocation of gsccs specific resources in a new gsccs source file with intel_pxp_gsccs_init / fini functions and hook them up from the PXP front-end. Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/Makefile

[PATCH v8 7/8] drm/i915/pxp: On MTL, KCR enabling doesn't wait on tee component

2023-04-20 Thread Alan Previn
27;s init, fini and resume. Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c | 15 ++- drivers/gpu/drm/i915/pxp/intel_pxp_pm.c| 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/g

[PATCH v8 3/8] drm/i915/pxp: Add MTL helpers to submit Heci-Cmd-Packet to GSC

2023-04-20 Thread Alan Previn
example, requiring a retry). Signed-off-by: Alan Previn --- .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c | 102 ++ .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.h | 23 2 files changed, 125 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c b/

[PATCH v8 4/8] drm/i915/pxp: Add GSC-CS backend to send GSC fw messages

2023-04-20 Thread Alan Previn
nable gsc_message_handle tracking. Thus, allocate the host_session_handle at init and destroy it at fini (the latter requiring an FYI to the gsc-firmware). Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio --- .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.h | 3 +- .../drm/i91

[PATCH v8 5/8] drm/i915/pxp: Add ARB session creation and cleanup

2023-04-20 Thread Alan Previn
ware inspect the GSC-CS-Mem-Header's pending-bit which means the GSC firmware is busy and we should retry. Given the last hw requirement, lets also update functions in front-end layer that wait for session creation or teardown completion to use new worst case timeout periods. Signed-off-by:

[PATCH v9 1/8] drm/i915/pxp: Add GSC-CS back-end resource init and cleanup

2023-04-27 Thread Alan Previn
#x27; send-message function. Do this one time allocation of gsccs specific resources in a new gsccs source file with intel_pxp_gsccs_init / fini functions and hook them up from the PXP front-end. Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/Makefile

[PATCH v9 0/8] drm/i915/pxp: Add MTL PXP Support

2023-04-27 Thread Alan Previn
submit.* files that was part of the hdcp merge (adding only the difference of the non-priv submision). Fix the non-priv submission helper to use the ww-aware versions of request creation + submission (some re-ordeing and calling i915_gem_ww_ctx_init and i

[PATCH v9 2/8] drm/i915/pxp: Add MTL hw-plumbing enabling for KCR operation

2023-04-27 Thread Alan Previn
header file for PXP to be consistent with other i915 global subsystems. Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/gt/intel_gt_irq.c | 3 +- drivers/gpu/drm/i915/pxp/intel_pxp.c | 32 drivers/gpu/drm/i915/pxp/intel_pxp

[PATCH v9 5/8] drm/i915/pxp: Add ARB session creation and cleanup

2023-04-27 Thread Alan Previn
ages to the firmware inspect the GSC-CS-Mem-Header's pending-bit which means the GSC firmware is busy and we should retry. Given the last hw requirement, lets also update functions in front-end layer that wait for session creation or teardown completion to use new worst case timeout periods. S

[PATCH v9 7/8] drm/i915/pxp: On MTL, KCR enabling doesn't wait on tee component

2023-04-27 Thread Alan Previn
27;s init, fini and resume. Signed-off-by: Alan Previn Reviewed-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.c | 15 ++- drivers/gpu/drm/i915/pxp/intel_pxp_pm.c| 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/g

[PATCH v9 6/8] drm/i915/uapi/pxp: Add a GET_PARAM for PXP

2023-04-27 Thread Alan Previn
on to both GET_PARAM caller and intel_pxp_start since the latter does similiar checks. Signed-off-by: Alan Previn --- drivers/gpu/drm/i915/i915_getparam.c | 7 +++ drivers/gpu/drm/i915/pxp/intel_pxp.c | 29 +--- drivers/gpu/drm/i915/pxp/intel_pxp.h | 1 + include/uap

[PATCH v9 3/8] drm/i915/pxp: Add MTL helpers to submit Heci-Cmd-Packet to GSC

2023-04-27 Thread Alan Previn
example, requiring a retry). Signed-off-by: Alan Previn --- .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c | 102 ++ .../i915/gt/uc/intel_gsc_uc_heci_cmd_submit.h | 23 2 files changed, 125 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c b/

<    1   2   3   4   5   6   7   8   9   10   >