From nobody Sun Apr 26 10:51:54 2026 Received: from pop36.abv.bg (pop36.abv.bg [194.153.145.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DF5E17A2EA for ; Thu, 24 Apr 2025 18:37:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.153.145.227 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745519879; cv=none; b=KmGSg89AkrG2ewhxkzZr3B2rNF6aIdqeCJtMVLk4WdRcpZRDEO4f8cOUk0SICSI6jVeiWZH6fQPP27+VUjUlFy1Obaaup2e0ZdzYBPFrN/tKPqBc1Yzw1elQTQIyAhb71tyyr2OZojaNs+lV/zjWPH5M6a+3YbkQNoBVdk/6AO4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745519879; c=relaxed/simple; bh=Yl1I7GSjuSUE2DuiBjIR5OyDwgH2qXgKb+STCPqA4PM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QPEuNJfk6DImAxGgSXaJyt7mPHjpxcG1ZtyYvX+zwmkw/rl9kvJmhqE2SZku2o3G4xWi9vT9dWHi2rViF4wrXYHmrYmG4b4jTEyIWqAgOTVuV+JoffeQFiWfv1iQRULwJAC/P87c61Z4botaYx4WxkR/pPAoslWad7VyzdH6jcg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=abv.bg; spf=pass smtp.mailfrom=abv.bg; dkim=pass (1024-bit key) header.d=abv.bg header.i=@abv.bg header.b=PZDZQc85; arc=none smtp.client-ip=194.153.145.227 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=abv.bg Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=abv.bg Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=abv.bg header.i=@abv.bg header.b="PZDZQc85" Received: from smtp.abv.bg (localhost [127.0.0.1]) by pop36.abv.bg (Postfix) with ESMTP id B05621805D29; Thu, 24 Apr 2025 21:37:53 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abv.bg; s=smtp-out; t=1745519873; bh=vJsJYKKCAboGpLq0CAiXL5li3+HPTt5PnuNQ75PMrds=; h=From:To:Cc:Subject:Date:From; b=PZDZQc85QnPaY8qhHcEIvLhzDc7B6QMWoi6hgE+VmZjUrSsxYfWM2guoU1rkjY9Ts 5Gg6lA0MaJCaaci3AaU3VEqegjXC68p8mZOCfZnW3ZSfxL2Sayd5b0JIvHHW9Wk7Sy 7Swx8vpRk6vzRi/t++aAPWgU9b09ZOusPr5iMw2w= X-HELO: laptop.. Authentication-Results: smtp.abv.bg; auth=pass (plain) smtp.auth=ivan.shamliev.dev@abv.bg Received: from pop-144.92.escom.bg (HELO laptop..) (93.183.144.92) by smtp.abv.bg (qpsmtpd/0.96) with ESMTPSA (ECDHE-RSA-AES256-GCM-SHA384 encrypted); Thu, 24 Apr 2025 21:37:53 +0300 From: Ivan Shamliev To: austin.zheng@amd.com, jun.lei@amd.com, harry.wentland@amd.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Ivan Shamliev Subject: [PATCH] drm/amd/display: Use true/false for boolean variables in dcn314 Date: Thu, 24 Apr 2025 21:37:20 +0300 Message-ID: <20250424183720.26387-1-ivan.shamliev.dev@abv.bg> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- .../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( =20 static bool is_dual_plane(enum source_format_class source_format) { - bool ret_val =3D 0; + bool ret_val =3D false; =20 if ((source_format =3D=3D dm_420_12) || (source_format =3D=3D dm_420_8) |= | (source_format =3D=3D dm_420_10) || (source_format =3D=3D dm_rgbe_alpha)) - ret_val =3D 1; + ret_val =3D true; =20 return ret_val; } @@ -259,8 +259,8 @@ static void handle_det_buf_split(struct display_mode_li= b *mode_lib, display_rq_p unsigned int swath_bytes_c =3D 0; unsigned int full_swath_bytes_packed_l =3D 0; unsigned int full_swath_bytes_packed_c =3D 0; - bool req128_l =3D 0; - bool req128_c =3D 0; + bool req128_l =3D false; + bool req128_c =3D false; bool surf_linear =3D (pipe_src_param->sw_mode =3D=3D dm_sw_linear); bool surf_vert =3D (pipe_src_param->source_scan =3D=3D dm_vert); unsigned int log2_swath_height_l =3D 0; @@ -295,37 +295,37 @@ static void handle_det_buf_split(struct display_mode_= lib *mode_lib, display_rq_p #endif =20 if (total_swath_bytes <=3D detile_buf_size_in_bytes) { //full 256b request - req128_l =3D 0; - req128_c =3D 0; + req128_l =3D false; + req128_c =3D false; swath_bytes_l =3D full_swath_bytes_packed_l; swath_bytes_c =3D full_swath_bytes_packed_c; } else if (!rq_param->yuv420) { - req128_l =3D 1; - req128_c =3D 0; + req128_l =3D true; + req128_c =3D false; swath_bytes_c =3D full_swath_bytes_packed_c; swath_bytes_l =3D full_swath_bytes_packed_l / 2; } else if ((double) full_swath_bytes_packed_l / (double) full_swath_bytes= _packed_c < 1.5) { - req128_l =3D 0; - req128_c =3D 1; + req128_l =3D false; + req128_c =3D true; swath_bytes_l =3D full_swath_bytes_packed_l; swath_bytes_c =3D full_swath_bytes_packed_c / 2; =20 total_swath_bytes =3D 2 * swath_bytes_l + 2 * swath_bytes_c; =20 if (total_swath_bytes > detile_buf_size_in_bytes) { - req128_l =3D 1; + req128_l =3D true; swath_bytes_l =3D full_swath_bytes_packed_l / 2; } } else { - req128_l =3D 1; - req128_c =3D 0; + req128_l =3D true; + req128_c =3D false; swath_bytes_l =3D full_swath_bytes_packed_l / 2; swath_bytes_c =3D full_swath_bytes_packed_c; =20 total_swath_bytes =3D 2 * swath_bytes_l + 2 * swath_bytes_c; =20 if (total_swath_bytes > detile_buf_size_in_bytes) { - req128_c =3D 1; + req128_c =3D true; swath_bytes_c =3D full_swath_bytes_packed_c / 2; } } --=20 2.43.0