From patchwork Thu Mar 30 03:08:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 96215 Delivered-To: patches@linaro.org Received: by 10.140.89.233 with SMTP id v96csp43899qgd; Wed, 29 Mar 2017 20:08:09 -0700 (PDT) X-Received: by 10.84.164.199 with SMTP id l7mr4238790plg.151.1490843289001; Wed, 29 Mar 2017 20:08:09 -0700 (PDT) Return-Path: Received: from mail-pg0-x234.google.com (mail-pg0-x234.google.com. [2607:f8b0:400e:c05::234]) by mx.google.com with ESMTPS id c64si738320pfa.292.2017.03.29.20.08.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Mar 2017 20:08:08 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::234 as permitted sender) client-ip=2607:f8b0:400e:c05::234; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::234 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-pg0-x234.google.com with SMTP id 81so25357691pgh.2 for ; Wed, 29 Mar 2017 20:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id; bh=R5YBmtxs/jAyJD1IwCLyfeLYoC8c9Op+C1++kt0z7BM=; b=OyZpEOfdrAxasAj1MD3XnMnGn8Pvgyx+/CYZDJ6OKTBzjZo1hu2ORZfrHlYJXuWLpr +Dm4QOalj4ZFIgsrTcgVcbGMb1K0isPMvC7uRwNH6xWdbNdijgBUCoBvaLWU+7C0/BWc YHIwrvt56vmMI6u5M8tfk4ivl4KPLWzzJHYMY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=R5YBmtxs/jAyJD1IwCLyfeLYoC8c9Op+C1++kt0z7BM=; b=QVZpkhUteMxYtT0OWVAkKGsau+v1t3G6aECPLIsBiBBFHvPsQSyfQsgqL3RH9Zq7++ D/j9hyqnAiYHHfHd+ynrfkEgOGqHZy9Kp9vftVBMf+npPSpY4xqZGeYW/aRtr2M5eZkP DeKy8XRklT3Fqn3plMz5vMSrOfoGwuRdH0XRxMcKwXZY+vlAvSkmx8WsRix4Wd55R3XG 4n9WAK7irVmHrwWe6OdyYs0Ve/yf9ygfKRGptDDwuDEvLR7xQvyFhJY9wX3TjAEjeAy8 N+g+CY3pOtDFaV7gcKcILxcTnz7Y4axfJcIF8Qs/KxAD/HuICGCV3wyVMCGNDB7Htvwe +WhQ== X-Gm-Message-State: AFeK/H1wRqA8QkdrX3IR4wAmrBVKZIpN8DTmfzCu4T2WIEVj5ftXO/5QbjBmRzg8Umv7OVU2DjI= X-Received: by 10.99.39.70 with SMTP id n67mr3789666pgn.132.1490843288709; Wed, 29 Mar 2017 20:08:08 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id c84sm787544pfc.38.2017.03.29.20.08.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Mar 2017 20:08:07 -0700 (PDT) From: John Stultz To: Rob Herring Subject: [PATCH] drm_hwcomposer: Fix invalid rotation value Date: Wed, 29 Mar 2017 20:08:06 -0700 Message-Id: <1490843286-21045-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 From: Rob Clark Change-Id: If718d3eee03575e011ae5d13dc9088ed73fbeab6 Signed-off-by: Robert Foss Signed-off-by: John Stultz --- drmdisplaycompositor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp index e8327cd..86e1b71 100644 --- a/drmdisplaycompositor.cpp +++ b/drmdisplaycompositor.cpp @@ -711,6 +711,8 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp, rotation |= 1 << DRM_ROTATE_180; else if (layer.transform & DrmHwcTransform::kRotate270) rotation |= 1 << DRM_ROTATE_270; + if (!rotation) + rotation |= 1 << DRM_ROTATE_0; } } @@ -728,7 +730,7 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp, } // TODO: Once we have atomic test, this should fall back to GL - if (rotation && plane->rotation_property().id() == 0) { + if ((rotation != 1 << DRM_ROTATE_0) && plane->rotation_property().id() == 0) { ALOGE("Rotation is not supported on plane %d", plane->id()); ret = -EINVAL; break;