diff options
author | Rob Herring <robh@kernel.org> | 2017-11-01 11:21:48 -0500 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2017-11-01 12:46:54 -0500 |
commit | bd03b9996a4015e9b562b3b9861ebd706bcafb6a (patch) | |
tree | fb1d2a0b8830f4bb2348f22fc6336b060a93efaa /drmdisplaycompositor.cpp | |
parent | 60d1d4f7407cf33042c293ad6be9dbac50878638 (diff) |
drm_hwcomposer: correct handling of DRM_MODE_ROTATE_0
If the rotation property is supported for a plane, then the rotation
value must be non-zero. For the case of 0 degree rotation,
DRM_MODE_ROTATE_0 needs to be set.
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drmdisplaycompositor.cpp')
-rw-r--r-- | drmdisplaycompositor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp index 8225726..dceb78d 100644 --- a/drmdisplaycompositor.cpp +++ b/drmdisplaycompositor.cpp @@ -581,6 +581,8 @@ int DrmDisplayCompositor::CommitFrame(DrmDisplayComposition *display_comp, rotation |= DRM_MODE_ROTATE_180; else if (layer.transform & DrmHwcTransform::kRotate270) rotation |= DRM_MODE_ROTATE_270; + else + rotation |= DRM_MODE_ROTATE_0; if (fence_fd < 0) { int prop_id = plane->in_fence_fd_property().id(); @@ -610,7 +612,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 != DRM_MODE_ROTATE_0 && plane->rotation_property().id() == 0) { ALOGE("Rotation is not supported on plane %d", plane->id()); ret = -EINVAL; break; |