]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/display: Call ATOM_INIT instead of ATOM_ENABLE for DMCUB
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Sat, 11 Jan 2020 18:43:39 +0000 (13:43 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 22 Jan 2020 21:55:28 +0000 (16:55 -0500)
[Why]
DMCUB command table doesn't support ATOM_ENABLE/ATOM_DISABLE anymore
so we never end up calling the DCN init path in DMCUB.

[How]
Map ATOM_ENABLE to ATOM_INIT only for DMCUB command table offloading.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/bios/command_table2.c

index c4ba6e84db6511a81eda89531c1de7d000aa1bd1..629a07a2719b2db7e3c657c0ed07aa669e0b2b28 100644 (file)
@@ -711,6 +711,10 @@ static void enable_disp_power_gating_dmcub(
        power_gating.header.sub_type = DMUB_CMD__VBIOS_ENABLE_DISP_POWER_GATING;
        power_gating.power_gating.pwr = *pwr;
 
+       /* ATOM_ENABLE is old API in DMUB */
+       if (power_gating.power_gating.pwr.enable == ATOM_ENABLE)
+               power_gating.power_gating.pwr.enable = ATOM_INIT;
+
        dc_dmub_srv_cmd_queue(dmcub, &power_gating.header);
        dc_dmub_srv_cmd_execute(dmcub);
        dc_dmub_srv_wait_idle(dmcub);