[PATCH] drm/amd/display: Fix unsigned expression compared with zero

Zhongjun Tan hbut_tan at 163.com
Wed Jul 6 06:39:51 UTC 2022


From: Zhongjun Tan <tanzhongjun at coolpad.com>

Fix unsigned expression compared with zero

Signed-off-by: Zhongjun Tan <tanzhongjun at coolpad.com>
---
 .../gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c
index 548cdef8a8ad..21e4af38b8c1 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c
@@ -244,8 +244,8 @@ static void handle_det_buf_split(struct display_mode_lib *mode_lib,
 	bool req128_c = false;
 	bool surf_linear = (pipe_src_param->sw_mode == dm_sw_linear);
 	bool surf_vert = (pipe_src_param->source_scan == dm_vert);
-	unsigned int log2_swath_height_l = 0;
-	unsigned int log2_swath_height_c = 0;
+	int log2_swath_height_l = 0;
+	int log2_swath_height_c = 0;
 	unsigned int detile_buf_size_in_bytes = mode_lib->ip.det_buffer_size_kbytes * 1024;
 
 	full_swath_bytes_packed_l = rq_param->misc.rq_l.full_swath_bytes;
-- 
2.29.0



More information about the dri-devel mailing list