diff options
| author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2025-08-07 06:38:41 +0300 |
|---|---|---|
| committer | Tomi Valkeinen <tomi.valkeinen@iki.fi> | 2025-08-07 18:33:23 +0300 |
| commit | d13333ee69eeb11c99083d02a7fc741ae20ea0de (patch) | |
| tree | 2d453cc21627f6ec1beabfec78aa005310328b4e | |
| parent | 1c7a36421eb291fb5fb7ca20fbbeaae48db27059 (diff) | |
plane: Add support to deal with raw fourccs
| -rw-r--r-- | kms++/inc/kms++/plane.h | 1 | ||||
| -rw-r--r-- | kms++/src/plane.cpp | 11 |
2 files changed, 12 insertions, 0 deletions
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<Crtc*> get_possible_crtcs() const; + std::vector<uint32_t> get_fourccs() const; std::vector<PixelFormat> 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<Crtc*> Plane::get_possible_crtcs() const return v; } +vector<uint32_t> Plane::get_fourccs() const +{ + auto p = m_priv->drm_plane; + vector<uint32_t> r; + + for (unsigned i = 0; i < p->count_formats; ++i) + r.push_back(p->formats[i]); + + return r; +} + vector<PixelFormat> Plane::get_formats() const { auto p = m_priv->drm_plane; |
