vdr-plugin-softhddevice-drm-gles 1.5.9-20e15de
cDrmDevice Class Reference

#include <drmdevice.h>

Public Member Functions

 cDrmDevice (cVideoRender *, const char *)
 cDrmDevice constructor
 
 ~cDrmDevice (void)
 cDrmDevice destructor
 
int Init (void)
 Initiate the drm device.
 
int Fd (void)
 
void Close (void)
 Close drm file handle.
 
uint32_t ConnectorId (void)
 
uint64_t DisplayWidth (void)
 
uint64_t DisplayHeight (void)
 
uint32_t CrtcId (void)
 
int UseZpos (void)
 
uint64_t ZposOverlay (void)
 
uint64_t ZposPrimary (void)
 
cDrmPlaneOsdPlane (void)
 
cDrmPlaneVideoPlane (void)
 
cDrmPlanePipPlane (void)
 
bool HasPipPlane (void)
 
int SetPropertyRequest (drmModeAtomicReqPtr, uint32_t, uint32_t, const char *, uint64_t)
 Add a property to a request.
 
void SaveCrtc (void)
 Saves information of a CRTC.
 
void RestoreCrtc (void)
 Restore information of a CRTC.
 
int HandleEvent (void)
 Polls for a drm event.
 
int CreatePropertyBlob (uint32_t *)
 Creates a property blob.
 
void InitEvent (void)
 Init the event context.
 

Private Member Functions

int32_t FindCrtcForConnector (const drmModeRes *, const drmModeConnector *)
 Finds the CRTC_ID for the given connector.
 

Private Attributes

cVideoRenderm_pRender
 pointer to cVideoRender object
 
int m_fdDrm = -1
 drm file descriptor
 
uint32_t m_connectorId
 connector id
 
drmModeModeInfo m_drmModeInfo
 mode info
 
uint32_t m_crtcId
 current crtc ID
 
uint32_t m_crtcIndex
 current crtc index
 
drmModeCrtc * m_drmModeCrtcSaved
 saved CRTC infos
 
drmEventContext m_drmEventCtx
 drm event context
 
int m_userReqDisplayWidth = 0
 user requested display width
 
int m_userReqDisplayHeight
 user requested display height
 
uint32_t m_userReqDisplayRefreshRate
 user requested display refresh rate
 
bool m_useZpos = false
 is set, if drm hardware can use zpos
 
uint64_t m_zposOverlay = 0
 zpos of overlay plane
 
uint64_t m_zposPrimary = 0
 zpos of primary plane
 
cDrmPlane m_videoPlane
 the video drm plane
 
cDrmPlane m_osdPlane
 the osd drm plane
 
uint64_t m_zposPip = 0
 zpos of pip plane
 
cDrmPlane m_pipPlane
 the pip drm plane
 

Detailed Description

Definition at line 45 of file drmdevice.h.

Constructor & Destructor Documentation

◆ cDrmDevice()

cDrmDevice::cDrmDevice ( cVideoRender render,
const char *  resolution 
)

cDrmDevice constructor

Parameters
renderpointer to cVideoRender object
resolutiondisplay resolution string set by user

Definition at line 59 of file drmdevice.cpp.

References m_userReqDisplayHeight, m_userReqDisplayRefreshRate, and m_userReqDisplayWidth.

◆ ~cDrmDevice()

cDrmDevice::~cDrmDevice ( void  )

cDrmDevice destructor

Definition at line 69 of file drmdevice.cpp.

References L_DRM, and LOGDEBUG2.

Member Function Documentation

◆ Close()

void cDrmDevice::Close ( void  )

Close drm file handle.

Definition at line 933 of file drmdevice.cpp.

References L_DRM, LOGDEBUG2, and m_fdDrm.

Referenced by cVideoRender::Exit().

◆ ConnectorId()

uint32_t cDrmDevice::ConnectorId ( void  )
inline

Definition at line 56 of file drmdevice.h.

References m_connectorId.

Referenced by cVideoRender::Init().

◆ CreatePropertyBlob()

int cDrmDevice::CreatePropertyBlob ( uint32_t *  modeID)

