From: Samson Tam <[email protected]>

[Why]
420 video at 1:1 has chroma scaling.  DML has check to
enforce 420 video must be scaled.  When UPSP does
chroma upscaling for 420, SPL treats 420 video at 1:1
as not being scaled.  But this triggers DML check to
fail validation

[How]
Add check for UPSP in DML 42x scaler validation
If 42x is not being scaled but UPSP is enabled, then
do not fail validation

Reviewed-by: Alvin Lee <[email protected]>
Signed-off-by: Samson Tam <[email protected]>
Signed-off-by: Ray Wu <[email protected]>
---
 .../dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.c    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.c
 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.c
index 71d14fb8c830..50ca620a4c41 100644
--- 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.c
+++ 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn6_funcs_mode_support.c
@@ -126,7 +126,8 @@ bool dcn6_ms_check_scaler_support(
        for (k = 0; k < display_cfg->num_planes; k++) {
                plane = &display_cfg->plane_descriptors[k];
                if (plane->composition.scaler_info.enabled == false
-                               && (dml2_core_utils_is_420(plane->pixel_format) 
|| dml2_core_utils_is_422_planar(plane->pixel_format) || 
dml2_core_utils_is_422_packed(plane->pixel_format)
+                       && (((dml2_core_utils_is_420(plane->pixel_format) || 
dml2_core_utils_is_422_planar(plane->pixel_format)
+                                       || 
dml2_core_utils_is_422_packed(plane->pixel_format)) && 
plane->composition.scaler_info.upsp_enabled == false)
                                                || 
plane->composition.scaler_info.plane0.h_ratio != 1.0
                                                || 
plane->composition.scaler_info.plane0.h_taps != 1.0
                                                || 
plane->composition.scaler_info.plane0.v_ratio != 1.0
-- 
2.43.0

Reply via email to