From: Rob Herring <robh@kernel.org>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH hwc] drm_hwcomposer: correct handling of DRM_MODE_ROTATE_0
Date: Wed, 1 Nov 2017 11:37:10 -0500 [thread overview]
Message-ID: <20171101163710.13779-1-robh@kernel.org> (raw)
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>
---
drmdisplaycompositor.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp
index 8225726df5cd..dceb78d452c4 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;
--
2.14.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2017-11-01 16:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 16:37 Rob Herring [this message]
2017-11-01 17:50 ` [PATCH hwc] drm_hwcomposer: correct handling of DRM_MODE_ROTATE_0 Rob Herring
2017-11-01 18:02 ` Robert Foss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171101163710.13779-1-robh@kernel.org \
--to=robh@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.