summaryrefslogtreecommitdiff
path: root/kms++
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2018-06-29 13:25:23 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-06-29 13:25:23 +0300
commit5666baaa8413bcd77344bee9117aab9321477b01 (patch)
tree9944e641d7d818e213b95b7e7e6c7afe50eb46fa /kms++
parentdc9a7df509f7ed318669392afae454496bc49234 (diff)
drmpropobject: add set_prop_value(Property* prop, uint64_t value)
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'kms++')
-rw-r--r--kms++/inc/kms++/drmpropobject.h1
-rw-r--r--kms++/src/drmpropobject.cpp5
2 files changed, 6 insertions, 0 deletions
diff --git a/kms++/inc/kms++/drmpropobject.h b/kms++/inc/kms++/drmpropobject.h
index 38de584..d9ba58e 100644
--- a/kms++/inc/kms++/drmpropobject.h
+++ b/kms++/inc/kms++/drmpropobject.h
@@ -23,6 +23,7 @@ public:
const std::map<uint32_t, uint64_t>& get_prop_map() const { return m_prop_values; }
+ int set_prop_value(Property* prop, uint64_t value);
int set_prop_value(uint32_t id, uint64_t value);
int set_prop_value(const std::string& name, uint64_t value);
diff --git a/kms++/src/drmpropobject.cpp b/kms++/src/drmpropobject.cpp
index f5a3c97..f91f913 100644
--- a/kms++/src/drmpropobject.cpp
+++ b/kms++/src/drmpropobject.cpp
@@ -80,6 +80,11 @@ unique_ptr<Blob> DrmPropObject::get_prop_value_as_blob(const string& name) const
return unique_ptr<Blob>(new Blob(card(), blob_id));
}
+int DrmPropObject::set_prop_value(Property* prop, uint64_t value)
+{
+ return drmModeObjectSetProperty(card().fd(), this->id(), this->object_type(), prop->id(), value);
+}
+
int DrmPropObject::set_prop_value(uint32_t id, uint64_t value)
{
return drmModeObjectSetProperty(card().fd(), this->id(), this->object_type(), id, value);