drm/amd/display: fix handling of max_downscale_src_width fail check in SPL
authorSamson Tam <Samson.Tam@amd.com>
Wed, 16 Oct 2024 18:11:35 +0000 (14:11 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 28 Oct 2024 20:36:04 +0000 (16:36 -0400)
commitc56c0aca0a0ebb67cc9a609b4361b36dc2adb7c3
tree30dddada90b15d78605f7dab992f07ef6474d063
parent4007f07a47de4a277f4760cac3aed1b31d973eea
drm/amd/display: fix handling of max_downscale_src_width fail check in SPL

[Why]
If max_downscale_src_width check fails, we exit early from
spl_calculate_scaler_params but dscl_prog_data is not fully
populated. If viewport is left at 0, it can cause crash in dml.

[How]
Call spl_set_dscl_prog_data before we exit early from
spl_calculate_scaler_params to populate dscl_prog_data
Populate taps in spl_get_optimal_number_of_taps

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@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/spl/dc_spl.c