From: Josip Pavic <[email protected]>

[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 <[email protected]>
Reviewed-by: Aric Cyr <[email protected]>
Acked-by: Harry Wentland <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
---
 drivers/gpu/drm/amd/display/modules/power/power_helpers.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c 
b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
index 4e2f615c3566..e75a4bb94488 100644
--- a/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
+++ b/drivers/gpu/drm/amd/display/modules/power/power_helpers.c
@@ -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;
 }
+
-- 
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to