vdr-plugin-softhddevice-drm-gles 1.6.4-d0291bb
DRM Module

DRM Display Interface. More...

Classes

struct  format_plane_info
 
struct  format_info
 
class  cDrmBuffer
 DRM Buffer. More...
 
class  cDrmBufferPool
 DRM Buffer Pool. More...
 
class  cDrmDevice
 DRM Device. More...
 
struct  vector
 
struct  colorspace
 
class  cHdrMetadata
 HDR Metadata. More...
 
class  cDrmPlane
 DRM Plane. More...
 

Macros

#define ARRAY_LENGTH(a)   (sizeof(a) / sizeof(a)[0])
 

Enumerations

enum  hdrMetadataEotf { EOTF_TRADITIONAL_GAMMA_SDR , EOTF_TRADITIONAL_GAMMA_HDR , EOTF_ST2084 , EOTF_HLG }
 
enum  metadataId { METADATA_TYPE1 }
 

Functions

static int get_resources (int fd, drmModeRes **resources)
 
static int OpenDrmDevice (const char *device, drmModeRes **resources)
 Open the given device.
 
static int FindDrmDevice (drmModeRes **resources)
 Find and open a suitable device with the wanted capabilities.
 
static drmModeConnectorFindDrmConnector (int fd, drmModeRes *resources)
 Find a suitable connector, preferably a connected one.
 
static void drm_fb_destroy_callback (struct gbm_bo *bo, void *data)
 Callback function to destroy a drm buffer which stays in the gbm_bo's user data.
 
static int32_t FindCrtcForEncoder (const drmModeRes *resources, const drmModeEncoder *encoder)
 Find the CRTC_ID for the given encoder.
 
static uint16_t EncodeXYY (float xyy)
 
static struct colorspacecolorspace_lookup (const char *name)
 
EGLConfig cDrmDevice::GetEGLConfig (void)
 Get a suitable EGLConfig.
 

Variables

static const EGLint context_attribute_list []
 
static struct colorspace bt709
 BT709 Color Space.
 
static struct colorspace bt2020
 BT2020 Color Space.
 
static struct colorspace bt470bg
 BT470bg Color Space.
 
static struct colorspace *const colorspaces []
 

Detailed Description

DRM Display Interface.

Macro Definition Documentation

◆ ARRAY_LENGTH

#define ARRAY_LENGTH (   a)    (sizeof(a) / sizeof(a)[0])

Definition at line 85 of file drmhdr.h.

Enumeration Type Documentation

◆ hdrMetadataEotf

Enumerator
EOTF_TRADITIONAL_GAMMA_SDR 
EOTF_TRADITIONAL_GAMMA_HDR 
EOTF_ST2084 
EOTF_HLG 

Definition at line 28 of file drmhdr.cpp.

◆ metadataId

Enumerator
METADATA_TYPE1 

Definition at line 36 of file drmhdr.cpp.

Function Documentation

◆ colorspace_lookup()

static struct colorspace * colorspace_lookup ( const char name)
inlinestatic

Definition at line 86 of file drmhdr.h.

References ARRAY_LENGTH, colorspaces, and colorspace::name.

Referenced by cHdrMetadata::Build().

◆ drm_fb_destroy_callback()

static void drm_fb_destroy_callback ( struct gbm_bo bo,
void data 
)
static

Callback function to destroy a drm buffer which stays in the gbm_bo's user data.

Definition at line 777 of file drmdevice.cpp.

Referenced by cDrmDevice::GetBufFromBo().

◆ EncodeXYY()

static uint16_t EncodeXYY ( float  xyy)
inlinestatic

Definition at line 41 of file drmhdr.cpp.

Referenced by cHdrMetadata::Build().

◆ FindCrtcForEncoder()

static int32_t FindCrtcForEncoder ( const drmModeRes resources,
const drmModeEncoder encoder 
)
static

