Skip to content

Commit d13333e

Browse files
committed
plane: Add support to deal with raw fourccs
1 parent 1c7a364 commit d13333e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

kms++/inc/kms++/plane.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class Plane : public DrmPropObject
2525
PlaneType plane_type() const;
2626

2727
std::vector<Crtc*> get_possible_crtcs() const;
28+
std::vector<uint32_t> get_fourccs() const;
2829
std::vector<PixelFormat> get_formats() const;
2930
uint32_t crtc_id() const;
3031
uint32_t fb_id() const;

kms++/src/plane.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,17 @@ vector<Crtc*> Plane::get_possible_crtcs() const
9090
return v;
9191
}
9292

93+
vector<uint32_t> Plane::get_fourccs() const
94+
{
95+
auto p = m_priv->drm_plane;
96+
vector<uint32_t> r;
97+
98+
for (unsigned i = 0; i < p->count_formats; ++i)
99+
r.push_back(p->formats[i]);
100+
101+
return r;
102+
}
103+
93104
vector<PixelFormat> Plane::get_formats() const
94105
{
95106
auto p = m_priv->drm_plane;

0 commit comments

Comments
 (0)