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,
	Qingqing Zhuo <Qingqing.Zhuo@amd.com>,
	Harry Wentland <Harry.Wentland@amd.com>,
	Roman Li <roman.li@amd.com>, Tom Chung <chiahsuan.chung@amd.com>
Subject: Re: [PATCH] drm/amd/display: Remove redundant condition in dcn35_calc_blocks_to_gate()
Date: Mon, 18 Mar 2024 17:05:09 -0600	[thread overview]
Message-ID: <bf44de6d-4984-4626-a815-b15a400014e0@amd.com> (raw)
In-Reply-To: <20240224063939.1512278-3-srinivasan.shanmugam@amd.com>



On 2/23/24 11:39 PM, Srinivasan Shanmugam wrote:
> pipe_ctx->plane_res.mpcc_inst is of a type that can only hold values
> between 0 and 255, so it's always greater than or equal to 0.
> 
> Thus the condition 'pipe_ctx->plane_res.mpcc_inst >= 0' was always true
> and has been removed.
> 
> Fixes the below:
> drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn35/dcn35_hwseq.c:1023 dcn35_calc_blocks_to_gate() warn: always true condition '(pipe_ctx->plane_res.mpcc_inst >= 0) => (0-255 >= 0)'
> 
> Fixes: 6f8b7565cca4 ("drm/amd/display: Add DCN35 HWSEQ")
> Cc: Qingqing Zhuo <Qingqing.Zhuo@amd.com>
> Cc: Harry Wentland <Harry.Wentland@amd.com>
> 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>
> ---
>   drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
> index 4b92df23ff0d..3dbbf6ea2603 100644
> --- a/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
> +++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
> @@ -1019,8 +1019,7 @@ void dcn35_calc_blocks_to_gate(struct dc *dc, struct dc_state *context,
>   		if (pipe_ctx->plane_res.dpp)
>   			update_state->pg_pipe_res_update[PG_DPP][pipe_ctx->plane_res.hubp->inst] = false;
>   
> -		if ((pipe_ctx->plane_res.dpp || pipe_ctx->stream_res.opp) &&
> -			pipe_ctx->plane_res.mpcc_inst >= 0)
> +		if (pipe_ctx->plane_res.dpp || pipe_ctx->stream_res.opp)
>   			update_state->pg_pipe_res_update[PG_MPCC][pipe_ctx->plane_res.mpcc_inst] = false;
>   
>   		if (pipe_ctx->stream_res.dsc)

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

  reply	other threads:[~2024-03-18 23:05 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 [this message]
2024-03-18 23:03 ` [PATCH] drm/amd/display: Improve 'dml32_TruncToValidBPP()' function Rodrigo Siqueira Jordao

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=bf44de6d-4984-4626-a815-b15a400014e0@amd.com \
    --to=rodrigo.siqueira@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Qingqing.Zhuo@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