diff options
author | Rob Clark <robdclark@gmail.com> | 2016-11-04 12:34:46 -0400 |
---|---|---|
committer | Robert Foss <robert.foss@collabora.com> | 2017-03-22 14:38:43 -0400 |
commit | e0fc29fef0a721e8e0f22810acde6cf2d28f8f03 (patch) | |
tree | 8db99e4eba4183d1ce74b73622ad8646402a5e7e | |
parent | 91a26fd9f3a9f15d4d61c3d9eec0fb5f9535aa42 (diff) | |
download | drm_hwcomposer-e0fc29fef0a721e8e0f22810acde6cf2d28f8f03.tar.gz drm_hwcomposer-e0fc29fef0a721e8e0f22810acde6cf2d28f8f03.tar.xz |
drm_hwcomposer: Fix invalid rotation value
Change-Id: If718d3eee03575e011ae5d13dc9088ed73fbeab6
Signed-off-by: Robert Foss <robert.foss@collabora.com>
-rw-r--r-- | drmdisplaycompositor.cpp | 4 |
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; |