mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Fix a test CalculatePrefetchSchedule()
@ 2023-04-17 21:35 Christophe JAILLET
  2023-04-24 20:13 ` Hamza Mahfooz
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2023-04-17 21:35 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	Pavle Kotarac, Nevenko Stupar, Aric Cyr
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, amd-gfx, dri-devel

It is likely Height was expected here, instead of Width.

Test the correct variable.

Fixes: 17529ea2acfa ("drm/amd/display: Optimizations for DML math")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
index b7c2844d0cbe..f294f2f8c75b 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
@@ -810,7 +810,7 @@ static bool CalculatePrefetchSchedule(
 			*swath_width_chroma_ub = dml_ceil(SwathWidthY / 2 - 1, myPipe->BlockWidth256BytesC) + myPipe->BlockWidth256BytesC;
 	} else {
 		*swath_width_luma_ub = dml_ceil(SwathWidthY - 1, myPipe->BlockHeight256BytesY) + myPipe->BlockHeight256BytesY;
-		if (myPipe->BlockWidth256BytesC > 0)
+		if (myPipe->BlockHeight256BytesC > 0)
 			*swath_width_chroma_ub = dml_ceil(SwathWidthY / 2 - 1, myPipe->BlockHeight256BytesC) + myPipe->BlockHeight256BytesC;
 	}
 
-- 
2.34.1


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

* Re: [PATCH] drm/amd/display: Fix a test CalculatePrefetchSchedule()
  2023-04-17 21:35 [PATCH] drm/amd/display: Fix a test CalculatePrefetchSchedule() Christophe JAILLET
@ 2023-04-24 20:13 ` Hamza Mahfooz
  0 siblings, 0 replies; 2+ messages in thread
From: Hamza Mahfooz @ 2023-04-24 20:13 UTC (permalink / raw)
  To: Christophe JAILLET, Harry Wentland, Leo Li, Rodrigo Siqueira,
	Alex Deucher, Christian König, Pan, Xinhui, David Airlie,
	Daniel Vetter, Pavle Kotarac, Nevenko Stupar, Aric Cyr
  Cc: dri-devel, kernel-janitors, linux-kernel, amd-gfx

On 4/17/23 17:35, Christophe JAILLET wrote:
> It is likely Height was expected here, instead of Width.
> 
> Test the correct variable.
> 
> Fixes: 17529ea2acfa ("drm/amd/display: Optimizations for DML math")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Applied, thanks!

> ---
>   drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
> index b7c2844d0cbe..f294f2f8c75b 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
> @@ -810,7 +810,7 @@ static bool CalculatePrefetchSchedule(
>   			*swath_width_chroma_ub = dml_ceil(SwathWidthY / 2 - 1, myPipe->BlockWidth256BytesC) + myPipe->BlockWidth256BytesC;
>   	} else {
>   		*swath_width_luma_ub = dml_ceil(SwathWidthY - 1, myPipe->BlockHeight256BytesY) + myPipe->BlockHeight256BytesY;
> -		if (myPipe->BlockWidth256BytesC > 0)
> +		if (myPipe->BlockHeight256BytesC > 0)
>   			*swath_width_chroma_ub = dml_ceil(SwathWidthY / 2 - 1, myPipe->BlockHeight256BytesC) + myPipe->BlockHeight256BytesC;
>   	}
>   
-- 
Hamza


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

end of thread, other threads:[~2023-04-24 20:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17 21:35 [PATCH] drm/amd/display: Fix a test CalculatePrefetchSchedule() Christophe JAILLET
2023-04-24 20:13 ` Hamza Mahfooz

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

all inboxes | Powered by JetHome®