From 45e57a9f87e47f32c5c600dc004af5002c3b6ff7 Mon Sep 17 00:00:00 2001 From: Yashwanth Date: Wed, 8 Apr 2020 12:04:00 +0530 Subject: [PATCH] disp: msm: sde: add ubwc verification during plane atomic check In targets where ubwc is not supported, atomic check should fail and return a error value if the input format is ubwc. Change-Id: I21a40f510cc852e64fbcc05a5fb4848da4b4faaa Signed-off-by: Yashwanth --- msm/sde/sde_plane.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/msm/sde/sde_plane.c b/msm/sde/sde_plane.c index 7f4137d635..ce16c1568e 100644 --- a/msm/sde/sde_plane.c +++ b/msm/sde/sde_plane.c @@ -2621,6 +2621,10 @@ static int _sde_plane_sspp_atomic_check_helper(struct sde_plane *psde, SDE_ERROR_PLANE(psde, "invalid dest rect %u, %u, %ux%u\n", dst.x, dst.y, dst.w, dst.h); ret = -EINVAL; + } else if (SDE_FORMAT_IS_UBWC(fmt) && + !psde->catalog->ubwc_version) { + SDE_ERROR_PLANE(psde, "ubwc not supported\n"); + ret = -EINVAL; } return ret;