23#include <xf86drmMode.h>
bool m_glInitiated
true, if OpenGL/ES context is initiated
uint32_t m_userReqDisplayRefreshRate
user requested display refresh rate
int SetConnectorHdrOutputMetadata(drmModeAtomicReqPtr, uint32_t)
int m_userReqDisplayHeight
user requested display height
drmModeModeInfo m_drmModeInfo
mode info
int ModeAtomicCommit(drmModeAtomicReqPtr req, uint32_t flags, void *user_data)
cDrmBuffer * GetBufFromBo(struct gbm_bo *)
Get a drm buffer from a gbm buffer object.
EGLDisplay EglDisplay(void)
int GetPropertyValue(uint32_t, uint32_t, const char *, uint64_t *)
Get a drm property value.
void ModeAtomicFree(drmModeAtomicReqPtr req)
int SetConnectorColorspace(drmModeAtomicReqPtr, uint32_t)
int InitEGL(void)
Init EGL context.
int CreateModeBlob(uint32_t *)
int CreatePropertyBlob(uint32_t *)
Wrapper to create a property blob.
uint32_t m_hdrMetadata
property id of HDR_OUTPUT_METADATA
drmModeAtomicReqPtr ModeAtomicAlloc(void)
int GetVideoPlaneColorRange(uint64_t *)
cDrmPlane m_videoPlane
the video drm plane
int DestroyHdrBlob(uint32_t)
struct gbm_surface * m_pGbmSurface
pointer to the gbm surface
uint32_t GetPropertyID(uint32_t, uint32_t, const char *)
Get a property ID.
int SetVideoPlaneColorEncoding(drmModeAtomicReqPtr, uint32_t)
EGLSurface EglSurface(void)
EGLContext m_eglContext
EGL context.
int SetPropertyRequest(drmModeAtomicReqPtr, uint32_t, uint32_t, const char *, uint64_t)
Add a drm property to an atomic modeset request.
int SetCrtcModeId(drmModeAtomicReqPtr, uint32_t)
uint64_t DisplayHeight(void)
int32_t FindCrtcForConnector(const drmModeRes *, const drmModeConnector *)
Find the CRTC_ID for the given connector.
EGLSurface m_eglSurface
EGL surface.
int HandleEvent(void)
Poll for a drm event.
int m_userReqDisplayWidth
user requested display width
int DestroyModeBlob(uint32_t)
cDrmPlane m_pipPlane
the pip drm plane
uint64_t DisplayWidth(void)
uint64_t ZposPrimary(void)
drmModeCrtc * m_drmModeCrtcSaved
saved CRTC infos
int CreateHdrBlob(struct hdr_output_metadata *, size_t, uint32_t *)
struct gbm_surface * GbmSurface(void)
int m_fdDrm
drm file descriptor
uint64_t ZposOverlay(void)
uint64_t m_zposPip
zpos of pip plane
int SetConnectorHdrBlobProperty(uint32_t)
cDrmPlane * PipPlane(void)
EGLDisplay m_eglDisplay
EGL display.
void SaveCrtc(void)
Save information of a CRTC.
uint32_t m_connectorId
connector id
void RestoreCrtc(void)
Restore information of a CRTC.
void Close(void)
Close the drm file handle.
cDrmPlane * OsdPlane(void)
uint32_t m_crtcId
current crtc ID
int SetConnectorCrtcId(drmModeAtomicReqPtr)
EGLContext EglContext(void)
cDrmPlane * VideoPlane(void)
int InitGbm(int, int, uint32_t, uint64_t)
Init gbm device and surface.
uint32_t ConnectorId(void)
uint32_t m_crtcIndex
current crtc index
int SetCrtcActive(drmModeAtomicReqPtr, uint32_t)
cVideoRender * m_pRender
pointer to cVideoRender object
int Init(void)
Initiate the drm device.
uint64_t m_zposPrimary
zpos of primary plane
drmEventContext m_drmEventCtx
drm event context
bool m_useZpos
is set, if drm hardware can use zpos
struct gbm_device * m_pGbmDevice
pointer to the gbm device
cDrmPlane m_osdPlane
the osd drm plane
int SetVideoPlaneColorRange(drmModeAtomicReqPtr, uint32_t)
void InitEvent(void)
Init the event context.
const char * m_userDrmDevice
user requested drm device
uint64_t m_zposOverlay
zpos of overlay plane
EGLConfig GetEGLConfig(void)
Get a suitable EGLConfig.