From: Alyssa Rosenzweig Date: Wed, 2 Jun 2021 21:07:10 +0000 (-0400) Subject: panfrost: Simplify compute_checksum_size formula X-Git-Tag: upstream/21.2.3~2176 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=729b8c55f43dfb81de30c0db69f6a251a0f5250a;p=platform%2Fupstream%2Fmesa.git panfrost: Simplify compute_checksum_size formula Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/lib/pan_texture.c b/src/panfrost/lib/pan_texture.c index 80795ca..23a9475 100644 --- a/src/panfrost/lib/pan_texture.c +++ b/src/panfrost/lib/pan_texture.c @@ -516,11 +516,8 @@ panfrost_compute_checksum_size( unsigned width, unsigned height) { - unsigned aligned_width = ALIGN_POT(width, CHECKSUM_TILE_WIDTH); - unsigned aligned_height = ALIGN_POT(height, CHECKSUM_TILE_HEIGHT); - - unsigned tile_count_x = aligned_width / CHECKSUM_TILE_WIDTH; - unsigned tile_count_y = aligned_height / CHECKSUM_TILE_HEIGHT; + unsigned tile_count_x = DIV_ROUND_UP(width, CHECKSUM_TILE_WIDTH); + unsigned tile_count_y = DIV_ROUND_UP(height, CHECKSUM_TILE_HEIGHT); slice->crc.stride = tile_count_x * CHECKSUM_BYTES_PER_TILE;