drivers/gpu/drm/i915/i915_utils.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/i915_utils.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/i915_utils.c- Extension
.c- Size
- 1181 bytes
- Lines
- 47
- 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
linux/device.hdrm/drm_drv.hdrm/drm_print.hi915_drv.hi915_reg.hi915_utils.h
Detected Declarations
function add_taint_for_CIfunction i915_vtd_activefunction i915_direct_stolen_access
Annotated Snippet
// SPDX-License-Identifier: MIT
/*
* Copyright © 2019 Intel Corporation
*/
#include <linux/device.h>
#include <drm/drm_drv.h>
#include <drm/drm_print.h>
#include "i915_drv.h"
#include "i915_reg.h"
#include "i915_utils.h"
void add_taint_for_CI(struct drm_i915_private *i915, unsigned int taint)
{
drm_notice(&i915->drm, "CI tainted: %#x by %pS\n",
taint, __builtin_return_address(0));
__add_taint_for_CI(taint);
}
bool i915_vtd_active(struct drm_i915_private *i915)
{
if (device_iommu_mapped(i915->drm.dev))
return true;
/* Running as a guest, we assume the host is enforcing VT'd */
return i915_run_as_guest();
}
bool i915_direct_stolen_access(struct drm_i915_private *i915)
{
/*
* Wa_22018444074
*
* Access via BAR can hang MTL, go directly to GSM/DSM,
* except for VM guests which won't have access to it.
*
* Normally this would not work but on MTL the system firmware
* should have relaxed the access permissions sufficiently.
* 0x138914==0x1 indicates that the firmware has done its job.
*/
return IS_METEORLAKE(i915) && !i915_run_as_guest() &&
intel_uncore_read(&i915->uncore, MTL_PCODE_STOLEN_ACCESS) == STOLEN_ACCESS_ALLOWED;
}
Annotation
- Immediate include surface: `linux/device.h`, `drm/drm_drv.h`, `drm/drm_print.h`, `i915_drv.h`, `i915_reg.h`, `i915_utils.h`.
- Detected declarations: `function add_taint_for_CI`, `function i915_vtd_active`, `function i915_direct_stolen_access`.
- 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.