Creates a property blob.

Definition at line 945 of file drmdevice.cpp.

References m_drmModeInfo, and m_fdDrm.

Referenced by cVideoRender::Init().

◆ CrtcId()

uint32_t cDrmDevice::CrtcId ( void  )
inline

◆ DisplayHeight()

uint64_t cDrmDevice::DisplayHeight ( void  )
inline

◆ DisplayWidth()

uint64_t cDrmDevice::DisplayWidth ( void  )
inline

◆ Fd()

int cDrmDevice::Fd ( void  )
inline

Definition at line 52 of file drmdevice.h.

References m_fdDrm.

Referenced by cVideoRender::CommitBuffer(), cVideoRender::Init(), and cVideoRender::PushFrame().

◆ FindCrtcForConnector()

int32_t cDrmDevice::FindCrtcForConnector ( const drmModeRes *  resources,
const drmModeConnector *  connector 
)
private

Finds the CRTC_ID for the given connector.

Definition at line 910 of file drmdevice.cpp.

References FindCrtcForEncoder(), and m_fdDrm.

Referenced by Init().

◆ HandleEvent()

int cDrmDevice::HandleEvent ( void  )

Polls for a drm event.

Definition at line 1007 of file drmdevice.cpp.

References m_drmEventCtx, and m_fdDrm.

Referenced by cVideoRender::DrmHandleEvent(), and cVideoRender::PageFlip().

◆ HasPipPlane()

bool cDrmDevice::HasPipPlane ( void  )
inline

Definition at line 69 of file drmdevice.h.

References cDrmPlane::GetId(), and m_pipPlane.

Referenced by cVideoRender::Init().

◆ Init()

◆ InitEvent()

void cDrmDevice::InitEvent ( void  )

Init the event context.

Definition at line 1015 of file drmdevice.cpp.

References m_drmEventCtx.

Referenced by cVideoRender::Init().

◆ OsdPlane()

cDrmPlane * cDrmDevice::OsdPlane ( void  )
inline

◆ PipPlane()

cDrmPlane * cDrmDevice::PipPlane ( void  )
inline

Definition at line 68 of file drmdevice.h.

References m_pipPlane.

Referenced by cVideoRender::CommitBuffer(), and cVideoRender::SetPipBuffer().

◆ RestoreCrtc()

void cDrmDevice::RestoreCrtc ( void  )

Restore information of a CRTC.

Definition at line 995 of file drmdevice.cpp.

References m_connectorId, m_drmModeCrtcSaved, and m_fdDrm.

Referenced by cVideoRender::Exit().

◆ SaveCrtc()

void cDrmDevice::SaveCrtc ( void  )

Saves information of a CRTC.

Definition at line 987 of file drmdevice.cpp.

References m_crtcId, m_drmModeCrtcSaved, and m_fdDrm.

Referenced by cVideoRender::Init().

◆ SetPropertyRequest()

int cDrmDevice::SetPropertyRequest ( drmModeAtomicReqPtr  ModeReq,
uint32_t  objectID,
uint32_t  objectType,
const char *  propName,
uint64_t  value 
)

Add a property to a request.

Definition at line 953 of file drmdevice.cpp.

References L_DRM, LOGDEBUG2, and m_fdDrm.

Referenced by cVideoRender::Init().

◆ UseZpos()

int cDrmDevice::UseZpos ( void  )
inline

Definition at line 62 of file drmdevice.h.

References m_useZpos.

Referenced by cVideoRender::Init(), and cVideoRender::SetOsdBuffer().

◆ VideoPlane()

cDrmPlane * cDrmDevice::VideoPlane ( void  )
inline

◆ ZposOverlay()

uint64_t cDrmDevice::ZposOverlay ( void  )
inline

Definition at line 63 of file drmdevice.h.

References m_zposOverlay.

Referenced by cVideoRender::Init(), and cVideoRender::SetOsdBuffer().

◆ ZposPrimary()

uint64_t cDrmDevice::ZposPrimary ( void  )
inline

Definition at line 64 of file drmdevice.h.

References m_zposPrimary.

