vdr-plugin-softhddevice-drm-gles 1.4.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cDrmDevice Class Reference

#include <drmdevice.h>

Collaboration diagram for cDrmDevice:
Collaboration graph
[legend]

Public Member Functions

 cDrmDevice (cVideoRender *, const char *)
 cDrmDevice constructor More...
 
virtual ~cDrmDevice (void)
 cDrmDevice destructor More...
 
int Init (void)
 Initiate the drm device. More...
 
int Fd (void)
 
void Close (void)
 Close drm file handle. More...
 
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)
 
int SetPropertyRequest (drmModeAtomicReqPtr, uint32_t, uint32_t, const char *, uint64_t)
 Add a property to a request. More...
 
void SaveCrtc (void)
 Saves information of a CRTC. More...
 
void RestoreCrtc (void)
 Restore information of a CRTC. More...
 
int HandleEvent (void)
 Polls for a drm event. More...
 
int CreatePropertyBlob (uint32_t *)
 Creates a property blob. More...
 
void InitEvent (void)
 Init the event context. More...
 

Private Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 75 of file drmdevice.h.

Constructor & Destructor Documentation

◆ cDrmDevice()

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

cDrmDevice constructor

Parameters
renderpointer to cVideoRender object

Definition at line 77 of file drmdevice.cpp.

References m_fdDrm, m_pRender, m_userReqDisplayHeight, m_userReqDisplayRefreshRate, m_userReqDisplayWidth, and m_useZpos.

◆ ~cDrmDevice()

cDrmDevice::~cDrmDevice ( void  )
virtual

cDrmDevice destructor

Definition at line 91 of file drmdevice.cpp.

References L_DRM, and LOGDEBUG2.

Member Function Documentation

◆ Close()

void cDrmDevice::Close ( void  )

Close drm file handle.

Definition at line 939 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 86 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 951 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 82 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 916 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 1013 of file drmdevice.cpp.

References m_drmEventCtx, and m_fdDrm.

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

◆ Init()

int cDrmDevice::Init ( void  )

◆ InitEvent()

void cDrmDevice::InitEvent ( void  )

Init the event context.

Definition at line 1021 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 98 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 1001 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 993 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 959 of file drmdevice.cpp.

References L_DRM, LOGDEBUG2, and m_fdDrm.

Referenced by cVideoRender::Init().

◆ UseZpos()

int cDrmDevice::UseZpos ( void  )
inline

Definition at line 92 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 93 of file drmdevice.h.

References m_zposOverlay.

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

◆ ZposPrimary()

uint64_t cDrmDevice::ZposPrimary ( void  )
inline

Definition at line 94 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 120 of file drmdevice.h.

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

◆ m_crtcId

uint32_t cDrmDevice::m_crtcId
private

current crtc ID

Definition at line 122 of file drmdevice.h.

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

◆ m_crtcIndex

uint32_t cDrmDevice::m_crtcIndex
private

current crtc index

Definition at line 123 of file drmdevice.h.

Referenced by Init().

◆ m_drmEventCtx

drmEventContext cDrmDevice::m_drmEventCtx
private

drm event context

Definition at line 125 of file drmdevice.h.

Referenced by HandleEvent(), and InitEvent().

◆ m_drmModeCrtcSaved

drmModeCrtc* cDrmDevice::m_drmModeCrtcSaved
private

saved CRTC infos

Definition at line 124 of file drmdevice.h.

Referenced by RestoreCrtc(), and SaveCrtc().

◆ m_drmModeInfo

drmModeModeInfo cDrmDevice::m_drmModeInfo
private

mode info

Definition at line 121 of file drmdevice.h.

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

◆ m_fdDrm

int cDrmDevice::m_fdDrm
private

◆ m_osdPlane

cDrmPlane cDrmDevice::m_osdPlane
private

the osd drm plane

Definition at line 135 of file drmdevice.h.

Referenced by Init(), and OsdPlane().

◆ m_pipPlane

cDrmPlane cDrmDevice::m_pipPlane
private

the pip drm plane

Definition at line 137 of file drmdevice.h.

Referenced by Init(), and PipPlane().

◆ m_pRender

cVideoRender* cDrmDevice::m_pRender
private

pointer to cVideoRender object

Definition at line 117 of file drmdevice.h.

Referenced by cDrmDevice(), and Init().

◆ m_userReqDisplayHeight

int cDrmDevice::m_userReqDisplayHeight
private

user requested display height

Definition at line 128 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 129 of file drmdevice.h.

Referenced by cDrmDevice(), and Init().

◆ m_userReqDisplayWidth

int cDrmDevice::m_userReqDisplayWidth
private

user requested display width

Definition at line 127 of file drmdevice.h.

Referenced by cDrmDevice(), and Init().

◆ m_useZpos

bool cDrmDevice::m_useZpos
private

is set, if drm hardware can use zpos

Definition at line 131 of file drmdevice.h.

Referenced by cDrmDevice(), Init(), and UseZpos().

◆ m_videoPlane

cDrmPlane cDrmDevice::m_videoPlane
private

the video drm plane

Definition at line 134 of file drmdevice.h.

Referenced by Init(), and VideoPlane().

◆ m_zposOverlay

uint64_t cDrmDevice::m_zposOverlay
private

zpos of overlay plane

Definition at line 132 of file drmdevice.h.

Referenced by Init(), and ZposOverlay().

◆ m_zposPip

uint64_t cDrmDevice::m_zposPip
private

zpos of pip plane

Definition at line 136 of file drmdevice.h.

Referenced by Init().

◆ m_zposPrimary

uint64_t cDrmDevice::m_zposPrimary
private

zpos of primary plane

Definition at line 133 of file drmdevice.h.

Referenced by Init(), and ZposPrimary().


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