drivers/gpu/drm/xe/xe_tile_sriov_pf_debugfs.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/xe/xe_tile_sriov_pf_debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/xe/xe_tile_sriov_pf_debugfs.c- Extension
.c- Size
- 7332 bytes
- Lines
- 253
- 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/debugfs.hdrm/drm_debugfs.hxe_device.hxe_device_types.hxe_gt_sriov_pf_config.hxe_gt_sriov_pf_debugfs.hxe_pm.hxe_tile_debugfs.hxe_tile_sriov_pf_debugfs.hxe_sriov.hxe_sriov_pf.hxe_sriov_pf_provision.h
Detected Declarations
function extract_vfidfunction pf_config_print_available_ggttfunction pf_config_print_ggttfunction pf_config_print_vramfunction pf_add_config_attrsfunction pf_populate_tilefunction xe_tile_sriov_pf_debugfs_populate
Annotated Snippet
// SPDX-License-Identifier: MIT
/*
* Copyright © 2025 Intel Corporation
*/
#include <linux/debugfs.h>
#include <drm/drm_debugfs.h>
#include "xe_device.h"
#include "xe_device_types.h"
#include "xe_gt_sriov_pf_config.h"
#include "xe_gt_sriov_pf_debugfs.h"
#include "xe_pm.h"
#include "xe_tile_debugfs.h"
#include "xe_tile_sriov_pf_debugfs.h"
#include "xe_sriov.h"
#include "xe_sriov_pf.h"
#include "xe_sriov_pf_provision.h"
/*
* /sys/kernel/debug/dri/BDF/
* ├── sriov # d_inode->i_private = (xe_device*)
* │ ├── pf # d_inode->i_private = (xe_device*)
* │ │ ├── tile0 # d_inode->i_private = (xe_tile*)
* │ │ ├── tile1
* │ │ : :
* │ ├── vf1 # d_inode->i_private = VFID(1)
* │ │ ├── tile0 # d_inode->i_private = (xe_tile*)
* │ │ ├── tile1
* │ │ : :
* │ ├── vfN # d_inode->i_private = VFID(N)
* │ │ ├── tile0 # d_inode->i_private = (xe_tile*)
* │ │ ├── tile1
* : : : :
*/
static void *extract_priv(struct dentry *d)
{
return d->d_inode->i_private;
}
__maybe_unused
static struct xe_tile *extract_tile(struct dentry *d)
{
return extract_priv(d);
}
static struct xe_device *extract_xe(struct dentry *d)
{
return extract_priv(d->d_parent->d_parent);
}
__maybe_unused
static unsigned int extract_vfid(struct dentry *d)
{
void *pp = extract_priv(d->d_parent);
return pp == extract_xe(d) ? PFID : (uintptr_t)pp;
}
/*
* /sys/kernel/debug/dri/BDF/
* ├── sriov
* : ├── pf
* : ├── tile0
* : ├── ggtt_available
* ├── ggtt_provisioned
*/
static int pf_config_print_available_ggtt(struct xe_tile *tile, struct drm_printer *p)
{
return xe_gt_sriov_pf_config_print_available_ggtt(tile->primary_gt, p);
}
static int pf_config_print_ggtt(struct xe_tile *tile, struct drm_printer *p)
{
return xe_gt_sriov_pf_config_print_ggtt(tile->primary_gt, p);
}
static const struct drm_info_list pf_ggtt_info[] = {
{
"ggtt_available",
.show = xe_tile_debugfs_simple_show,
.data = pf_config_print_available_ggtt,
},
{
"ggtt_provisioned",
.show = xe_tile_debugfs_simple_show,
.data = pf_config_print_ggtt,
},
Annotation
- Immediate include surface: `linux/debugfs.h`, `drm/drm_debugfs.h`, `xe_device.h`, `xe_device_types.h`, `xe_gt_sriov_pf_config.h`, `xe_gt_sriov_pf_debugfs.h`, `xe_pm.h`, `xe_tile_debugfs.h`.
- Detected declarations: `function extract_vfid`, `function pf_config_print_available_ggtt`, `function pf_config_print_ggtt`, `function pf_config_print_vram`, `function pf_add_config_attrs`, `function pf_populate_tile`, `function xe_tile_sriov_pf_debugfs_populate`.
- 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.