drivers/gpu/drm/i915/pxp/intel_pxp.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/pxp/intel_pxp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/pxp/intel_pxp.c- Extension
.c- Size
- 14359 bytes
- Lines
- 545
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/workqueue.hdrm/drm_print.hgem/i915_gem_context.hgt/intel_context.hgt/intel_gt.hi915_drv.hi915_wait_util.hintel_pxp.hintel_pxp_gsccs.hintel_pxp_irq.hintel_pxp_regs.hintel_pxp_session.hintel_pxp_tee.hintel_pxp_types.h
Detected Declarations
function intel_pxp_is_supportedfunction intel_pxp_is_enabledfunction intel_pxp_is_activefunction kcr_pxp_set_statusfunction kcr_pxp_enablefunction kcr_pxp_disablefunction create_vcs_contextfunction destroy_vcs_contextfunction pxp_init_fullfunction intel_pxp_initfunction intel_pxp_finifunction intel_pxp_mark_termination_in_progressfunction pxp_queue_terminationfunction pxp_component_boundfunction intel_pxp_get_backend_timeout_msfunction __pxp_global_teardown_finalfunction __pxp_global_teardown_restartfunction intel_pxp_endfunction pxp_required_fw_failedfunction pxp_fw_dependencies_completedfunction intel_pxp_get_readiness_statusfunction intel_pxp_startfunction intel_pxp_init_hwfunction intel_pxp_fini_hwfunction intel_pxp_key_checkfunction intel_pxp_invalidate
Annotated Snippet
if (likely(!i915_gem_context_uses_protected_content(ctx))) {
i915_gem_context_put(ctx);
continue;
}
spin_unlock_irq(&i915->gem.contexts.lock);
/*
* By the time we get here we are either going to suspend with
* quiesced execution or the HW keys are already long gone and
* in this case it is worthless to attempt to close the context
* and wait for its execution. It will hang the GPU if it has
* not already. So, as a fast mitigation, we can ban the
* context as quick as we can. That might race with the
* execbuffer, but currently this is the best that can be done.
*/
for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it)
intel_context_ban(ce, NULL);
i915_gem_context_unlock_engines(ctx);
/*
* The context has been banned, no need to keep the wakeref.
* This is safe from races because the only other place this
* is touched is context_release and we're holding a ctx ref
*/
if (ctx->pxp_wakeref) {
intel_runtime_pm_put(&i915->runtime_pm,
ctx->pxp_wakeref);
ctx->pxp_wakeref = NULL;
}
spin_lock_irq(&i915->gem.contexts.lock);
list_safe_reset_next(ctx, cn, link);
i915_gem_context_put(ctx);
}
spin_unlock_irq(&i915->gem.contexts.lock);
}
Annotation
- Immediate include surface: `linux/workqueue.h`, `drm/drm_print.h`, `gem/i915_gem_context.h`, `gt/intel_context.h`, `gt/intel_gt.h`, `i915_drv.h`, `i915_wait_util.h`, `intel_pxp.h`.
- Detected declarations: `function intel_pxp_is_supported`, `function intel_pxp_is_enabled`, `function intel_pxp_is_active`, `function kcr_pxp_set_status`, `function kcr_pxp_enable`, `function kcr_pxp_disable`, `function create_vcs_context`, `function destroy_vcs_context`, `function pxp_init_full`, `function intel_pxp_init`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.