From d1ae0ffe89d165ebcb386ff7bef36ee627bc6c70 Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Mon, 6 Feb 2017 22:16:55 -0800 Subject: [PATCH] rockchip: Don't enable AFBC if width > 2560 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 Reviewed-on: https://chromium-review.googlesource.com/438831 Commit-Ready: Douglas Anderson Tested-by: Douglas Anderson Reviewed-by: Daniele Castagna Reviewed-by: Gurchetan Singh --- rockchip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rockchip.c b/rockchip.c index f039449..a64a42f 100644 --- a/rockchip.c +++ b/rockchip.c @@ -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 */