OSDN Git Service

minigbm: rockchip: use height to calculate h_mbs
authorGurchetan Singh <gurchetansingh@chromium.org>
Mon, 23 Jan 2017 15:58:59 +0000 (07:58 -0800)
committerchrome-bot <chrome-bot@chromium.org>
Tue, 14 Feb 2017 22:50:35 +0000 (14:50 -0800)
The block height should be calculated from the height,
not the width.

BUG=none
TEST=none

Change-Id: Ica4bca0831c12a2594e16c06c42074592a8fd560
Reviewed-on: https://chromium-review.googlesource.com/441910
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
rockchip.c

index a64a42f..30b6822 100644 (file)
@@ -122,7 +122,7 @@ static int rockchip_bo_create_with_modifiers(struct bo *bo,
 
        if (format == DRM_FORMAT_NV12) {
                uint32_t w_mbs = DIV_ROUND_UP(ALIGN(width, 16), 16);
-               uint32_t h_mbs = DIV_ROUND_UP(ALIGN(width, 16), 16);
+               uint32_t h_mbs = DIV_ROUND_UP(ALIGN(height, 16), 16);
 
                uint32_t aligned_width = w_mbs * 16;
                uint32_t aligned_height = DIV_ROUND_UP(h_mbs * 16 * 3, 2);