]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amd/display: implement fw-driver interface for abm 2.4
authorJosip Pavic <Josip.Pavic@amd.com>
Wed, 18 Dec 2019 22:37:43 +0000 (17:37 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Jan 2020 19:15:49 +0000 (14:15 -0500)
[Why]
IRAM definition needed for versions of DMCU containing ABM 2.4

[How]
Pass ABM 2.3 IRAM definition, which is compatible with ABM 2.4, to DMCU
when ABM 2.4 FW is detected

Signed-off-by: Josip Pavic <Josip.Pavic@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/power/power_helpers.c

index 4e2f615c3566c2ba76ecea1698336b24dc712bb3..e75a4bb94488ec6fa71febd25d23e5e56853da8c 100644 (file)
@@ -662,7 +662,11 @@ bool dmcu_load_iram(struct dmcu *dmcu,
 
        memset(&ram_table, 0, sizeof(ram_table));
 
-       if (dmcu->dmcu_version.abm_version == 0x23) {
+       if (dmcu->dmcu_version.abm_version == 0x24) {
+               fill_iram_v_2_3((struct iram_table_v_2_2 *)ram_table, params);
+               result = dmcu->funcs->load_iram(
+                               dmcu, 0, (char *)(&ram_table), IRAM_RESERVE_AREA_START_V2_2);
+       } else if (dmcu->dmcu_version.abm_version == 0x23) {
                fill_iram_v_2_3((struct iram_table_v_2_2 *)ram_table, params);
 
                result = dmcu->funcs->load_iram(
@@ -687,3 +691,4 @@ bool dmcu_load_iram(struct dmcu *dmcu,
 
        return result;
 }
+