]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amd/display: Hook up DAC to bios_parser_encoder_control
authorTimur Kristóf <timur.kristof@gmail.com>
Fri, 26 Sep 2025 18:01:44 +0000 (20:01 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 28 Oct 2025 14:08:20 +0000 (10:08 -0400)
Enable the codebase to use encoder_control()
when the encoder engine is one of the DACs.

The BIOS parser already supports calling the DAC1EncoderControl
function from the VBIOS, but it was not exposed anywhere.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c

index 154fd2c18e88485cb5789b022f70e4a6f038d90f..318be0bb5549e403b69f7bc2390d98338acf07b8 100644 (file)
@@ -742,6 +742,22 @@ static enum bp_result bios_parser_encoder_control(
 {
        struct bios_parser *bp = BP_FROM_DCB(dcb);
 
+       if (cntl->engine_id == ENGINE_ID_DACA) {
+               if (!bp->cmd_tbl.dac1_encoder_control)
+                       return BP_RESULT_FAILURE;
+
+               return bp->cmd_tbl.dac1_encoder_control(
+                       bp, cntl->action == ENCODER_CONTROL_ENABLE,
+                       cntl->pixel_clock, ATOM_DAC1_PS2);
+       } else if (cntl->engine_id == ENGINE_ID_DACB) {
+               if (!bp->cmd_tbl.dac2_encoder_control)
+                       return BP_RESULT_FAILURE;
+
+               return bp->cmd_tbl.dac2_encoder_control(
+                       bp, cntl->action == ENCODER_CONTROL_ENABLE,
+                       cntl->pixel_clock, ATOM_DAC1_PS2);
+       }
+
        if (!bp->cmd_tbl.dig_encoder_control)
                return BP_RESULT_FAILURE;