drm_hwcomposer: Add rotation support for hw planes
This patch adds support for transformed layers by using the
rotation property on drm planes.
Bug: chrome-os-partner:42093
Test: On smaug using
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:<R>
Change-Id: I86bb8ef2f77b5d046a5fddd57db4b87070b5801f
Signed-off-by: Sean Paul <seanpaul@chromium.org>
diff --git a/drmplane.cpp b/drmplane.cpp
index d6ac875..3f17d7c 100644
--- a/drmplane.cpp
+++ b/drmplane.cpp
@@ -120,6 +120,10 @@
return ret;
}
+ ret = drm_->GetPlaneProperty(*this, "rotation", &rotation_property_);
+ if (ret)
+ ALOGE("Could not get rotation property");
+
return 0;
}
@@ -174,4 +178,8 @@
const DrmProperty &DrmPlane::src_h_property() const {
return src_h_property_;
}
+
+const DrmProperty &DrmPlane::rotation_property() const {
+ return rotation_property_;
+}
}