drm/i915/guc: Take GT PM ref when deregistering context
Taking a PM reference to prevent intel_gt_wait_for_idle from short circuiting while a deregister context H2G is in flight. To do this must issue the deregister H2G from a worker as context can be destroyed from an atomic context and taking GT PM ref blows up. Previously we took a runtime PM from this atomic context which worked but will stop working once runtime pm autosuspend in enabled. So this patch is two fold, stop intel_gt_wait_for_idle from short circuting and fix runtime pm autosuspend. v2: (John Harrison) - Split structure changes out in different patch (Tvrtko) - Don't drop lock in deregister_destroyed_contexts v3: (John Harrison) - Flush destroyed contexts before destroying context reg pool Signed-off-by:Matthew Brost <matthew.brost@intel.com> Reviewed-by:
John Harrison <John.C.Harrison@Intel.com> Signed-off-by:
John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211014172005.27155-3-matthew.brost@intel.com
Showing
- drivers/gpu/drm/i915/gt/intel_context.c 2 additions, 0 deletionsdrivers/gpu/drm/i915/gt/intel_context.c
- drivers/gpu/drm/i915/gt/intel_context_types.h 7 additions, 0 deletionsdrivers/gpu/drm/i915/gt/intel_context_types.h
- drivers/gpu/drm/i915/gt/intel_engine_pm.h 5 additions, 0 deletionsdrivers/gpu/drm/i915/gt/intel_engine_pm.h
- drivers/gpu/drm/i915/gt/intel_gt_pm.h 4 additions, 0 deletionsdrivers/gpu/drm/i915/gt/intel_gt_pm.h
- drivers/gpu/drm/i915/gt/uc/intel_guc.h 11 additions, 0 deletionsdrivers/gpu/drm/i915/gt/uc/intel_guc.h
- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c 92 additions, 54 deletionsdrivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
Loading
Please register or sign in to comment