summaryrefslogtreecommitdiff
path: root/kms++
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-11-03 11:52:44 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-11-03 11:52:44 +0200
commitce3b4b2a3c58653b285a543227e5a64a3d828327 (patch)
tree242a23c442f5fdcab7c39d61a5c754c5d63e39a3 /kms++
parent40b807f6d16562edc261414a39353471c006a331 (diff)
dumbfb: pass O_RDWR to drmPrimeHandleToFD()
This enables write access to the dumb fb with mmap(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'kms++')
-rw-r--r--kms++/src/dumbframebuffer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kms++/src/dumbframebuffer.cpp b/kms++/src/dumbframebuffer.cpp
index d22b9f3..b21e8ff 100644
--- a/kms++/src/dumbframebuffer.cpp
+++ b/kms++/src/dumbframebuffer.cpp
@@ -127,7 +127,7 @@ int DumbFramebuffer::prime_fd(unsigned int plane)
return m_planes[plane].prime_fd;
int r = drmPrimeHandleToFD(card().fd(), m_planes[plane].handle,
- DRM_CLOEXEC, &m_planes[plane].prime_fd);
+ DRM_CLOEXEC | O_RDWR, &m_planes[plane].prime_fd);
if (r)
throw std::runtime_error("drmPrimeHandleToFD failed");