Find the CRTC_ID for the given encoder.

Parameters
resourcesdrm resources
encoderdrm encoder
Returns
CRTC_ID

Definition at line 903 of file drmdevice.cpp.

Referenced by cDrmDevice::FindCrtcForConnector().

◆ FindDrmConnector()

static drmModeConnector * FindDrmConnector ( int  fd,
drmModeRes resources 
)
static

Find a suitable connector, preferably a connected one.

Definition at line 182 of file drmdevice.cpp.

Referenced by cDrmDevice::Init().

◆ FindDrmDevice()

static int FindDrmDevice ( drmModeRes **  resources)
static

Find and open a suitable device with the wanted capabilities.

Returns
the file descriptor of the opened device

Definition at line 134 of file drmdevice.cpp.

References get_resources(), LOGERROR, and TestCaps().

Referenced by cDrmDevice::Init().

◆ get_resources()

static int get_resources ( int  fd,
drmModeRes **  resources 
)
static

Definition at line 61 of file drmdevice.cpp.

References LOGERROR.

Referenced by FindDrmDevice(), and OpenDrmDevice().

◆ GetEGLConfig()

EGLConfig cDrmDevice::GetEGLConfig ( void  )
private

Get a suitable EGLConfig.

Definition at line 664 of file drmdevice.cpp.

References EGL_CHECK, L_OPENGL, LOGDEBUG2, LOGFATAL, and cDrmDevice::m_eglDisplay.

Referenced by cDrmDevice::InitEGL().

◆ OpenDrmDevice()

static int OpenDrmDevice ( const char device,
drmModeRes **  resources 
)
static

Open the given device.

Parameters
deviceNamename of the device (e.g. "/dev/dri/card0")
Return values
filehandle on success
-1if open failed

Definition at line 112 of file drmdevice.cpp.

References get_resources(), and TestCaps().

Referenced by cDrmDevice::Init().

Variable Documentation

◆ bt2020

struct colorspace bt2020
static
Initial value:
= {
.r = {{ 0.708f, 0.292f, }},
.g = {{ 0.170f, 0.797f, }},
.b = {{ 0.131f, 0.046f, }},
.whitepoint = {{ 0.3127f, 0.3290f, }},
.name = "BT.2020",
.whitepoint_name = "D65",
}

BT2020 Color Space.

Definition at line 59 of file drmhdr.h.

◆ bt470bg

struct colorspace bt470bg
static
Initial value:
= {
.r = {{ 0.640f, 0.330f, }},
.g = {{ 0.290f, 0.600f, }},
.b = {{ 0.150f, 0.060f, }},
.whitepoint = {{ 0.3127f, 0.3290f, }},
.name = "BT.470 B/G",
.whitepoint_name = "D65",
}

BT470bg Color Space.

Definition at line 72 of file drmhdr.h.

◆ bt709

struct colorspace bt709
static
Initial value:
= {
.r = {{ 0.640f, 0.330f, }},
.g = {{ 0.300f, 0.600f, }},
.b = {{ 0.150f, 0.060f, }},
.whitepoint = {{ 0.3127f, 0.3290f, }},
.name = "BT.709",
.whitepoint_name = "D65",
}

BT709 Color Space.

Definition at line 47 of file drmhdr.h.

◆ colorspaces

struct colorspace* const colorspaces[]
static
Initial value:
= {
}
static struct colorspace bt470bg
BT470bg Color Space.
Definition drmhdr.h:72
static struct colorspace bt2020
BT2020 Color Space.
Definition drmhdr.h:59
static struct colorspace bt709
BT709 Color Space.
Definition drmhdr.h:47

Definition at line 81 of file drmhdr.h.

Referenced by colorspace_lookup().

◆ context_attribute_list

const EGLint context_attribute_list[]
static
Initial value:

Definition at line 653 of file drmdevice.cpp.

Referenced by cDrmDevice::InitEGL().