AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Siqueira Jordao <Rodrigo.Siqueira@amd.com>
To: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>,
	Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: amd-gfx@lists.freedesktop.org, Roman Li <roman.li@amd.com>,
	Tom Chung <chiahsuan.chung@amd.com>
Subject: Re: [PATCH] drm/amd/display: Improve 'dml32_TruncToValidBPP()' function
Date: Mon, 18 Mar 2024 17:03:25 -0600	[thread overview]
Message-ID: <c08f0e08-941f-457f-bfb6-5abc3d6584e5@amd.com> (raw)
In-Reply-To: <20240224063939.1512278-1-srinivasan.shanmugam@amd.com>



On 2/23/24 11:39 PM, Srinivasan Shanmugam wrote:
> 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(

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>

      parent reply	other threads:[~2024-03-18 23:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Rodrigo Siqueira Jordao [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c08f0e08-941f-457f-bfb6-5abc3d6584e5@amd.com \
    --to=rodrigo.siqueira@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=roman.li@amd.com \
    --cc=srinivasan.shanmugam@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox