summaryrefslogtreecommitdiff
path: root/libkms++
diff options
context:
space:
mode:
Diffstat (limited to 'libkms++')
-rw-r--r--libkms++/dumbframebuffer.cpp26
-rw-r--r--libkms++/dumbframebuffer.h2
2 files changed, 14 insertions, 14 deletions
diff --git a/libkms++/dumbframebuffer.cpp b/libkms++/dumbframebuffer.cpp
index 730d297..ec0fefb 100644
--- a/libkms++/dumbframebuffer.cpp
+++ b/libkms++/dumbframebuffer.cpp
@@ -35,19 +35,6 @@ DumbFramebuffer::~DumbFramebuffer()
Destroy();
}
-uint32_t DumbFramebuffer::prime_fd(unsigned int plane)
-{
- if (m_planes[plane].prime_fd >= 0)
- return m_planes[plane].prime_fd;
-
- int r = drmPrimeHandleToFD(card().fd(), m_planes[plane].handle,
- DRM_CLOEXEC, &m_planes[plane].prime_fd);
- if (r)
- throw std::runtime_error("drmPrimeHandleToFD failed\n");
-
- return m_planes[plane].prime_fd;
-}
-
struct FormatPlaneInfo
{
uint8_t bitspp; /* bits per (macro) pixel */
@@ -164,4 +151,17 @@ uint8_t* DumbFramebuffer::map(unsigned plane)
return p.map;
}
+int DumbFramebuffer::prime_fd(unsigned int plane)
+{
+ if (m_planes[plane].prime_fd >= 0)
+ return m_planes[plane].prime_fd;
+
+ int r = drmPrimeHandleToFD(card().fd(), m_planes[plane].handle,
+ DRM_CLOEXEC, &m_planes[plane].prime_fd);
+ if (r)
+ throw std::runtime_error("drmPrimeHandleToFD failed\n");
+
+ return m_planes[plane].prime_fd;
+}
+
}
diff --git a/libkms++/dumbframebuffer.h b/libkms++/dumbframebuffer.h
index c221421..226a8dc 100644
--- a/libkms++/dumbframebuffer.h
+++ b/libkms++/dumbframebuffer.h
@@ -20,7 +20,7 @@ public:
uint32_t size(unsigned plane) const { return m_planes[plane].size; }
uint32_t offset(unsigned plane) const { return m_planes[plane].offset; }
uint8_t* map(unsigned plane);
- uint32_t prime_fd(unsigned plane);
+ int prime_fd(unsigned plane);
private:
struct FramebufferPlane {