Referenced by cVideoRender::Init(), and cVideoRender::SetOsdBuffer().

Member Data Documentation

◆ m_connectorId

uint32_t cDrmDevice::m_connectorId
private

connector id

Definition at line 91 of file drmdevice.h.

Referenced by ConnectorId(), Init(), and RestoreCrtc().

◆ m_crtcId

uint32_t cDrmDevice::m_crtcId
private

current crtc ID

Definition at line 93 of file drmdevice.h.

Referenced by CrtcId(), Init(), and SaveCrtc().

◆ m_crtcIndex

uint32_t cDrmDevice::m_crtcIndex
private

current crtc index

Definition at line 94 of file drmdevice.h.

Referenced by Init().

◆ m_drmEventCtx

drmEventContext cDrmDevice::m_drmEventCtx
private

drm event context

Definition at line 96 of file drmdevice.h.

Referenced by HandleEvent(), and InitEvent().

◆ m_drmModeCrtcSaved

drmModeCrtc* cDrmDevice::m_drmModeCrtcSaved
private

saved CRTC infos

Definition at line 95 of file drmdevice.h.

Referenced by RestoreCrtc(), and SaveCrtc().

◆ m_drmModeInfo

drmModeModeInfo cDrmDevice::m_drmModeInfo
private

mode info

Definition at line 92 of file drmdevice.h.

Referenced by CreatePropertyBlob(), DisplayHeight(), DisplayWidth(), and Init().

◆ m_fdDrm

int cDrmDevice::m_fdDrm = -1
private

drm file descriptor

Definition at line 90 of file drmdevice.h.

Referenced by Close(), CreatePropertyBlob(), Fd(), FindCrtcForConnector(), HandleEvent(), Init(), RestoreCrtc(), SaveCrtc(), and SetPropertyRequest().

◆ m_osdPlane

cDrmPlane cDrmDevice::m_osdPlane
private

the osd drm plane

Definition at line 106 of file drmdevice.h.

Referenced by Init(), and OsdPlane().

◆ m_pipPlane

cDrmPlane cDrmDevice::m_pipPlane
private

the pip drm plane

Definition at line 108 of file drmdevice.h.

Referenced by HasPipPlane(), Init(), and PipPlane().

◆ m_pRender

cVideoRender* cDrmDevice::m_pRender
private

pointer to cVideoRender object

Definition at line 88 of file drmdevice.h.

Referenced by Init().

◆ m_userReqDisplayHeight

int cDrmDevice::m_userReqDisplayHeight
private

user requested display height

Definition at line 99 of file drmdevice.h.

Referenced by cDrmDevice(), and Init().

◆ m_userReqDisplayRefreshRate

uint32_t cDrmDevice::m_userReqDisplayRefreshRate
private

user requested display refresh rate

Definition at line 100 of file drmdevice.h.

Referenced by cDrmDevice(), and Init().

◆ m_userReqDisplayWidth

int cDrmDevice::m_userReqDisplayWidth = 0
private

user requested display width

Definition at line 98 of file drmdevice.h.

Referenced by cDrmDevice(), and Init().

◆ m_useZpos

bool cDrmDevice::m_useZpos = false
private

is set, if drm hardware can use zpos

Definition at line 102 of file drmdevice.h.

Referenced by Init(), and UseZpos().

◆ m_videoPlane

cDrmPlane cDrmDevice::m_videoPlane
private

the video drm plane

Definition at line 105 of file drmdevice.h.

Referenced by Init(), and VideoPlane().

◆ m_zposOverlay

uint64_t cDrmDevice::m_zposOverlay = 0
private

zpos of overlay plane

Definition at line 103 of file drmdevice.h.

Referenced by Init(), and ZposOverlay().

◆ m_zposPip

uint64_t cDrmDevice::m_zposPip = 0
private

zpos of pip plane

Definition at line 107 of file drmdevice.h.

Referenced by Init().

◆ m_zposPrimary

uint64_t cDrmDevice::m_zposPrimary = 0
private

zpos of primary plane

Definition at line 104 of file drmdevice.h.

Referenced by Init(), and ZposPrimary().


The documentation for this class was generated from the following files: