From: Alvin Lee <[email protected]>

[Description]
dml21_top_utm_check_mode_supported must return the success status from
the mode support result otherwise the caller will believe that mode
support always returns true. This can cause issues where mode support
returns true, where mode programming returns false.

Reviewed-by: Wenjing Liu <[email protected]>
Signed-off-by: Alvin Lee <[email protected]>
Signed-off-by: Chenyu Chen <[email protected]>
---
 .../drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.c 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.c
index 73e02b10934f..77c9308bb9e6 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_top/dml2_top_utm.c
@@ -290,7 +290,7 @@ static bool dml2_top_utm_check_mode_supported(struct 
dml2_check_mode_supported_i
        DML_LOG_INFO("%s exit with %s\n", __func__, dml2_status_str(status));
        DML_LOG_TOP_IF_EXIT();
 
-       return true;
+       return status == DML2_STATUS_OK;
 }
 
 static bool dml2_top_utm_build_mode_programming(struct 
dml2_build_mode_programming_in_out *in_out)
-- 
2.43.0

Reply via email to