[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250424183720.26387-1-ivan.shamliev.dev@abv.bg>
Date: Thu, 24 Apr 2025 21:37:20 +0300
From: Ivan Shamliev <ivan.shamliev.dev@....bg>
To: austin.zheng@....com,
jun.lei@....com,
harry.wentland@....com
Cc: dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
Ivan Shamliev <ivan.shamliev.dev@....bg>
Subject: [PATCH] drm/amd/display: Use true/false for boolean variables in dcn314
Replace 1 and 0 with true/false for booleans in display_rq_dlg_calc_314.c
to follow Linux kernel coding style, preferring C99 bool with true/false.
Signed-off-by: Ivan Shamliev <ivan.shamliev.dev@....bg>
---
.../dc/dml/dcn314/display_rq_dlg_calc_314.c | 28 +++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
index b7d2a0caec11..8c43b84ad034 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c
@@ -119,10 +119,10 @@ static bool CalculateBytePerPixelAnd256BBlockSizes(
static bool is_dual_plane(enum source_format_class source_format)
{
- bool ret_val = 0;
+ bool ret_val = false;
if ((source_format == dm_420_12) || (source_format == dm_420_8) || (source_format == dm_420_10) || (source_format == dm_rgbe_alpha))
- ret_val = 1;
+ ret_val = true;
return ret_val;
}
@@ -259,8 +259,8 @@ static void handle_det_buf_split(struct display_mode_lib *mode_lib, display_rq_p
unsigned int swath_bytes_c = 0;
unsigned int full_swath_bytes_packed_l = 0;
unsigned int full_swath_bytes_packed_c = 0;
- bool req128_l = 0;
- bool req128_c = 0;
+ bool req128_l = false;
+ 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;
@@ -295,37 +295,37 @@ static void handle_det_buf_split(struct display_mode_lib *mode_lib, display_rq_p
#endif
if (total_swath_bytes <= detile_buf_size_in_bytes) { //full 256b request
- req128_l = 0;
- req128_c = 0;
+ req128_l = false;
+ req128_c = false;
swath_bytes_l = full_swath_bytes_packed_l;
swath_bytes_c = full_swath_bytes_packed_c;
} else if (!rq_param->yuv420) {
- req128_l = 1;
- req128_c = 0;
+ req128_l = true;
+ req128_c = false;
swath_bytes_c = full_swath_bytes_packed_c;
swath_bytes_l = full_swath_bytes_packed_l / 2;
} else if ((double) full_swath_bytes_packed_l / (double) full_swath_bytes_packed_c < 1.5) {
- req128_l = 0;
- req128_c = 1;
+ req128_l = false;
+ req128_c = true;
swath_bytes_l = full_swath_bytes_packed_l;
swath_bytes_c = full_swath_bytes_packed_c / 2;
total_swath_bytes = 2 * swath_bytes_l + 2 * swath_bytes_c;
if (total_swath_bytes > detile_buf_size_in_bytes) {
- req128_l = 1;
+ req128_l = true;
swath_bytes_l = full_swath_bytes_packed_l / 2;
}
} else {
- req128_l = 1;
- req128_c = 0;
+ req128_l = true;
+ req128_c = false;
swath_bytes_l = full_swath_bytes_packed_l / 2;
swath_bytes_c = full_swath_bytes_packed_c;
total_swath_bytes = 2 * swath_bytes_l + 2 * swath_bytes_c;
if (total_swath_bytes > detile_buf_size_in_bytes) {
- req128_c = 1;
+ req128_c = true;
swath_bytes_c = full_swath_bytes_packed_c / 2;
}
}
--
2.43.0
Powered by blists - more mailing lists