summaryrefslogtreecommitdiff
path: root/kms++/src
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2019-01-10 09:43:30 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2019-01-14 09:27:28 +0200
commit21c70a626cef72804f0ea270ffbae803e76e5b71 (patch)
treef0312a4fd0a943c00d7ecf0c952498e5ca1debfc /kms++/src
parent9f5bcf2393b36d0007664faf1b6b43ea54c7ea62 (diff)
Card: add support to get the driver name
Add support to get the driver name. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'kms++/src')
-rw-r--r--kms++/src/card.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/kms++/src/card.cpp b/kms++/src/card.cpp
index ea0d6a7..a5c6d53 100644
--- a/kms++/src/card.cpp
+++ b/kms++/src/card.cpp
@@ -30,6 +30,15 @@ Card::Card(const std::string& device)
throw invalid_argument(string(strerror(errno)) + " opening " + device);
m_fd = fd;
+ drmVersionPtr ver = drmGetVersion(m_fd);
+ m_version_major = ver->version_major;
+ m_version_minor = ver->version_minor;
+ m_version_patchlevel = ver->version_patchlevel;
+ m_version_name = string(ver->name, ver->name_len);
+ m_version_date = string(ver->date, ver->date_len);
+ m_version_desc = string(ver->desc, ver->desc_len);
+ drmFreeVersion(ver);
+
int r;
r = drmSetMaster(m_fd);