drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/pxp/intel_pxp_pm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/pxp/intel_pxp_pm.c- Extension
.c- Size
- 1652 bytes
- Lines
- 81
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
i915_drv.hintel_pxp.hintel_pxp_irq.hintel_pxp_pm.hintel_pxp_session.hintel_pxp_types.h
Detected Declarations
function Copyrightfunction intel_pxp_suspendfunction with_intel_runtime_pmfunction _pxp_resumefunction intel_pxp_resume_completefunction intel_pxp_runtime_resumefunction intel_pxp_runtime_suspend
Annotated Snippet
// SPDX-License-Identifier: MIT
/*
* Copyright(c) 2020 Intel Corporation.
*/
#include "i915_drv.h"
#include "intel_pxp.h"
#include "intel_pxp_irq.h"
#include "intel_pxp_pm.h"
#include "intel_pxp_session.h"
#include "intel_pxp_types.h"
void intel_pxp_suspend_prepare(struct intel_pxp *pxp)
{
if (!intel_pxp_is_enabled(pxp))
return;
intel_pxp_end(pxp);
intel_pxp_invalidate(pxp);
}
void intel_pxp_suspend(struct intel_pxp *pxp)
{
intel_wakeref_t wakeref;
if (!intel_pxp_is_enabled(pxp))
return;
with_intel_runtime_pm(&pxp->ctrl_gt->i915->runtime_pm, wakeref) {
intel_pxp_fini_hw(pxp);
pxp->hw_state_invalidated = false;
}
}
static void _pxp_resume(struct intel_pxp *pxp, bool take_wakeref)
{
intel_wakeref_t wakeref;
if (!intel_pxp_is_enabled(pxp))
return;
/*
* The PXP component gets automatically unbound when we go into S3 and
* re-bound after we come out, so in that scenario we can defer the
* hw init to the bind call.
* NOTE: GSC-CS backend doesn't rely on components.
*/
if (!HAS_ENGINE(pxp->ctrl_gt, GSC0) && !pxp->pxp_component)
return;
if (take_wakeref)
wakeref = intel_runtime_pm_get(&pxp->ctrl_gt->i915->runtime_pm);
intel_pxp_init_hw(pxp);
if (take_wakeref)
intel_runtime_pm_put(&pxp->ctrl_gt->i915->runtime_pm, wakeref);
}
void intel_pxp_resume_complete(struct intel_pxp *pxp)
{
_pxp_resume(pxp, true);
}
void intel_pxp_runtime_resume(struct intel_pxp *pxp)
{
_pxp_resume(pxp, false);
}
void intel_pxp_runtime_suspend(struct intel_pxp *pxp)
{
if (!intel_pxp_is_enabled(pxp))
return;
pxp->arb_is_valid = false;
intel_pxp_fini_hw(pxp);
pxp->hw_state_invalidated = false;
}
Annotation
- Immediate include surface: `i915_drv.h`, `intel_pxp.h`, `intel_pxp_irq.h`, `intel_pxp_pm.h`, `intel_pxp_session.h`, `intel_pxp_types.h`.
- Detected declarations: `function Copyright`, `function intel_pxp_suspend`, `function with_intel_runtime_pm`, `function _pxp_resume`, `function intel_pxp_resume_complete`, `function intel_pxp_runtime_resume`, `function intel_pxp_runtime_suspend`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
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.