summaryrefslogtreecommitdiff
path: root/drmproperty.cpp
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2015-06-03 14:08:27 -0400
committerSean Paul <seanpaul@chromium.org>2015-06-15 16:30:48 -0400
commit877be974a2d4fc518700be8ffe803a50cb716ead (patch)
treefd3bb735012580ddaf2edf31ffd31b1083bb6117 /drmproperty.cpp
parent1f4ff5aec7bec305558228adb65ba56bd0b9f366 (diff)
drm_hwcomposer: Use atomic modeset to set crtc timing
Use the new drm blob ioctl and atomic modeset properties to do atomic modesetting, as opposed to the old setCrtc call. This allows us to set timing as soon as the system layer requests a new active config, as opposed to delaying it until we have an fb. Aside from reducing complexity, this should help with event control requests as we'll be able to service them with hw vblanks instead of synthesized sleeps. Change-Id: I9c80d44f52f52881a3a25b2ae518973d468bc110 Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drmproperty.cpp')
-rw-r--r--drmproperty.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/drmproperty.cpp b/drmproperty.cpp
index d4468c7..6dca12e 100644
--- a/drmproperty.cpp
+++ b/drmproperty.cpp
@@ -67,6 +67,8 @@ void DrmProperty::Init(drmModePropertyPtr p, uint64_t value) {
type_ = DRM_PROPERTY_TYPE_INT;
else if (flags_ & DRM_MODE_PROP_ENUM)
type_ = DRM_PROPERTY_TYPE_ENUM;
+ else if (flags_ & DRM_MODE_PROP_OBJECT)
+ type_ = DRM_PROPERTY_TYPE_OBJECT;
}
uint32_t DrmProperty::id() const {
@@ -93,6 +95,10 @@ int DrmProperty::value(uint64_t *value) const {
*value = enums_[value_].value_;
return 0;
+ case DRM_PROPERTY_TYPE_OBJECT:
+ *value = value_;
+ return 0;
+
default:
return -EINVAL;
}