]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Enable Replay for DCN315
authorJoan Lee <joan.lee@amd.com>
Mon, 15 Apr 2024 09:47:42 +0000 (17:47 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 30 Apr 2024 13:57:11 +0000 (09:57 -0400)
[why & how]
Enable Replay for DCN315.

Reviewed-by: Robin Chen <robin.chen@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Joan Lee <joan.lee@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c

index 4ce0f4bf1d9bb1adaaf9555b7f3faac7e860283a..ad40a657e173ae27bd129207c5fa66aa6f694313 100644 (file)
 #include "reg_helper.h"
 #include "dce/dmub_abm.h"
 #include "dce/dmub_psr.h"
+#include "dce/dmub_replay.h"
 #include "dce/dce_aux.h"
 #include "dce/dce_i2c.h"
 
@@ -1484,6 +1485,9 @@ static void dcn315_resource_destruct(struct dcn315_resource_pool *pool)
        if (pool->base.psr != NULL)
                dmub_psr_destroy(&pool->base.psr);
 
+       if (pool->base.replay != NULL)
+               dmub_replay_destroy(&pool->base.replay);
+
        if (pool->base.dccg != NULL)
                dcn_dccg_destroy(&pool->base.dccg);
 }
@@ -2048,6 +2052,14 @@ static bool dcn315_resource_construct(
                goto create_fail;
        }
 
+       /* Replay */
+       pool->base.replay = dmub_replay_create(ctx);
+       if (pool->base.replay == NULL) {
+               dm_error("DC: failed to create replay obj!\n");
+               BREAK_TO_DEBUGGER();
+               goto create_fail;
+       }
+
        /* ABM */
        for (i = 0; i < pool->base.res_cap->num_timing_generator; i++) {
                pool->base.multiple_abms[i] = dmub_abm_create(ctx,