OSDN Git Service

rockchip: Don't enable AFBC if width > 2560
authorKristian H. Kristensen <hoegsberg@google.com>
Tue, 7 Feb 2017 06:16:55 +0000 (22:16 -0800)
committerchrome-bot <chrome-bot@chromium.org>
Thu, 9 Feb 2017 00:24:40 +0000 (16:24 -0800)
BUG=chrome-os-partner:62585
TEST=Plug in monitor with native resolution over 2560 (eg 4k monitor)
and verify the output looks correct.

Change-Id: Iec925f54d74be19342d710313e5ac4ddca529e62
Signed-off-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-on: https://chromium-review.googlesource.com/438831
Commit-Ready: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
rockchip.c

index f039449..a64a42f 100644 (file)
@@ -130,7 +130,8 @@ static int rockchip_bo_create_with_modifiers(struct bo *bo,
                drv_bo_from_format(bo, aligned_width, height, format);
                bo->total_size = bo->strides[0] * aligned_height
                                 + w_mbs * h_mbs * 128;
-       } else if (has_modifier(modifiers, count,
+       } else if (width <= 2560 &&
+                  has_modifier(modifiers, count,
                                DRM_FORMAT_MOD_CHROMEOS_ROCKCHIP_AFBC)) {
                /* If the caller has decided they can use AFBC, always
                 * pick that */