Skip to contentSkip to conversation

drm_hwcomposer: correct handling of DRM_MODE_ROTATE_0

PATCH In review Rob Herring 2 participants 3 messages Nov 1, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drmdisplaycompositor.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drmdisplaycompositor.cpp +3 -1
index 8225726df5cd..dceb78d452c4 100644
@@ -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;
Signature · 6 lines
2.14.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 8 lines · Rob Herring

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.

---
 drmdisplaycompositor.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Pushed to master.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

Hi Rob,

Quoted 6 lines · Rob Herring
Quoted 5 lines · Rob Herring

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.

Quoted 6 lines
Quoted 4 lines
---
 drmdisplaycompositor.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Pushed to master.

Thanks :)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel