drivers/gpu/drm/amd/display/dmub/dmub_srv.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dmub/dmub_srv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dmub/dmub_srv.h- Extension
.h- Size
- 35241 bytes
- Lines
- 1147
- 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
inc/dmub_cmd.hdc/dc_types.h
Detected Declarations
struct dmub_srvstruct dmub_srv_common_regsstruct dmub_srv_dcn31_regsstruct dmcub_trace_buf_entrystruct dmub_regionstruct dmub_windowstruct dmub_fbstruct dmub_srv_region_paramsstruct dmub_srv_fw_meta_info_paramsstruct dmub_srv_region_infostruct dmub_srv_memory_paramsstruct dmub_srv_fb_infostruct dmub_soc_fb_infostruct dmub_srv_hw_paramsstruct dmub_timeout_infostruct dmub_diagnostic_datastruct dmub_preos_infostruct dmub_srv_inboxstruct dmub_srv_base_funcsstruct dmub_srv_hw_funcsstruct dmub_srv_create_paramsstruct dmub_srvstruct dmub_notificationenum dmub_window_memory_typeenum dmub_statusenum dmub_asicenum dmub_window_idenum dmub_notification_typeenum dpia_notify_bw_alloc_statusenum dmub_memory_access_typeenum dmub_srv_power_state_typeenum dmub_inbox_cmd_interface_type
Annotated Snippet
struct dmub_region {
uint32_t base;
uint32_t top;
};
/**
* struct dmub_window - dmub hw cache window
* @off: offset to the fb memory in gpu address space
* @r: region in uc address space for cache window
*/
struct dmub_window {
union dmub_addr offset;
struct dmub_region region;
};
/**
* struct dmub_fb - defines a dmub framebuffer memory region
* @cpu_addr: cpu virtual address for the region, NULL if invalid
* @gpu_addr: gpu virtual address for the region, NULL if invalid
* @size: size of the region in bytes, zero if invalid
*/
struct dmub_fb {
void *cpu_addr;
uint64_t gpu_addr;
uint32_t size;
};
/**
* struct dmub_srv_region_params - params used for calculating dmub regions
* @inst_const_size: size of the fw inst const section
* @bss_data_size: size of the fw bss data section
* @vbios_size: size of the vbios data
* @fw_bss_data: raw firmware bss data section
*/
struct dmub_srv_region_params {
uint32_t inst_const_size;
uint32_t bss_data_size;
uint32_t vbios_size;
const uint8_t *fw_inst_const;
const uint8_t *fw_bss_data;
const enum dmub_window_memory_type *window_memory_type;
const struct dmub_fw_meta_info *fw_info;
};
/**
* struct dmub_srv_fw_meta_info_params - params used for fetching fw meta info from fw_image
* @inst_const_size: size of the fw inst const section
* @bss_data_size: size of the fw bss data section
* @fw_inst_const: raw firmware inst const section
* @fw_bss_data: raw firmware bss data section
* @custom_psp_footer_size: custom psp footer size to use when indexing for fw meta info
*/
struct dmub_srv_fw_meta_info_params {
uint32_t inst_const_size;
uint32_t bss_data_size;
const uint8_t *fw_inst_const;
const uint8_t *fw_bss_data;
uint32_t custom_psp_footer_size;
};
/**
* struct dmub_srv_region_info - output region info from the dmub service
* @fb_size: required minimum fb size for all regions, aligned to 4096 bytes
* @num_regions: number of regions used by the dmub service
* @regions: region info
*
* The regions are aligned such that they can be all placed within the
* same framebuffer but they can also be placed into different framebuffers.
*
* The size of each region can be calculated by the caller:
* size = reg.top - reg.base
*
* Care must be taken when performing custom allocations to ensure that each
* region base address is 256 byte aligned.
*/
struct dmub_srv_region_info {
uint32_t fb_size;
uint32_t gart_size;
uint8_t num_regions;
struct dmub_region regions[DMUB_WINDOW_TOTAL];
uint32_t verified_psp_footer_size;
};
/**
* struct dmub_srv_memory_params - parameters used for driver fb setup
* @region_info: region info calculated by dmub service
* @cpu_fb_addr: base cpu address for the framebuffer
* @cpu_inbox_addr: base cpu address for the gart
* @gpu_fb_addr: base gpu virtual address for the framebuffer
* @gpu_inbox_addr: base gpu virtual address for the gart
Annotation
- Immediate include surface: `inc/dmub_cmd.h`, `dc/dc_types.h`.
- Detected declarations: `struct dmub_srv`, `struct dmub_srv_common_regs`, `struct dmub_srv_dcn31_regs`, `struct dmcub_trace_buf_entry`, `struct dmub_region`, `struct dmub_window`, `struct dmub_fb`, `struct dmub_srv_region_params`, `struct dmub_srv_fw_meta_info_params`, `struct dmub_srv_region_info`.
- 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.