drivers/gpu/drm/xe/xe_soc_remapper.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_soc_remapper.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_soc_remapper.c- Extension
.c- Size
- 1455 bytes
- Lines
- 54
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
regs/xe_soc_remapper_regs.hxe_device.hxe_mmio.hxe_soc_remapper.h
Detected Declarations
function xe_soc_remapper_set_regionfunction xe_soc_remapper_set_telem_regionfunction xe_soc_remapper_set_sysctrl_regionfunction xe_soc_remapper_init
Annotated Snippet
// SPDX-License-Identifier: MIT
/*
* Copyright © 2025 Intel Corporation
*/
#include "regs/xe_soc_remapper_regs.h"
#include "xe_device.h"
#include "xe_mmio.h"
#include "xe_soc_remapper.h"
static void xe_soc_remapper_set_region(struct xe_device *xe, struct xe_reg reg,
u32 mask, u32 val)
{
guard(spinlock_irqsave)(&xe->soc_remapper.lock);
xe_mmio_rmw32(xe_root_tile_mmio(xe), reg, mask, val);
}
static void xe_soc_remapper_set_telem_region(struct xe_device *xe, u32 index)
{
xe_soc_remapper_set_region(xe, SG_REMAP_INDEX1, SG_REMAP_TELEM_MASK,
REG_FIELD_PREP(SG_REMAP_TELEM_MASK, index));
}
static void xe_soc_remapper_set_sysctrl_region(struct xe_device *xe, u32 index)
{
xe_soc_remapper_set_region(xe, SG_REMAP_INDEX1, SG_REMAP_SYSCTRL_MASK,
REG_FIELD_PREP(SG_REMAP_SYSCTRL_MASK, index));
}
/**
* xe_soc_remapper_init() - Initialize SoC remapper
* @xe: Pointer to xe device.
*
* Initialize SoC remapper.
*
* Return: 0 on success, error code on failure
*/
int xe_soc_remapper_init(struct xe_device *xe)
{
bool has_soc_remapper = xe->info.has_soc_remapper_telem ||
xe->info.has_soc_remapper_sysctrl;
if (has_soc_remapper)
spin_lock_init(&xe->soc_remapper.lock);
if (xe->info.has_soc_remapper_telem)
xe->soc_remapper.set_telem_region = xe_soc_remapper_set_telem_region;
if (xe->info.has_soc_remapper_sysctrl)
xe->soc_remapper.set_sysctrl_region = xe_soc_remapper_set_sysctrl_region;
return 0;
}
Annotation
- Immediate include surface: `regs/xe_soc_remapper_regs.h`, `xe_device.h`, `xe_mmio.h`, `xe_soc_remapper.h`.
- Detected declarations: `function xe_soc_remapper_set_region`, `function xe_soc_remapper_set_telem_region`, `function xe_soc_remapper_set_sysctrl_region`, `function xe_soc_remapper_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.