]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amd/display: add check in validate_only in dml2
authorGabe Teeger <gabe.teeger@amd.com>
Thu, 28 Sep 2023 21:00:35 +0000 (17:00 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 9 Oct 2023 20:51:28 +0000 (16:51 -0400)
[what]
does_configuration_meet_sw_policies check was not done in the
validate_only portion of dml2, so some unsupported modes were passing bw
validation, only to fail the same check later in validate_and_build. now
we add the check to validate_only.

Also add line in dcn35_resource to ensure that value set for
enable_windowed_mpo_odm gets passed to dml.

[why]
Immediate black screen during video playback at 4k144hz. The debugger
showed that we were failing validation in dml on every updateplanes().

Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Qingqing Zhuo <Qingqing.Zhuo@amd.com>
Signed-off-by: Gabe Teeger <gabe.teeger@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn35/dcn35_resource.c
drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.c

index 2283daa453186b00234f63d877f754124e9b8dfb..828846538a92915981420b222ae56accc41a3411 100644 (file)
@@ -2072,6 +2072,7 @@ static bool dcn35_resource_construct(
        dc->dml2_options.use_native_soc_bb_construction = true;
        if (dc->config.EnableMinDispClkODM)
                dc->dml2_options.minimize_dispclk_using_odm = true;
+       dc->dml2_options.enable_windowed_mpo_odm = dc->config.enable_windowed_mpo_odm;
 
        dc->dml2_options.callbacks.dc = dc;
        dc->dml2_options.callbacks.build_scaling_params = &resource_build_scaling_params;
index 11c131f6cf26ea16fa2ae890046dc14113613bad..9a5e145168bcb0c963af394ccc57e09ca3e6a9d9 100644 (file)
@@ -659,6 +659,9 @@ static bool dml2_validate_only(const struct dc_state *context)
                &dml2->v20.scratch.cur_display_config,
                &dml2->v20.scratch.mode_support_info);
 
+       if (result)
+               result = does_configuration_meet_sw_policies(dml2, &dml2->v20.scratch.cur_display_config, &dml2->v20.scratch.mode_support_info);
+
        return (result == 1) ? true : false;
 }