From: Joan Lee Date: Mon, 15 Apr 2024 09:47:42 +0000 (+0800) Subject: drm/amd/display: Enable Replay for DCN315 X-Git-Tag: v6.11-rc1~141^2~25^2~528 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2c5cb0c3561d7aaa5d1cbe30ec4dd50c09291be;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: Enable Replay for DCN315 [why & how] Enable Replay for DCN315. Reviewed-by: Robin Chen Acked-by: Wayne Lin Signed-off-by: Joan Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c index 4ce0f4bf1d9bb..ad40a657e173a 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c @@ -125,6 +125,7 @@ #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,