drivers/gpu/drm/panfrost/panfrost_device.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panfrost/panfrost_device.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panfrost/panfrost_device.h- Extension
.h- Size
- 9807 bytes
- Lines
- 346
- 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
linux/atomic.hlinux/io-pgtable.hlinux/pm.hlinux/regulator/consumer.hlinux/spinlock.hdrm/drm_auth.hdrm/drm_device.hdrm/drm_mm.hdrm/gpu_scheduler.hpanfrost_devfreq.hpanfrost_job.h
Detected Declarations
struct panfrost_devicestruct panfrost_mmustruct panfrost_job_slotstruct panfrost_jobstruct panfrost_perfcntstruct panfrost_featuresstruct panfrost_compatiblestruct panfrost_device_debugfsstruct panfrost_devicestruct panfrost_mmustruct panfrost_engine_usagestruct panfrost_file_privenum panfrost_drv_comp_bitsenum panfrost_gpu_pmenum panfrost_gpu_quirksenum drm_panfrost_exception_typefunction panfrost_high_prio_allowedfunction panfrost_model_cmpfunction panfrost_model_is_bifrostfunction panfrost_model_eqfunction panfrost_exception_is_faultfunction panfrost_device_schedule_reset
Annotated Snippet
struct panfrost_features {
u16 id;
u16 revision;
u64 shader_present;
u64 tiler_present;
u64 l2_present;
u64 stack_present;
u32 as_present;
u32 js_present;
u32 l2_features;
u32 core_features;
u32 tiler_features;
u32 mem_features;
u32 mmu_features;
u32 thread_features;
u32 max_threads;
u32 thread_max_workgroup_sz;
u32 thread_max_barrier_sz;
u32 coherency_features;
u32 selected_coherency;
u32 afbc_features;
u32 texture_features[4];
u32 js_features[16];
u32 nr_core_groups;
u32 thread_tls_alloc;
unsigned long hw_features[64 / BITS_PER_LONG];
unsigned long hw_issues[64 / BITS_PER_LONG];
};
/*
* Features that cannot be automatically detected and need matching using the
* compatible string, typically SoC-specific.
*/
struct panfrost_compatible {
/* Supplies count and names. */
int num_supplies;
const char * const *supply_names;
/*
* Number of power domains required, note that values 0 and 1 are
* handled identically, as only values > 1 need special handling.
*/
int num_pm_domains;
/* Only required if num_pm_domains > 1. */
const char * const *pm_domain_names;
/* Vendor implementation quirks callback */
void (*vendor_quirk)(struct panfrost_device *pfdev);
/* Allowed PM features */
u8 pm_features;
/* GPU configuration quirks */
u8 gpu_quirks;
};
/**
* struct panfrost_device_debugfs - Device-wide DebugFS tracking structures
*/
struct panfrost_device_debugfs {
/** @gems_list: Device-wide list of GEM objects owned by at least one file. */
struct list_head gems_list;
/** @gems_lock: Serializes access to the device-wide list of GEM objects. */
struct mutex gems_lock;
};
struct panfrost_device {
struct drm_device base;
int gpu_irq;
int mmu_irq;
void __iomem *iomem;
struct clk *clock;
struct clk *bus_clock;
struct clk *bus_ace_clock;
struct regulator_bulk_data *regulators;
struct reset_control *rstc;
/* pm_domains for devices with more than one. */
struct device *pm_domain_devs[MAX_PM_DOMAINS];
struct device_link *pm_domain_links[MAX_PM_DOMAINS];
bool coherent;
struct panfrost_features features;
const struct panfrost_compatible *comp;
DECLARE_BITMAP(is_suspended, PANFROST_COMP_BIT_MAX);
Annotation
- Immediate include surface: `linux/atomic.h`, `linux/io-pgtable.h`, `linux/pm.h`, `linux/regulator/consumer.h`, `linux/spinlock.h`, `drm/drm_auth.h`, `drm/drm_device.h`, `drm/drm_mm.h`.
- Detected declarations: `struct panfrost_device`, `struct panfrost_mmu`, `struct panfrost_job_slot`, `struct panfrost_job`, `struct panfrost_perfcnt`, `struct panfrost_features`, `struct panfrost_compatible`, `struct panfrost_device_debugfs`, `struct panfrost_device`, `struct panfrost_mmu`.
- 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.