summaryrefslogtreecommitdiff
path: root/kms++/src/dmabufframebuffer.cpp
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-02-05 12:03:34 +0200
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-03-26 15:44:00 +0200
commita35d57fa9088fbccd468ad095c89aba096b2494e (patch)
tree24b73249e7e741e36ed1b03a9b92461fd36bfa72 /kms++/src/dmabufframebuffer.cpp
parent1936a703bf1a3b27db9bb4d503b861f6d1fa2e74 (diff)
Use the fourcc helpers
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Diffstat (limited to 'kms++/src/dmabufframebuffer.cpp')
-rw-r--r--kms++/src/dmabufframebuffer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/kms++/src/dmabufframebuffer.cpp b/kms++/src/dmabufframebuffer.cpp
index e5d06ed..f303799 100644
--- a/kms++/src/dmabufframebuffer.cpp
+++ b/kms++/src/dmabufframebuffer.cpp
@@ -58,13 +58,13 @@ DmabufFramebuffer::DmabufFramebuffer(Card& card, uint32_t width, uint32_t height
offsets.resize(4);
if (modifiers.empty()) {
- r = drmModeAddFB2(card.fd(), width, height, (uint32_t)format,
+ r = drmModeAddFB2(card.fd(), width, height, pixel_format_to_fourcc(format),
bo_handles, pitches.data(), offsets.data(), &id, 0);
if (r)
throw invalid_argument(string("drmModeAddFB2 failed: ") + strerror(errno));
} else {
modifiers.resize(4);
- r = drmModeAddFB2WithModifiers(card.fd(), width, height, (uint32_t)format,
+ r = drmModeAddFB2WithModifiers(card.fd(), width, height, pixel_format_to_fourcc(format),
bo_handles, pitches.data(), offsets.data(), modifiers.data(), &id, DRM_MODE_FB_MODIFIERS);
if (r)
throw invalid_argument(string("drmModeAddFB2WithModifiers failed: ") + strerror(errno));