]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: fix zero value for APU watermark_c
authorCharlene Liu <Charlene.Liu@amd.com>
Wed, 12 Mar 2025 21:30:25 +0000 (17:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Apr 2025 19:18:31 +0000 (15:18 -0400)
[why]
the guard of is_apu not in sync, caused no watermark_c output.

Reviewed-by: Ovidiu Bunea <ovidiu.bunea@amd.com>
Signed-off-by: Charlene Liu <Charlene.Liu@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@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/dml2/dml2_wrapper.c

index f549a778f6f1a9b35f84b0dd3cbb71cdf0f6db3c..04316d719426aa756aa3ef274d7a0346e74a549c 100644 (file)
@@ -661,7 +661,10 @@ static bool dml2_validate_and_build_resource(const struct dc *in_dc, struct dc_s
                dml2_copy_clocks_to_dc_state(&out_clks, context);
                dml2_extract_watermark_set(&context->bw_ctx.bw.dcn.watermarks.a, &dml2->v20.dml_core_ctx);
                dml2_extract_watermark_set(&context->bw_ctx.bw.dcn.watermarks.b, &dml2->v20.dml_core_ctx);
-               memcpy(&context->bw_ctx.bw.dcn.watermarks.c, &dml2->v20.g6_temp_read_watermark_set, sizeof(context->bw_ctx.bw.dcn.watermarks.c));
+               if (context->streams[0]->sink->link->dc->caps.is_apu)
+                       dml2_extract_watermark_set(&context->bw_ctx.bw.dcn.watermarks.c, &dml2->v20.dml_core_ctx);
+               else
+                       memcpy(&context->bw_ctx.bw.dcn.watermarks.c, &dml2->v20.g6_temp_read_watermark_set, sizeof(context->bw_ctx.bw.dcn.watermarks.c));
                dml2_extract_watermark_set(&context->bw_ctx.bw.dcn.watermarks.d, &dml2->v20.dml_core_ctx);
                dml2_extract_writeback_wm(context, &dml2->v20.dml_core_ctx);
                //copy for deciding zstate use