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.

Dependency Surface

Detected Declarations

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

Implementation Notes