drivers/gpu/drm/xe/display/xe_display_rpm.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/display/xe_display_rpm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/display/xe_display_rpm.c- Extension
.c- Size
- 2070 bytes
- Lines
- 78
- 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
drm/intel/display_parent_interface.hintel_display_core.hintel_display_rpm.hxe_device.hxe_device_types.hxe_pm.h
Detected Declarations
function xe_display_rpm_putfunction xe_display_rpm_put_uncheckedfunction xe_display_rpm_suspendedfunction xe_display_rpm_assert_held
Annotated Snippet
// SPDX-License-Identifier: MIT
/* Copyright © 2025 Intel Corporation */
#include <drm/intel/display_parent_interface.h>
#include "intel_display_core.h"
#include "intel_display_rpm.h"
#include "xe_device.h"
#include "xe_device_types.h"
#include "xe_pm.h"
/* -ENOENT means we got the ref, but there's no tracking */
#define INTEL_WAKEREF_DEF ERR_PTR(-ENOENT)
static struct ref_tracker *xe_display_rpm_get(const struct drm_device *drm)
{
return xe_pm_runtime_resume_and_get(to_xe_device(drm)) ? INTEL_WAKEREF_DEF : NULL;
}
static struct ref_tracker *xe_display_rpm_get_if_in_use(const struct drm_device *drm)
{
return xe_pm_runtime_get_if_in_use(to_xe_device(drm)) ? INTEL_WAKEREF_DEF : NULL;
}
static struct ref_tracker *xe_display_rpm_get_noresume(const struct drm_device *drm)
{
xe_pm_runtime_get_noresume(to_xe_device(drm));
return INTEL_WAKEREF_DEF;
}
static void xe_display_rpm_put(const struct drm_device *drm, struct ref_tracker *wakeref)
{
if (wakeref)
xe_pm_runtime_put(to_xe_device(drm));
}
static void xe_display_rpm_put_unchecked(const struct drm_device *drm)
{
xe_pm_runtime_put(to_xe_device(drm));
}
static bool xe_display_rpm_suspended(const struct drm_device *drm)
{
struct xe_device *xe = to_xe_device(drm);
return pm_runtime_suspended(xe->drm.dev);
}
static void xe_display_rpm_assert_held(const struct drm_device *drm)
{
/* FIXME */
}
static void xe_display_rpm_assert_block(const struct drm_device *drm)
{
/* FIXME */
}
static void xe_display_rpm_assert_unblock(const struct drm_device *drm)
{
/* FIXME */
}
const struct intel_display_rpm_interface xe_display_rpm_interface = {
.get = xe_display_rpm_get,
.get_raw = xe_display_rpm_get,
.get_if_in_use = xe_display_rpm_get_if_in_use,
.get_noresume = xe_display_rpm_get_noresume,
.put = xe_display_rpm_put,
.put_raw = xe_display_rpm_put,
.put_unchecked = xe_display_rpm_put_unchecked,
.suspended = xe_display_rpm_suspended,
.assert_held = xe_display_rpm_assert_held,
.assert_block = xe_display_rpm_assert_block,
.assert_unblock = xe_display_rpm_assert_unblock
};
Annotation
- Immediate include surface: `drm/intel/display_parent_interface.h`, `intel_display_core.h`, `intel_display_rpm.h`, `xe_device.h`, `xe_device_types.h`, `xe_pm.h`.
- Detected declarations: `function xe_display_rpm_put`, `function xe_display_rpm_put_unchecked`, `function xe_display_rpm_suspended`, `function xe_display_rpm_assert_held`.
- 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.