aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAustin Zheng <austin.zheng@amd.com>2024-07-10 14:15:57 -0400
committerAlex Deucher <alexander.deucher@amd.com>2024-07-23 17:36:15 -0400
commitaaa21e6a33bae017fc190bd75f76baa29d259346 (patch)
tree9dbe43bfbb4f94c0a4fe6d70fff9d0e00548178f /drivers/gpu
parent94beb4ac1b3bc5fbeef977960a90ee4f594b4465 (diff)
drm/amd/display: Check if Mode is Supported Before Returning Result
[Why] Even if the mode is not supported dml2_check_mode_supported() would still return true. This causes an unsupported mode to be programmed. [How] Check if the mode is supported or not and return the proper result. Reviewed-by: Chaitanya Dhere <chaitanya.dhere@amd.com> Signed-off-by: Austin Zheng <austin.zheng@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c
index 30d07cd1065f..e9b40a45ffdd 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_top/dml_top.c
@@ -138,8 +138,9 @@ bool dml2_check_mode_supported(struct dml2_check_mode_supported_in_out *in_out)
}
in_out->is_supported = mcache_success;
+ result = result && in_out->is_supported;
- return true;
+ return result;
}
bool dml2_build_mode_programming(struct dml2_build_mode_programming_in_out *in_out)