9 #include <drm_fourcc.h>
12 #ifndef DRM_FORMAT_INVALID
13 #define DRM_FORMAT_INVALID 0
15 #ifndef DRM_FORMAT_NV15
16 #define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5')
18 #ifndef DRM_FORMAT_NV20
19 #define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0')
21 #ifndef DRM_FORMAT_P210
22 #define DRM_FORMAT_P210 fourcc_code('P', '2', '1', '0')
24 #ifndef DRM_FORMAT_P010
25 #define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0')
27 #ifndef DRM_FORMAT_P012
28 #define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2')
30 #ifndef DRM_FORMAT_P016
31 #define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6')
33 #ifndef DRM_FORMAT_P030
34 #define DRM_FORMAT_P030 fourcc_code('P', '0', '3', '0')
36 #ifndef DRM_FORMAT_XRGB16161616F
37 #define DRM_FORMAT_XRGB16161616F fourcc_code('X', 'R', '4', 'H')
39 #ifndef DRM_FORMAT_XBGR16161616F
40 #define DRM_FORMAT_XBGR16161616F fourcc_code('X', 'B', '4', 'H')
42 #ifndef DRM_FORMAT_ARGB16161616F
43 #define DRM_FORMAT_ARGB16161616F fourcc_code('A', 'R', '4', 'H')
45 #ifndef DRM_FORMAT_ABGR16161616F
46 #define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H')
50 using DRMPlane = std::shared_ptr<class MythDRMPlane>;
56 static DRMPlane Create(
int FD, uint32_t Id, uint32_t Index);
57 static DRMPlanes GetPlanes(
int FD,
int CRTCFilter = -1);
59 static QString PlaneTypeToString (uint64_t Type);
62 static QString FormatToString (uint32_t
Format);
63 static QString FormatsToString (
const FOURCCVec& Formats);
64 static bool FormatIsVideo (uint32_t
Format);
65 static bool HasOverlayFormat (
const FOURCCVec& Formats);
66 static uint32_t GetAlphaFormat (
const FOURCCVec& Formats);
67 QString Description()
const;
70 uint32_t m_index { 0 };
71 uint64_t m_type { DRM_PLANE_TYPE_PRIMARY };
72 uint32_t m_possibleCrtcs { 0 };
73 uint32_t m_fbId { 0 };
74 uint32_t m_crtcId { 0 };