AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Improve 'dml32_TruncToValidBPP()' function
@ 2024-02-24  6:39 Srinivasan Shanmugam
  2024-02-24  6:39 ` [PATCH] drm/amd/display: Fix logical operator in get_meta_and_pte_attr() Srinivasan Shanmugam
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Srinivasan Shanmugam @ 2024-02-24  6:39 UTC (permalink / raw)
  To: Rodrigo Siqueira, Aurabindo Pillai
  Cc: amd-gfx, Srinivasan Shanmugam, Roman Li, Tom Chung

Refactors the dml32_TruncToValidBPP function by removing a
redundant return statement.

The function previously had a return statement at the end that was
never executed because all execution paths in the function ended with
a return statement before this line.

Fixes the below:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:1680 dml32_TruncToValidBPP() warn: ignoring unreachable code.

Fixes: dda4fb85e433 ("drm/amd/display: DML changes for DCN32/321")
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Roman Li <roman.li@amd.com>
Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
---
 .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
index 80fccd4999a5..54ac8242f7b0 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
@@ -1678,8 +1678,6 @@ double dml32_TruncToValidBPP(
 	}
 
 	*RequiredSlots = dml_ceil(DesiredBPP / MaxLinkBPP * 64, 1);
-
-	return BPP_INVALID;
 } // TruncToValidBPP
 
 double dml32_RequiredDTBCLK(
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-18 23:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-24  6:39 [PATCH] drm/amd/display: Improve 'dml32_TruncToValidBPP()' function Srinivasan Shanmugam
2024-02-24  6:39 ` [PATCH] drm/amd/display: Fix logical operator in get_meta_and_pte_attr() Srinivasan Shanmugam
2024-02-24  6:39 ` [PATCH] drm/amd/display: Remove redundant condition in dcn35_calc_blocks_to_gate() Srinivasan Shanmugam
2024-03-18 23:05   ` Rodrigo Siqueira Jordao
2024-03-18 23:03 ` [PATCH] drm/amd/display: Improve 'dml32_TruncToValidBPP()' function Rodrigo Siqueira Jordao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox