drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn42.c- Extension
.c- Size
- 23551 bytes
- Lines
- 760
- 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
../dmub_srv.hdmub_reg.hdmub_dcn35.hdmub_dcn401.hdmub_dcn42.hdcn/dcn_4_2_0_offset.hdcn/dcn_4_2_0_sh_mask.h
Detected Declarations
function dmub_srv_dcn42_regs_initfunction dmub_dcn42_enable_dmub_boot_optionsfunction dmub_dcn42_get_fb_base_offsetfunction dmub_dcn42_translate_addrfunction dmub_dcn42_resetfunction dmub_dcn42_reset_releasefunction dmub_dcn42_backdoor_loadfunction dmub_dcn42_backdoor_load_zfb_modefunction dmub_dcn42_setup_windowsfunction dmub_dcn42_get_inbox1_wptrfunction dmub_dcn42_get_inbox1_rptrfunction dmub_dcn42_setup_out_mailboxfunction dmub_dcn42_get_outbox1_wptrfunction dmub_dcn42_set_outbox1_rptrfunction dmub_dcn42_is_supportedfunction dmub_dcn42_get_fw_boot_optionfunction dmub_dcn42_setup_outbox0function dmub_dcn42_should_detectfunction dmub_dcn42_send_inbox0_cmdfunction dmub_dcn42_read_inbox0_ack_registerfunction dmub_dcn42_is_hw_powered_upfunction dmub_dcn42_set_inbox1_wptrfunction dmub_dcn42_is_hw_initfunction dmub_dcn42_get_fw_boot_statusfunction dmub_dcn42_skip_dmub_panel_power_sequencefunction dmub_dcn42_configure_dmub_in_system_memoryfunction dmub_dcn42_clear_inbox0_ack_registerfunction dmub_dcn42_send_reg_inbox0_cmd_msgfunction dmub_dcn42_read_reg_inbox0_rsp_int_statusfunction dmub_dcn42_read_reg_inbox0_cmd_rspfunction dmub_dcn42_write_reg_inbox0_rsp_int_ackfunction dmub_dcn42_clear_reg_inbox0_rsp_int_ackfunction dmub_dcn42_enable_reg_inbox0_rsp_intfunction dmub_dcn42_write_reg_outbox0_rdy_int_ackfunction dmub_dcn42_read_reg_outbox0_msgfunction dmub_dcn42_enable_reg_outbox0_rdy_intfunction dmub_dcn42_read_reg_outbox0_rdy_int_statusfunction dmub_dcn42_setup_mailboxfunction dmub_dcn42_set_gpintfunction dmub_dcn42_is_gpint_ackedfunction dmub_dcn42_get_gpint_responsefunction dmub_dcn42_get_gpint_dataoutfunction dmub_dcn42_get_outbox0_wptrfunction dmub_dcn42_set_outbox0_rptrfunction dmub_dcn42_get_current_timefunction dmub_dcn42_get_diagnostic_datafunction dmub_dcn42_get_preos_fw_infofunction dmub_dcn42_write_reg_outbox0_rsp
Annotated Snippet
if (payload_size_bytes <= msg_index * 4) {
break;
}
switch (msg_index) {
case 0:
REG_WRITE(DMCUB_REG_INBOX0_MSG0, dwords[msg_index + 1]);
break;
case 1:
REG_WRITE(DMCUB_REG_INBOX0_MSG1, dwords[msg_index + 1]);
break;
case 2:
REG_WRITE(DMCUB_REG_INBOX0_MSG2, dwords[msg_index + 1]);
break;
case 3:
REG_WRITE(DMCUB_REG_INBOX0_MSG3, dwords[msg_index + 1]);
break;
case 4:
REG_WRITE(DMCUB_REG_INBOX0_MSG4, dwords[msg_index + 1]);
break;
case 5:
REG_WRITE(DMCUB_REG_INBOX0_MSG5, dwords[msg_index + 1]);
break;
case 6:
REG_WRITE(DMCUB_REG_INBOX0_MSG6, dwords[msg_index + 1]);
break;
case 7:
REG_WRITE(DMCUB_REG_INBOX0_MSG7, dwords[msg_index + 1]);
break;
case 8:
REG_WRITE(DMCUB_REG_INBOX0_MSG8, dwords[msg_index + 1]);
break;
case 9:
REG_WRITE(DMCUB_REG_INBOX0_MSG9, dwords[msg_index + 1]);
break;
case 10:
REG_WRITE(DMCUB_REG_INBOX0_MSG10, dwords[msg_index + 1]);
break;
case 11:
REG_WRITE(DMCUB_REG_INBOX0_MSG11, dwords[msg_index + 1]);
break;
case 12:
REG_WRITE(DMCUB_REG_INBOX0_MSG12, dwords[msg_index + 1]);
break;
case 13:
REG_WRITE(DMCUB_REG_INBOX0_MSG13, dwords[msg_index + 1]);
break;
case 14:
REG_WRITE(DMCUB_REG_INBOX0_MSG14, dwords[msg_index + 1]);
break;
}
}
/* writing to INBOX RDY register will trigger DMUB REG INBOX0 RDY
* interrupt.
*/
REG_WRITE(DMCUB_REG_INBOX0_RDY, dwords[0]);
}
uint32_t dmub_dcn42_read_reg_inbox0_rsp_int_status(struct dmub_srv *dmub)
{
uint32_t status;
REG_GET(HOST_INTERRUPT_CSR, HOST_REG_INBOX0_RSP_INT_STAT, &status);
return status;
}
void dmub_dcn42_read_reg_inbox0_cmd_rsp(struct dmub_srv *dmub,
union dmub_rb_cmd *cmd)
{
uint32_t *dwords = (uint32_t *)cmd;
static_assert(sizeof(*cmd) == 64, "DMUB command size mismatch");
dwords[0] = REG_READ(DMCUB_REG_INBOX0_RSP);
dwords[1] = REG_READ(DMCUB_REG_INBOX0_MSG0);
dwords[2] = REG_READ(DMCUB_REG_INBOX0_MSG1);
dwords[3] = REG_READ(DMCUB_REG_INBOX0_MSG2);
dwords[4] = REG_READ(DMCUB_REG_INBOX0_MSG3);
dwords[5] = REG_READ(DMCUB_REG_INBOX0_MSG4);
dwords[6] = REG_READ(DMCUB_REG_INBOX0_MSG5);
dwords[7] = REG_READ(DMCUB_REG_INBOX0_MSG6);
dwords[8] = REG_READ(DMCUB_REG_INBOX0_MSG7);
dwords[9] = REG_READ(DMCUB_REG_INBOX0_MSG8);
dwords[10] = REG_READ(DMCUB_REG_INBOX0_MSG9);
dwords[11] = REG_READ(DMCUB_REG_INBOX0_MSG10);
dwords[12] = REG_READ(DMCUB_REG_INBOX0_MSG11);
dwords[13] = REG_READ(DMCUB_REG_INBOX0_MSG12);
dwords[14] = REG_READ(DMCUB_REG_INBOX0_MSG13);
dwords[15] = REG_READ(DMCUB_REG_INBOX0_MSG14);
Annotation
- Immediate include surface: `../dmub_srv.h`, `dmub_reg.h`, `dmub_dcn35.h`, `dmub_dcn401.h`, `dmub_dcn42.h`, `dcn/dcn_4_2_0_offset.h`, `dcn/dcn_4_2_0_sh_mask.h`.
- Detected declarations: `function dmub_srv_dcn42_regs_init`, `function dmub_dcn42_enable_dmub_boot_options`, `function dmub_dcn42_get_fb_base_offset`, `function dmub_dcn42_translate_addr`, `function dmub_dcn42_reset`, `function dmub_dcn42_reset_release`, `function dmub_dcn42_backdoor_load`, `function dmub_dcn42_backdoor_load_zfb_mode`, `function dmub_dcn42_setup_windows`, `function dmub_dcn42_get_inbox1_wptr`.
- 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.