@@ -272,7 +272,7 @@ static int proto_context_set_protected(struct drm_i915_private *i915,
pc->pxp_wakeref = intel_runtime_pm_get(&i915->runtime_pm);
if (!intel_pxp_is_active(i915))
- ret = intel_pxp_start(&to_gt(i915)->pxp);
+ ret = intel_pxp_start(i915);
}
return ret;
@@ -246,10 +246,17 @@ static bool pxp_component_bound(struct intel_pxp *pxp)
* the arb session is restarted from the irq work when we receive the
* termination completion interrupt
*/
-int intel_pxp_start(struct intel_pxp *pxp)
+int intel_pxp_start(struct drm_i915_private *i915)
{
+ struct intel_gt *gt = intel_pxp_get_owning_gt(i915);
+ struct intel_pxp *pxp;
int ret = 0;
+ if (!gt)
+ return -ENODEV;
+
+ pxp = >->pxp;
+
if (!intel_pxp_is_enabled_on_gt(pxp))
return -ENODEV;
@@ -32,7 +32,7 @@ void intel_pxp_fini_hw(struct intel_pxp *pxp);
void intel_pxp_mark_termination_in_progress(struct intel_pxp *pxp);
-int intel_pxp_start(struct intel_pxp *pxp);
+int intel_pxp_start(struct drm_i915_private *i915);
int intel_pxp_key_check(struct intel_pxp *pxp,
struct drm_i915_gem_object *obj,