summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2016-11-04 12:34:46 -0400
committerRobert Foss <robert.foss@collabora.com>2017-03-10 22:08:46 -0500
commitf7e78bf459d48deea7a2c530dfeaaaddcf4b63de (patch)
treef35b1b2b19028ad1bf51858bd0022afa6afec15b
parent1f56cbbfdef97073027d635cf87a367ca9f19276 (diff)
downloaddrm_hwcomposer-hwc2_fence_v2.tar.gz
drm_hwcomposer-hwc2_fence_v2.tar.xz
drm_hwcomposer: Fix invalid rotation valuehwc2_fence_v2
Change-Id: If718d3eee03575e011ae5d13dc9088ed73fbeab6 Signed-off-by: Robert Foss <robert.foss@collabora.com>
-rw-r--r--drmdisplaycompositor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp
index 6060688..92bbfd6 100644
--- a/drmdisplaycompositor.cpp
+++ b/drmdisplaycompositor.cpp
@@ -589,6 +589,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;
if (fence_fd != -1) {
int prop_id = plane->in_fence_fd_property().id();
@@ -618,7 +620,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;