From d13333ee69eeb11c99083d02a7fc741ae20ea0de Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 7 Aug 2025 06:38:41 +0300 Subject: plane: Add support to deal with raw fourccs --- kms++/inc/kms++/plane.h | 1 + kms++/src/plane.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'kms++') diff --git a/kms++/inc/kms++/plane.h b/kms++/inc/kms++/plane.h index f6d0ca6..689e750 100644 --- a/kms++/inc/kms++/plane.h +++ b/kms++/inc/kms++/plane.h @@ -25,6 +25,7 @@ public: PlaneType plane_type() const; std::vector get_possible_crtcs() const; + std::vector get_fourccs() const; std::vector get_formats() const; uint32_t crtc_id() const; uint32_t fb_id() const; diff --git a/kms++/src/plane.cpp b/kms++/src/plane.cpp index 7a4f26d..3e17024 100644 --- a/kms++/src/plane.cpp +++ b/kms++/src/plane.cpp @@ -90,6 +90,17 @@ vector Plane::get_possible_crtcs() const return v; } +vector Plane::get_fourccs() const +{ + auto p = m_priv->drm_plane; + vector r; + + for (unsigned i = 0; i < p->count_formats; ++i) + r.push_back(p->formats[i]); + + return r; +} + vector Plane::get_formats() const { auto p = m_priv->drm_plane; -- cgit v1.2.3