mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 00:47:56 -04:00
drm/i915/pxp: Enable PXP with MTL-GSC-CS
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 <alan.previn.teres.alexis@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230511231738.1077674-9-alan.previn.teres.alexis@intel.com
This commit is contained in:
committed by
Radhakrishna Sripada
parent
9e134ed720
commit
41e65d8790
@@ -1209,6 +1209,7 @@ static const struct intel_device_info mtl_info = {
|
||||
.has_mslice_steering = 0,
|
||||
.has_snoop = 1,
|
||||
.max_pat_index = 4,
|
||||
.has_pxp = 1,
|
||||
.__runtime.memory_regions = REGION_SMEM | REGION_STOLEN_LMEM,
|
||||
.__runtime.platform_engine_mask = BIT(RCS0) | BIT(BCS0) | BIT(CCS0),
|
||||
.require_force_probe = 1,
|
||||
|
||||
@@ -289,6 +289,14 @@ static bool pxp_component_bound(struct intel_pxp *pxp)
|
||||
return bound;
|
||||
}
|
||||
|
||||
int intel_pxp_get_backend_timeout_ms(struct intel_pxp *pxp)
|
||||
{
|
||||
if (HAS_ENGINE(pxp->ctrl_gt, GSC0))
|
||||
return GSCFW_MAX_ROUND_TRIP_LATENCY_MS;
|
||||
else
|
||||
return 250;
|
||||
}
|
||||
|
||||
static int __pxp_global_teardown_final(struct intel_pxp *pxp)
|
||||
{
|
||||
int timeout;
|
||||
@@ -302,10 +310,7 @@ static int __pxp_global_teardown_final(struct intel_pxp *pxp)
|
||||
intel_pxp_mark_termination_in_progress(pxp);
|
||||
intel_pxp_terminate(pxp, false);
|
||||
|
||||
if (HAS_ENGINE(pxp->ctrl_gt, GSC0))
|
||||
timeout = GSCFW_MAX_ROUND_TRIP_LATENCY_MS;
|
||||
else
|
||||
timeout = 250;
|
||||
timeout = intel_pxp_get_backend_timeout_ms(pxp);
|
||||
|
||||
if (!wait_for_completion_timeout(&pxp->termination, msecs_to_jiffies(timeout)))
|
||||
return -ETIMEDOUT;
|
||||
@@ -325,10 +330,7 @@ static int __pxp_global_teardown_restart(struct intel_pxp *pxp)
|
||||
*/
|
||||
pxp_queue_termination(pxp);
|
||||
|
||||
if (HAS_ENGINE(pxp->ctrl_gt, GSC0))
|
||||
timeout = GSCFW_MAX_ROUND_TRIP_LATENCY_MS;
|
||||
else
|
||||
timeout = 250;
|
||||
timeout = intel_pxp_get_backend_timeout_ms(pxp);
|
||||
|
||||
if (!wait_for_completion_timeout(&pxp->termination, msecs_to_jiffies(timeout)))
|
||||
return -ETIMEDOUT;
|
||||
|
||||
@@ -27,6 +27,7 @@ void intel_pxp_mark_termination_in_progress(struct intel_pxp *pxp);
|
||||
void intel_pxp_tee_end_arb_fw_session(struct intel_pxp *pxp, u32 arb_session_id);
|
||||
|
||||
int intel_pxp_get_readiness_status(struct intel_pxp *pxp);
|
||||
int intel_pxp_get_backend_timeout_ms(struct intel_pxp *pxp);
|
||||
int intel_pxp_start(struct intel_pxp *pxp);
|
||||
void intel_pxp_end(struct intel_pxp *pxp);
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "intel_pxp.h"
|
||||
#include "intel_pxp_debugfs.h"
|
||||
#include "intel_pxp_gsccs.h"
|
||||
#include "intel_pxp_irq.h"
|
||||
#include "intel_pxp_types.h"
|
||||
|
||||
@@ -45,6 +46,7 @@ static int pxp_terminate_set(void *data, u64 val)
|
||||
{
|
||||
struct intel_pxp *pxp = data;
|
||||
struct intel_gt *gt = pxp->ctrl_gt;
|
||||
int timeout_ms;
|
||||
|
||||
if (!intel_pxp_is_active(pxp))
|
||||
return -ENODEV;
|
||||
@@ -54,8 +56,10 @@ static int pxp_terminate_set(void *data, u64 val)
|
||||
intel_pxp_irq_handler(pxp, GEN12_DISPLAY_PXP_STATE_TERMINATED_INTERRUPT);
|
||||
spin_unlock_irq(gt->irq_lock);
|
||||
|
||||
timeout_ms = intel_pxp_get_backend_timeout_ms(pxp);
|
||||
|
||||
if (!wait_for_completion_timeout(&pxp->termination,
|
||||
msecs_to_jiffies(100)))
|
||||
msecs_to_jiffies(timeout_ms)))
|
||||
return -ETIMEDOUT;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -44,7 +44,7 @@ static int pxp_wait_for_session_state(struct intel_pxp *pxp, u32 id, bool in_pla
|
||||
KCR_SIP(pxp->kcr_base),
|
||||
mask,
|
||||
in_play ? mask : 0,
|
||||
100);
|
||||
250);
|
||||
|
||||
intel_runtime_pm_put(uncore->rpm, wakeref);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user