drivers/gpu/drm/amd/display/dc/bios/command_table2.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/bios/command_table2.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/bios/command_table2.c- Extension
.c- Size
- 34024 bytes
- Lines
- 1096
- 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
dm_services.hObjectID.hatomfirmware.hatom.hinclude/bios_parser_interface.hcommand_table2.hcommand_table_helper2.hbios_parser_helper.hbios_parser_types_internal2.hamdgpu.hdc_dmub_srv.hdc.h
Detected Declarations
function filesfunction init_dig_encoder_controlfunction encoder_control_dmcubfunction encoder_control_digx_v1_5function encoder_control_fallbackfunction init_transmitter_controlfunction transmitter_control_dmcubfunction transmitter_control_v1_6function transmitter_control_dmcub_v1_7function transmitter_control_v1_7function transmitter_control_fallbackfunction init_set_pixel_clockfunction set_pixel_clock_dmcubfunction set_pixel_clock_v7function set_pixel_clock_fallbackfunction init_set_crtc_timingfunction set_crtc_using_dtd_timing_v3function init_enable_crtcfunction enable_crtc_v1function init_external_encoder_controlfunction external_encoder_control_v3function init_enable_disp_power_gatingfunction enable_disp_power_gating_dmcubfunction enable_disp_power_gating_v2_1function enable_disp_power_gating_fallbackfunction init_set_dce_clockfunction set_dce_clock_v2_1function init_get_smu_clock_infofunction get_smu_clock_info_v3_1function init_enable_lvtma_controlfunction enable_lvtma_control_dmcubfunction enable_lvtma_controlfunction dal_firmware_parser_init_cmd_tbl
Annotated Snippet
switch (cntl->color_depth) {
case COLOR_DEPTH_101010:
params.pclk_10khz =
(params.pclk_10khz * 30) / 24;
break;
case COLOR_DEPTH_121212:
params.pclk_10khz =
(params.pclk_10khz * 36) / 24;
break;
case COLOR_DEPTH_161616:
params.pclk_10khz =
(params.pclk_10khz * 48) / 24;
break;
default:
break;
}
if (bp->base.ctx->dc->ctx->dmub_srv &&
bp->base.ctx->dc->debug.dmub_command_table) {
encoder_control_dmcub(bp->base.ctx->dmub_srv, ¶ms);
return BP_RESULT_OK;
}
if (EXEC_BIOS_CMD_TABLE(digxencodercontrol, params))
result = BP_RESULT_OK;
return result;
}
static enum bp_result encoder_control_fallback(
struct bios_parser *bp,
struct bp_encoder_control *cntl)
{
if (bp->base.ctx->dc->ctx->dmub_srv &&
bp->base.ctx->dc->debug.dmub_command_table) {
return encoder_control_digx_v1_5(bp, cntl);
}
return BP_RESULT_FAILURE;
}
/*****************************************************************************
******************************************************************************
**
** TRANSMITTER CONTROL
**
******************************************************************************
*****************************************************************************/
static enum bp_result transmitter_control_v1_6(
struct bios_parser *bp,
struct bp_transmitter_control *cntl);
static enum bp_result transmitter_control_v1_7(
struct bios_parser *bp,
struct bp_transmitter_control *cntl);
static enum bp_result transmitter_control_fallback(
struct bios_parser *bp,
struct bp_transmitter_control *cntl);
static void init_transmitter_control(struct bios_parser *bp)
{
uint8_t frev;
uint8_t crev = 0;
if (!BIOS_CMD_TABLE_REVISION(dig1transmittercontrol, frev, crev) && (bp->base.ctx->dc->ctx->dce_version <= DCN_VERSION_2_0))
BREAK_TO_DEBUGGER();
switch (crev) {
case 6:
bp->cmd_tbl.transmitter_control = transmitter_control_v1_6;
break;
case 7:
bp->cmd_tbl.transmitter_control = transmitter_control_v1_7;
break;
default:
bp->cmd_tbl.transmitter_control = transmitter_control_fallback;
break;
}
}
static void transmitter_control_dmcub(
struct dc_dmub_srv *dmcub,
struct dig_transmitter_control_parameters_v1_6 *dig)
{
union dmub_rb_cmd cmd;
memset(&cmd, 0, sizeof(cmd));
Annotation
- Immediate include surface: `dm_services.h`, `ObjectID.h`, `atomfirmware.h`, `atom.h`, `include/bios_parser_interface.h`, `command_table2.h`, `command_table_helper2.h`, `bios_parser_helper.h`.
- Detected declarations: `function files`, `function init_dig_encoder_control`, `function encoder_control_dmcub`, `function encoder_control_digx_v1_5`, `function encoder_control_fallback`, `function init_transmitter_control`, `function transmitter_control_dmcub`, `function transmitter_control_v1_6`, `function transmitter_control_dmcub_v1_7`, `function transmitter_control_v1_7`.
- 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.