Skip to content

Commit a0275df

Browse files
Josip Pavicalexdeucher
authored andcommitted
drm/amd/display: fix dcc swath size calculations on dcn1
[Why] Swath sizes are being calculated incorrectly. The horizontal swath size should be the product of block height, viewport width, and bytes per element, but the calculation uses viewport height instead of width. The vertical swath size is similarly incorrectly calculated. The effect of this is that we report the wrong DCC caps. [How] Use viewport width in the horizontal swath size calculation and viewport height in the vertical swath size calculation. Signed-off-by: Josip Pavic <[email protected]> Reviewed-by: Aric Cyr <[email protected]> Acked-by: Rodrigo Siqueira <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 5ac7fd2 commit a0275df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,8 @@ static void hubbub1_det_request_size(
840840

841841
hubbub1_get_blk256_size(&blk256_width, &blk256_height, bpe);
842842

843-
swath_bytes_horz_wc = height * blk256_height * bpe;
844-
swath_bytes_vert_wc = width * blk256_width * bpe;
843+
swath_bytes_horz_wc = width * blk256_height * bpe;
844+
swath_bytes_vert_wc = height * blk256_width * bpe;
845845

846846
*req128_horz_wc = (2 * swath_bytes_horz_wc <= detile_buf_size) ?
847847
false : /* full 256B request */

0 commit comments

Comments
 (0)