Performs low-level graphics operations through the GPU.
Direct Rendering Manager (DRM) is a Linux-defined API that NVIDIA® implements.
Functions | |
int | drmOpen (const char *name, const char *busid) |
Opens a DRM device and creates a file descriptor handle. More... | |
int | drmClose (int fd) |
Closes a DRM device. More... | |
int | drmGetCap (int fd, uint64_t capability, uint64_t *value) |
Gets capabilities of the DRM driver. More... | |
int | drmSetClientCap (int fd, uint64_t capability, uint64_t value) |
Enables or disables DRM features (capabilities). More... | |
int | drmSetMaster (int fd) |
Requests master controls for a DRM device. More... | |
int | drmDropMaster (int fd) |
Releases master controls for a DRM device. More... | |
int | drmIsMaster (int fd) |
Check if DRM is a master. More... | |
int | drmGetMagic (int fd, drm_magic_t *magic) |
Retrieves a magic cookie. More... | |
int | drmAuthMagic (int fd, drm_magic_t magic) |
Authenticates a magic cookie. More... | |
drmVersionPtr | drmGetVersion (int fd) |
Retrieves version information for the DRM driver. More... | |
void | drmFreeVersion (drmVersionPtr version) |
Frees a version information structure. More... | |
int | drmHandleEvent (int fd, drmEventContextPtr evctx) |
Polls for an event, specifying a callback function. More... | |
int | drmIoctl (int fd, unsigned long request, void *arg) |
Issues a DRM input/output control (IOCTL). More... | |
int | drmWaitVBlank (int fd, drmVBlankPtr vbl) |
Waits for a vertical blanking interval (vblank). More... | |
int | drmModeAddFB (int fd, uint32_t width, uint32_t height, uint8_t depth, uint8_t bpp, uint32_t pitch, uint32_t bo_handle, uint32_t *buf_id) |
Creates a framebuffer. More... | |
int | drmModeAddFB2 (int fd, uint32_t width, uint32_t height, uint32_t pixel_format, const uint32_t bo_handles[4], const uint32_t pitches[4], const uint32_t offsets[4], uint32_t *buf_id, uint32_t flags) |
Creates a framebuffer, specifying format and planes. More... | |
int | drmModeAddFB2WithModifiers (int fd, uint32_t width, uint32_t height, uint32_t pixel_format, const uint32_t bo_handles[4], const uint32_t pitches[4], const uint32_t offsets[4], const uint64_t modifier[4], uint32_t *buf_id, uint32_t flags) |
Creates a framebuffer, specifying format and planes. More... | |
int | drmModeRmFB (int fd, uint32_t fb_id) |
Destroys a framebuffer. More... | |
drmModeConnectorPtr | drmModeGetConnector (int fd, uint32_t connector_id) |
Gets information for a connector. More... | |
void | drmModeFreeConnector (drmModeConnectorPtr ptr) |
Frees a connector. More... | |
int | drmModeConnectorSetProperty (int fd, uint32_t connector_id, uint32_t property_id, uint64_t value) |
Sets a connector property. More... | |
drmModeCrtcPtr | drmModeGetCrtc (int fd, uint32_t crtc_id) |
Gets information for a CRTC. More... | |
void | drmModeFreeCrtc (drmModeCrtcPtr ptr) |
Frees a CRTC. More... | |
int | drmModeSetCrtc (int fd, uint32_t crtc_id, uint32_t fb_id, uint32_t x, uint32_t y, uint32_t *connectors, int count, drmModeModeInfoPtr drm_mode) |
Sets a CRTC configuration. More... | |
int | drmModeCrtcSetGamma (int fd, uint32_t crtc_id, uint32_t size, uint16_t *red, uint16_t *green, uint16_t *blue) |
Sets the display gamma. More... | |
int | drmModeCrtcGetGamma (int fd, uint32_t crtc_id, uint32_t size, uint16_t *red, uint16_t *green, uint16_t *blue) |
Gets the current display gamma ramp. More... | |
int | drmModePageFlip (int fd, uint32_t crtc_id, uint32_t fb_id, uint32_t flags, void *user_data) |
Requests a page flip (framebuffer change) on the specified CRTC. More... | |
int | drmModeSetCursor (int fd, uint32_t crtc_id, uint32_t bo_handle, uint32_t width, uint32_t height) |
Sets a cursor image. More... | |
int | drmModeMoveCursor (int fd, uint32_t crtc_id, int x, int y) |
Moves a cursor. More... | |
drmModeEncoderPtr | drmModeGetEncoder (int fd, uint32_t encoder_id) |
Gets information for an encoder. More... | |
void | drmModeFreeEncoder (drmModeEncoderPtr ptr) |
Frees an encoder. More... | |
drmModePlanePtr | drmModeGetPlane (int fd, uint32_t plane_id) |
Gets information about a plane. More... | |
void | drmModeFreePlane (drmModePlanePtr ptr) |
Frees a plane. More... | |
int | drmModeSetPlane (int fd, uint32_t plane_id, uint32_t crtc_id, uint32_t fb_id, uint32_t flags, int32_t crtc_x, int32_t crtc_y, uint32_t crtc_w, uint32_t crtc_h, uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h) |
Changes a plane's framebuffer and position. More... | |
drmModeObjectPropertiesPtr | drmModeObjectGetProperties (int fd, uint32_t object_id, uint32_t object_type) |
Gets all properties of a DRM object. More... | |
void | drmModeFreeObjectProperties (drmModeObjectPropertiesPtr ptr) |
Frees an object properties structure. More... | |
drmModePropertyPtr | drmModeGetProperty (int fd, uint32_t propertyId) |
Gets a property structure that describes a property of a DRM object. More... | |
int | drmModeObjectSetProperty (int fd, uint32_t object_id, uint32_t object_type, uint32_t property_id, uint64_t value) |
Set the current value of an object's property. More... | |
void | drmModeFreeProperty (drmModePropertyPtr ptr) |
Frees a property structure. More... | |
drmModeResPtr | drmModeGetResources (int fd) |
Gets information about a DRM device's CRTCs, encoders, and connectors. More... | |
void | drmModeFreeResources (drmModeResPtr ptr) |
Frees a resource information structure. More... | |
drmModePlaneResPtr | drmModeGetPlaneResources (int fd) |
Gets information about planes. More... | |
void | drmModeFreePlaneResources (drmModePlaneResPtr ptr) |
Frees a plane resource information structure. More... | |
int | drmPrimeFDToHandle (int fd, int prime_fd, uint32_t *handle) |
Imports a dma-buf. More... | |
int | drmPrimeHandleToFD (int fd, uint32_t handle, uint32_t flags, int *prime_fd) drmModeAtomicReqPtr drmModeAtomicAlloc(void) |
Exports a dma-buf. More... | |
int | drmModeAtomicAddProperty (drmModeAtomicReqPtr req, uint32_t object_id, uint32_t property_id, uint64_t value) |
Adds a property to an atomic request. More... | |
int | drmModeAtomicCommit (int fd, drmModeAtomicReqPtr req, uint32_t flags, void *user_data) |
Commits an atomic property change request to hardware. More... | |
void | drmModeAtomicFree (drmModeAtomicReqPtr req) |
Frees an atomic request. More... | |
int | drmModeAtomicGetCursor (drmModeAtomicReqPtr req) |
Returns the cursor position of the given drmModeAtomicReq . More... | |
int | drmModeAtomicMerge (drmModeAtomicReqPtr base, drmModeAtomicReqPtr augment) |
Adds all properties in one drmModeAtomicReq to another. More... | |
void | drmModeAtomicSetCursor (drmModeAtomicReqPtr req, int cursor) |
Removes properties set since the given cursor index. More... | |
int | drmSetInterfaceVersion (int fd, drmSetVersion *version) |
Sets the interface version. More... | |
char * | drmGetBusid (int fd) |
Gets the bus ID of a device. More... | |
void | drmFreeBusid (const char *busid) |
Frees bus ID information. More... | |
int | drmModeCreatePropertyBlob (int fd, const void *data, size_t size, uint32_t *id) |
Creates a property blob. More... | |
int | drmModeDestroyPropertyBlob (int fd, uint32_t id) |
Destroys a property blob. More... | |
drmModePropertyBlobPtr | drmModeGetPropertyBlob (int fd, uint32_t blob_id) |
Allocates and retrieves a userspace property blob pointer. More... | |
void | drmModeFreePropertyBlob (drmModePropertyBlobPtr ptr) |
Frees a userspace property blob pointer. More... | |
char * | drmGetDeviceNameFromFd (int fd) |
Gets a DRM device's name string. More... | |
void | drmFree (void *p) |
Frees a block of memory. More... | |
int | drmCommandWriteRead (int fd, unsigned long drmCommandIndex, void *data, unsigned long size) |
Send a device-specific read-write command. More... | |
drmHashEntry * | drmGetEntry (int fd) |
Function stub. More... | |
int | drmRmMap (int fd, drm_handle_t handle) |
Function stub. More... | |
int | drmAvailable (void) |
Function stub. More... | |
int | drmDestroyDrawable (int fd, drm_drawable_t handle) |
Function stub. More... | |
int | drmDestroyContext (int fd, drm_context_t handle) |
Function stub. More... | |
int | drmSetContextFlags (int fd, drm_context_t context, drm_context_tFlags flags) |
Function stub. More... | |
int | drmMap (int fd, drm_handle_t handle, drmSize size, drmAddressPtr address) |
Function stub. More... | |
int | drmUnlock (int fd, drm_context_t context) |
Function stub. More... | |
void | drmFreeReservedContextList (drm_context_t *pt) |
Function stub. More... | |
void | drmSetServerInfo (drmServerInfoPtr info) |
Function stub. More... | |
int | drmAddContextTag (int fd, drm_context_t context, void *tag) |
Function stub. More... | |
int | drmAddMap (int fd, drm_handle_t offset, drmSize size, drmMapType type, drmMapFlags flags, drm_handle_t *handle) |
Function stub. More... | |
int | drmCreateContext (int fd, drm_context_t *handle) |
Function stub. More... | |
int | drmUpdateDrawableInfo (int fd, drm_drawable_t handle, drm_drawable_info_type_t type, unsigned int num, void *data) |
Function stub. More... | |
int | drmCreateDrawable (int fd, drm_drawable_t *handle) |
Function stub. More... | |
void * | drmGetHashTable (void) |
Function stub. More... | |
int | drmDelContextTag (int fd, drm_context_t context) |
Function stub. More... | |
int | drmUnmap (drmAddress address, drmSize size) |
Function stub. More... | |
int | drmSetBusid (int fd, const char *busid) |
Function stub. More... | |
int | drmGetLock (int fd, drm_context_t context, drmLockFlags flags) |
Function stub. More... | |
void * | drmGetContextTag (int fd, drm_context_t context) |
Function stub. More... | |
drm_context_t * | drmGetReservedContextList (int fd, int *count) |
Function stub. More... | |
int | drmHashNext (void *t, unsigned long *key, void **value) |
Function stub. More... | |
int | drmHashFirst (void *t, unsigned long *key, void **value) |
Function stub. More... | |
int | drmModeSetCursor2 (int fd, uint32_t crtcId, uint32_t bo_handle, uint32_t width, uint32_t height, int32_t hot_x, int32_t hot_y) |
Function stub. More... | |
int | drmOpenWithType (const char *name, const char *busid, int type) |
Function stub. More... | |
int | drmOpenControl (int minor) |
Function stub. More... | |
int | drmOpenRender (int minor) |
Function stub. More... | |
int | drmGetInterruptFromBusID (int fd, int busnum, int devnum, int funcnum) |
Function stub. More... | |
int | drmGetMap (int fd, int idx, drm_handle_t *offset, drmSize *size, drmMapType *type, drmMapFlags *flags, drm_handle_t *handle, int *mtrr) |
Function stub. More... | |
int | drmGetClient (int fd, int idx, int *auth, int *pid, int *uid, unsigned long *magic, unsigned long *iocs) |
Function stub. More... | |
int | drmGetStats (int fd, drmStatsT *stats) |
Function stub. More... | |
int | drmCommandNone (int fd, unsigned long drmCommandIndex) |
Function stub. More... | |
int | drmCommandRead (int fd, unsigned long drmCommandIndex, void *data, unsigned long size) |
Function stub. More... | |
int | drmCommandWrite (int fd, unsigned long drmCommandIndex, void *data, unsigned long size) |
Function stub. More... | |
int | drmAddContextPrivateMapping (int fd, drm_context_t ctx_id, drm_handle_t handle) |
Function stub. More... | |
int | drmAddBufs (int fd, int count, int size, drmBufDescFlags flags, int agp_offset) |
Function stub. More... | |
int | drmMarkBufs (int fd, double low, double high) |
Function stub. More... | |
int | drmGetContextFlags (int fd, drm_context_t context, drm_context_tFlagsPtr flags) |
Function stub. More... | |
int | drmSwitchToContext (int fd, drm_context_t context) |
Function stub. More... | |
int | drmCtlInstHandler (int fd, int irq) |
Function stub. More... | |
int | drmCtlUninstHandler (int fd) |
Function stub. More... | |
int | drmCrtcGetSequence (int fd, uint32_t crtcId, uint64_t *sequence, uint64_t *ns) |
Function stub. More... | |
int | drmCrtcQueueSequence (int fd, uint32_t crtcId, uint32_t flags, uint64_t sequence, uint64_t *sequence_queued, uint64_t user_data) |
Function stub. More... | |
int | drmUnmapBufs (drmBufMapPtr bufs) |
Function stub. More... | |
int | drmDMA (int fd, drmDMAReqPtr request) |
Function stub. More... | |
int | drmFreeBufs (int fd, int count, int *list) |
Function stub. More... | |
int | drmFinish (int fd, int context, drmLockFlags flags) |
Function stub. More... | |
int | drmGetContextPrivateMapping (int fd, drm_context_t ctx_id, drm_handle_t *handle) |
Function stub. More... | |
int | drmAgpAcquire (int fd) |
Function stub. More... | |
int | drmAgpRelease (int fd) |
Function stub. More... | |
int | drmAgpEnable (int fd, unsigned long mode) |
Function stub. More... | |
int | drmAgpAlloc (int fd, unsigned long size, unsigned long type, unsigned long *address, drm_handle_t *handle) |
Function stub. More... | |
int | drmAgpFree (int fd, drm_handle_t handle) |
Function stub. More... | |
int | drmAgpBind (int fd, drm_handle_t handle, unsigned long offset) |
Function stub. More... | |
int | drmAgpUnbind (int fd, drm_handle_t handle) |
Function stub. More... | |
int | drmAgpVersionMajor (int fd) |
Function stub. More... | |
int | drmAgpVersionMinor (int fd) |
Function stub. More... | |
int | drmScatterGatherAlloc (int fd, unsigned long size, drm_handle_t *handle) |
Function stub. More... | |
int | drmScatterGatherFree (int fd, drm_handle_t handle) |
Function stub. More... | |
int | drmError (int err, const char *label) |
Function stub. More... | |
int | drmHashDestroy (void *t) |
Function stub. More... | |
int | drmHashLookup (void *t, unsigned long key, void **value) |
Function stub. More... | |
int | drmHashInsert (void *t, unsigned long key, void *value) |
Function stub. More... | |
int | drmHashDelete (void *t, unsigned long key) |
Function stub. More... | |
int | drmRandomDestroy (void *state) |
Function stub. More... | |
int | drmSLDestroy (void *l) |
Function stub. More... | |
int | drmSLLookup (void *l, unsigned long key, void **value) |
Function stub. More... | |
int | drmSLInsert (void *l, unsigned long key, void *value) |
Function stub. More... | |
int | drmSLDelete (void *l, unsigned long key) |
Function stub. More... | |
int | drmSLNext (void *l, unsigned long *key, void **value) |
Function stub. More... | |
int | drmSLFirst (void *l, unsigned long *key, void **value) |
Function stub. More... | |
int | drmSLLookupNeighbors (void *l, unsigned long key, unsigned long *prev_key, void **prev_value, unsigned long *next_key, void **next_value) |
Function stub. More... | |
int | drmOpenOnce (void *unused, const char *BusID, int *newlyopened) |
Function stub. More... | |
int | drmOpenOnceWithType (const char *BusID, int *newlyopened, int type) |
Function stub. More... | |
int | drmGetNodeTypeFromFd (int fd) |
Function stub. More... | |
int | drmGetDevice (int fd, drmDevicePtr *device) |
Function stub. More... | |
int | drmGetDevices (drmDevicePtr devices[], int max_devices) |
Function stub. More... | |
int | drmGetDevice2 (int fd, uint32_t flags, drmDevicePtr *device) |
Function stub. More... | |
int | drmGetDevices2 (uint32_t flags, drmDevicePtr devices[], int max_devices) |
Function stub. More... | |
int | drmDevicesEqual (drmDevicePtr a, drmDevicePtr b) |
Function stub. More... | |
int | drmSyncobjCreate (int fd, uint32_t flags, uint32_t *handle) |
Function stub. More... | |
int | drmSyncobjDestroy (int fd, uint32_t handle) |
Function stub. More... | |
int | drmSyncobjHandleToFD (int fd, uint32_t handle, int *obj_fd) |
Function stub. More... | |
int | drmSyncobjFDToHandle (int fd, int obj_fd, uint32_t *handle) |
Function stub. More... | |
int | drmSyncobjImportSyncFile (int fd, uint32_t handle, int sync_file_fd) |
Function stub. More... | |
int | drmSyncobjExportSyncFile (int fd, uint32_t handle, int *sync_file_fd) |
Function stub. More... | |
int | drmSyncobjWait (int fd, uint32_t *handles, unsigned num_handles, int64_t timeout_nsec, unsigned flags, uint32_t *first_signaled) |
Function stub. More... | |
int | drmSyncobjTimelineWait (int fd, uint32_t *handles, uint64_t *points, unsigned num_handles, int64_t timeout_nsec, unsigned flags, uint32_t *first_signaled) |
Function stub. More... | |
int | drmSyncobjReset (int fd, const uint32_t *handles, uint32_t handle_count) |
Function stub. More... | |
int | drmSyncobjSignal (int fd, const uint32_t *handles, uint32_t handle_count) |
Function stub. More... | |
int | drmSyncobjTimelineSignal (int fd, const uint32_t *handles, uint64_t *points, uint32_t handle_count) |
Function stub. More... | |
int | drmSyncobjTransfer (int fd, uint32_t dst_handle, uint64_t dst_point, uint32_t src_handle, uint64_t src_point, uint32_t flags) |
Function stub. More... | |
int | drmSyncobjQuery (int fd, uint32_t *handles, uint64_t *points, uint32_t handle_count) |
Function stub. More... | |
int | drmSyncobjQuery2 (int fd, uint32_t *handles, uint64_t *points, uint32_t handle_count, uint32_t flags) |
Function stub. More... | |
unsigned long | drmRandom (void *state) |
Function stub. More... | |
double | drmRandomDouble (void *state) |
Function stub. More... | |
unsigned long | drmAgpGetMode (int fd) |
Function stub. More... | |
unsigned long | drmAgpBase (int fd) |
Function stub. More... | |
unsigned long | drmAgpSize (int fd) |
Function stub. More... | |
unsigned long | drmAgpMemoryUsed (int fd) |
Function stub. More... | |
unsigned long | drmAgpMemoryAvail (int fd) |
Function stub. More... | |
unsigned int | drmAgpVendorId (int fd) |
Function stub. More... | |
unsigned int | drmAgpDeviceId (int fd) |
Function stub. More... | |
void | drmSLDump (void *l) |
Function stub. More... | |
void | drmCloseOnce (int fd) |
Function stub. More... | |
void | drmFreeDevice (drmDevicePtr *device) |
Function stub. More... | |
void | drmFreeDevices (drmDevicePtr devices[], int count) |
Function stub. More... | |
char * | drmGetDeviceNameFromFd2 (int fd) |
Function stub. More... | |
char * | drmGetPrimaryDeviceNameFromFd (int fd) |
Function stub. More... | |
char * | drmGetRenderDeviceNameFromFd (int fd) |
Function stub. More... | |
drmVersionPtr | drmGetLibVersion (int fd) |
Function stub. More... | |
drmBufInfoPtr | drmGetBufInfo (int fd) |
Function stub. More... | |
drmBufMapPtr | drmMapBufs (int fd) |
Function stub. More... | |
void * | drmMalloc (int size) |
Function stub. More... | |
void * | drmRandomCreate (unsigned long seed) |
Function stub. More... | |
void * | drmHashCreate (void) |
Function stub. More... | |
void * | drmSLCreate (void) |
Function stub. More... | |
void | drmModeFreeModeInfo (drmModeModeInfoPtr ptr) |
Function stub. More... | |
void | drmModeFreeFB (drmModeFBPtr ptr) |
Function stub. More... | |
void | drmModeFreeFB2 (drmModeFB2Ptr ptr) |
Function stub. More... | |
drmModeFBPtr | drmModeGetFB (int fd, uint32_t bufferId) |
Function stub. More... | |
drmModeFB2Ptr | drmModeGetFB2 (int fd, uint32_t bufferId) |
Function stub. More... | |
drmModeConnectorPtr | drmModeGetConnectorCurrent (int fd, uint32_t connector_id) |
Function stub. More... | |
drmModeAtomicReqPtr | drmModeAtomicDuplicate (drmModeAtomicReqPtr req) |
Duplicates an atomic mode properties structure. More... | |
drmModeLesseeListPtr | drmModeListLessees (int fd) |
Function stub. More... | |
drmModeObjectListPtr | drmModeGetLease (int fd) |
Function stub. More... | |
int | drmModeDirtyFB (int fd, uint32_t bufferId, drmModeClipPtr clips, uint32_t num_clips) |
Function stub. More... | |
int | drmModeAttachMode (int fd, uint32_t connectorId, drmModeModeInfoPtr mode_info) |
Function stub. More... | |
int | drmModeDetachMode (int fd, uint32_t connectorId, drmModeModeInfoPtr mode_info) |
Function stub. More... | |
int | drmCheckModesettingSupported (const char *busid) |
Function stub. More... | |
int | drmModePageFlipTarget (int fd, uint32_t crtc_id, uint32_t fb_id, uint32_t flags, void *user_data, uint32_t target_vblank) |
Function stub. More... | |
int | drmModeRevokeLease (int fd, uint32_t lessee_id) |
Function stub. More... | |
int | drmModeCreateLease (int fd, const uint32_t *objects, int num_objects, int flags, uint32_t *lessee_id) |
Function stub. More... | |
int drmAddBufs | ( | int | fd, |
int | count, | ||
int | size, | ||
drmBufDescFlags | flags, | ||
int | agp_offset | ||
) |
Function stub.
int drmAddContextPrivateMapping | ( | int | fd, |
drm_context_t | ctx_id, | ||
drm_handle_t | handle | ||
) |
Function stub.
int drmAddContextTag | ( | int | fd, |
drm_context_t | context, | ||
void * | tag | ||
) |
Function stub.
int drmAddMap | ( | int | fd, |
drm_handle_t | offset, | ||
drmSize | size, | ||
drmMapType | type, | ||
drmMapFlags | flags, | ||
drm_handle_t * | handle | ||
) |
Function stub.
int drmAgpAcquire | ( | int | fd | ) |
Function stub.
int drmAgpAlloc | ( | int | fd, |
unsigned long | size, | ||
unsigned long | type, | ||
unsigned long * | address, | ||
drm_handle_t * | handle | ||
) |
Function stub.
unsigned long drmAgpBase | ( | int | fd | ) |
Function stub.
int drmAgpBind | ( | int | fd, |
drm_handle_t | handle, | ||
unsigned long | offset | ||
) |
Function stub.
unsigned int drmAgpDeviceId | ( | int | fd | ) |
Function stub.
int drmAgpEnable | ( | int | fd, |
unsigned long | mode | ||
) |
Function stub.
int drmAgpFree | ( | int | fd, |
drm_handle_t | handle | ||
) |
Function stub.
unsigned long drmAgpGetMode | ( | int | fd | ) |
Function stub.
unsigned long drmAgpMemoryAvail | ( | int | fd | ) |
Function stub.
unsigned long drmAgpMemoryUsed | ( | int | fd | ) |
Function stub.
int drmAgpRelease | ( | int | fd | ) |
Function stub.
unsigned long drmAgpSize | ( | int | fd | ) |
Function stub.
int drmAgpUnbind | ( | int | fd, |
drm_handle_t | handle | ||
) |
Function stub.
unsigned int drmAgpVendorId | ( | int | fd | ) |
Function stub.
int drmAgpVersionMajor | ( | int | fd | ) |
Function stub.
int drmAgpVersionMinor | ( | int | fd | ) |
Function stub.
int drmAuthMagic | ( | int | fd, |
drm_magic_t | magic | ||
) |
Authenticates a magic cookie.
fd | The file descriptor of an open DRM device. |
magic | The magic token retrieved from fd by drmGetMagic. |
int drmAvailable | ( | void | ) |
Function stub.
int drmCheckModesettingSupported | ( | const char * | busid | ) |
Function stub.
int drmClose | ( | int | fd | ) |
Closes a DRM device.
fd | The file descriptor of an open DRM device. |
void drmCloseOnce | ( | int | fd | ) |
Function stub.
int drmCommandNone | ( | int | fd, |
unsigned long | drmCommandIndex | ||
) |
Function stub.
int drmCommandRead | ( | int | fd, |
unsigned long | drmCommandIndex, | ||
void * | data, | ||
unsigned long | size | ||
) |
Function stub.
int drmCommandWrite | ( | int | fd, |
unsigned long | drmCommandIndex, | ||
void * | data, | ||
unsigned long | size | ||
) |
Function stub.
int drmCommandWriteRead | ( | int | fd, |
unsigned long | drmCommandIndex, | ||
void * | data, | ||
unsigned long | size | ||
) |
Send a device-specific read-write command.
DRM-NVDC supports these commands for application use:
DRM_TEGRA_GEM_SET_TILING
Sets tiling mode. Supported tiling modes are - DRM_TEGRA_GEM_TILING_MODE_BLOCK and DRM_TEGRA_GEM_TILING_MODE_PITCH.DRM_TEGRA_GEM_MMAP
Prepares buffer for CPU mapping with mmap.[in] | fd | The file descriptor of an open DRM device. |
[in] | drmCommandIndex | One of supported read-write command. |
[in,out] | data | A pointer to the data to be read and written. |
[in] | size | Size of the data to be read and written. |
int drmCreateContext | ( | int | fd, |
drm_context_t * | handle | ||
) |
Function stub.
int drmCreateDrawable | ( | int | fd, |
drm_drawable_t * | handle | ||
) |
Function stub.
int drmCrtcGetSequence | ( | int | fd, |
uint32_t | crtcId, | ||
uint64_t * | sequence, | ||
uint64_t * | ns | ||
) |
Function stub.
int drmCrtcQueueSequence | ( | int | fd, |
uint32_t | crtcId, | ||
uint32_t | flags, | ||
uint64_t | sequence, | ||
uint64_t * | sequence_queued, | ||
uint64_t | user_data | ||
) |
Function stub.
int drmCtlInstHandler | ( | int | fd, |
int | irq | ||
) |
Function stub.
int drmCtlUninstHandler | ( | int | fd | ) |
Function stub.
int drmDelContextTag | ( | int | fd, |
drm_context_t | context | ||
) |
Function stub.
int drmDestroyContext | ( | int | fd, |
drm_context_t | handle | ||
) |
Function stub.
int drmDestroyDrawable | ( | int | fd, |
drm_drawable_t | handle | ||
) |
Function stub.
int drmDevicesEqual | ( | drmDevicePtr | a, |
drmDevicePtr | b | ||
) |
Function stub.
int drmDMA | ( | int | fd, |
drmDMAReqPtr | request | ||
) |
Function stub.
int drmDropMaster | ( | int | fd | ) |
Releases master controls for a DRM device.
fd | The file descriptor of an open DRM device. |
int drmError | ( | int | err, |
const char * | label | ||
) |
Function stub.
int drmFinish | ( | int | fd, |
int | context, | ||
drmLockFlags | flags | ||
) |
Function stub.
void drmFree | ( | void * | p | ) |
Frees a block of memory.
This is a generic freeing routine; a wrapper for the free
function.
p | A pointer to a block of memory to be freed. |
int drmFreeBufs | ( | int | fd, |
int | count, | ||
int * | list | ||
) |
Function stub.
void drmFreeBusid | ( | const char * | busid | ) |
Frees bus ID information.
Frees a bus ID string allocated by a call to drmGetBusid.
busid | A pointer to the bus ID information string returned by drmGetBusid . |
void drmFreeDevice | ( | drmDevicePtr * | device | ) |
Function stub.
void drmFreeDevices | ( | drmDevicePtr | devices[], |
int | count | ||
) |
Function stub.
void drmFreeReservedContextList | ( | drm_context_t * | pt | ) |
Function stub.
void drmFreeVersion | ( | drmVersionPtr | version | ) |
Frees a version information structure.
Frees a drmVersionPtr
structure allocated by drmGetVersion.
version | A drmVersionPtr to be freed. |
drmBufInfoPtr drmGetBufInfo | ( | int | fd | ) |
Function stub.
char* drmGetBusid | ( | int | fd | ) |
Gets the bus ID of a device.
Gets the bus ID information string for a DRM device.
fd | The file descriptor of an open DRM device. |
int drmGetCap | ( | int | fd, |
uint64_t | capability, | ||
uint64_t * | value | ||
) |
Gets capabilities of the DRM driver.
[in] | fd | The file descriptor of an open DRM device. |
[in] | capability | The DRM capability to be obtained from the device. Supported capabilities are:
|
[out] | value | Returns a capability value as specified by capability. |
-EINVAL
otherwise. int drmGetClient | ( | int | fd, |
int | idx, | ||
int * | auth, | ||
int * | pid, | ||
int * | uid, | ||
unsigned long * | magic, | ||
unsigned long * | iocs | ||
) |
Function stub.
int drmGetContextFlags | ( | int | fd, |
drm_context_t | context, | ||
drm_context_tFlagsPtr | flags | ||
) |
Function stub.
int drmGetContextPrivateMapping | ( | int | fd, |
drm_context_t | ctx_id, | ||
drm_handle_t * | handle | ||
) |
Function stub.
void* drmGetContextTag | ( | int | fd, |
drm_context_t | context | ||
) |
Function stub.
int drmGetDevice | ( | int | fd, |
drmDevicePtr * | device | ||
) |
Function stub.
int drmGetDevice2 | ( | int | fd, |
uint32_t | flags, | ||
drmDevicePtr * | device | ||
) |
Function stub.
char* drmGetDeviceNameFromFd | ( | int | fd | ) |
Gets a DRM device's name string.
Returns the file path of a specified DRM device, e.g. "/dev/dri/card0"
.
"drm-nvdc"
as a placeholder.fd | The file descriptor of an open DRM device. |
char* drmGetDeviceNameFromFd2 | ( | int | fd | ) |
Function stub.
int drmGetDevices | ( | drmDevicePtr | devices[], |
int | max_devices | ||
) |
Function stub.
int drmGetDevices2 | ( | uint32_t | flags, |
drmDevicePtr | devices[], | ||
int | max_devices | ||
) |
Function stub.
drmHashEntry* drmGetEntry | ( | int | fd | ) |
Function stub.
void* drmGetHashTable | ( | void | ) |
Function stub.
int drmGetInterruptFromBusID | ( | int | fd, |
int | busnum, | ||
int | devnum, | ||
int | funcnum | ||
) |
Function stub.
drmVersionPtr drmGetLibVersion | ( | int | fd | ) |
Function stub.
int drmGetLock | ( | int | fd, |
drm_context_t | context, | ||
drmLockFlags | flags | ||
) |
Function stub.
int drmGetMagic | ( | int | fd, |
drm_magic_t * | magic | ||
) |
Retrieves a magic cookie.
[in] | fd | The file descriptor of an open DRM device. |
[out] | magic | An opaque 'magic' token. |
int drmGetMap | ( | int | fd, |
int | idx, | ||
drm_handle_t * | offset, | ||
drmSize * | size, | ||
drmMapType * | type, | ||
drmMapFlags * | flags, | ||
drm_handle_t * | handle, | ||
int * | mtrr | ||
) |
Function stub.
int drmGetNodeTypeFromFd | ( | int | fd | ) |
Function stub.
char* drmGetPrimaryDeviceNameFromFd | ( | int | fd | ) |
Function stub.
char* drmGetRenderDeviceNameFromFd | ( | int | fd | ) |
Function stub.
drm_context_t* drmGetReservedContextList | ( | int | fd, |
int * | count | ||
) |
Function stub.
int drmGetStats | ( | int | fd, |
drmStatsT * | stats | ||
) |
Function stub.
drmVersionPtr drmGetVersion | ( | int | fd | ) |
Retrieves version information for the DRM driver.
The function allocates and returns a drmVersionPtr
structure that contains the DRM driver's build version information and a driver description string.
The application can provide conditional support for DRM-NVDC by confirming that the drmVersionPtr
structure's name field contains the string "drm-nvdc"
. If name does not contain this value, the application can fall back to a kernel DRM implementation.
DRM-NVDC does not populate the drmVersionPtr
structure's date, major, minor, and patchlevel fields.
fd | The file descriptor of an open DRM device. |
drmVersionPtr
structure if successful, or NULL otherwise. int drmHandleEvent | ( | int | fd, |
drmEventContextPtr | evctx | ||
) |
Polls for an event, specifying a callback function.
Calls a callback function if an event of a specified type has occurred.
fd | The file descriptor of an open DRM device. |
evctx | An event context containing callback pointers. |
void* drmHashCreate | ( | void | ) |
Function stub.
int drmHashDelete | ( | void * | t, |
unsigned long | key | ||
) |
Function stub.
int drmHashDestroy | ( | void * | t | ) |
Function stub.
int drmHashFirst | ( | void * | t, |
unsigned long * | key, | ||
void ** | value | ||
) |
Function stub.
int drmHashInsert | ( | void * | t, |
unsigned long | key, | ||
void * | value | ||
) |
Function stub.
int drmHashLookup | ( | void * | t, |
unsigned long | key, | ||
void ** | value | ||
) |
Function stub.
int drmHashNext | ( | void * | t, |
unsigned long * | key, | ||
void ** | value | ||
) |
Function stub.
int drmIoctl | ( | int | fd, |
unsigned long | request, | ||
void * | arg | ||
) |
Issues a DRM input/output control (IOCTL).
This function is used primarily in cases where LIBDRM does not support a function that performs a desired operation. LIBDRM may lag behind kernel interfaces in features, and this function allows early access new interfaces.
DRM-NVDC supports these IOCTL operations for application use:
DRM_IOCTL_MODE_CREATE_DUMB:
Creates a dumb (CPU) buffer. Useful for debugging and for simple display tests. Accelerated rendering is not available.DRM_IOCTL_MODE_MAP_DUMB:
Maps a dumb buffer for CPU access. Unlike kernel DRM, DRM-NVDC maps the dumb buffer with the mmap
function and returns a valid memory pointer in the returned offset. The application must not call mmap
on the returned offset.DRM_IOCTL_MODE_DESTROY_DUMB:
Destroys a dumb buffer.DRM_IOCTL_TEGRA_GEM_CREATE:
Creates a HW buffer.DRM_IOCTL_GEM_CLOSE:
Unref and if reference is 0, free HW buffer.[in] | fd | The file descriptor of an open DRM device. |
[in] | request | One of supported DRM_IOCTL_ ... constants. |
[in,out] | arg | A pointer to the ioctl data structure:
|
int drmIsMaster | ( | int | fd | ) |
Check if DRM is a master.
fd | The file descriptor of an open DRM device. |
void* drmMalloc | ( | int | size | ) |
Function stub.
int drmMap | ( | int | fd, |
drm_handle_t | handle, | ||
drmSize | size, | ||
drmAddressPtr | address | ||
) |
Function stub.
drmBufMapPtr drmMapBufs | ( | int | fd | ) |
Function stub.
int drmMarkBufs | ( | int | fd, |
double | low, | ||
double | high | ||
) |
Function stub.
int drmModeAddFB | ( | int | fd, |
uint32_t | width, | ||
uint32_t | height, | ||
uint8_t | depth, | ||
uint8_t | bpp, | ||
uint32_t | pitch, | ||
uint32_t | bo_handle, | ||
uint32_t * | buf_id | ||
) |
Creates a framebuffer.
The function creates a framebuffer with a specified size and format, using the specified buffer object as the memory backing store. The buffer object can be a "dumb buffer" created by a call to drmIoctl with the request parameter set to DRM_IOCTL_MODE_CREATE_DUMB
, or it can be a dma-buf
imported by a call to the drmPrimeFDToHandle function.
[in] | fd | The file descriptor of an open DRM device. |
[in] | width | Framebuffer width in pixels. |
[in] | height | Framebuffer height in pixels. |
[in] | depth | Framebuffer depth in bits. |
[in] | bpp | Framebuffer bits per pixel. |
[in] | pitch | Framebuffer pitch in bytes. |
[in] | bo_handle | A handle for a buffer object to provide memory backing. |
[out] | buf_id | Receives the framebuffer ID of the created framebuffer if framebuffer creation is successful. |
int drmModeAddFB2 | ( | int | fd, |
uint32_t | width, | ||
uint32_t | height, | ||
uint32_t | pixel_format, | ||
const uint32_t | bo_handles[4], | ||
const uint32_t | pitches[4], | ||
const uint32_t | offsets[4], | ||
uint32_t * | buf_id, | ||
uint32_t | flags | ||
) |
Creates a framebuffer, specifying format and planes.
This function is similar to :drmModeAddFB, but offers more options. The buffer objects' pixel format is specified explicitly, instead of being depth+bpp as in drmModeAddFB. Also, multiplanar YUV formats are supported. As for drmModeAddFB
, the buffer object handle(s) can be a dumb buffers or imported dma-bufs.
[in] | fd | The file descriptor of an open DRM device. |
[in] | width | Framebuffer width in pixels. |
[in] | height | Framebuffer height in pixels. |
[in] | pixel_format | Pixel format of the bo_handle(s). |
[in] | bo_handles | An array of four handles for buffer objects to provide memory backing. Unused array elements must be NULL. |
[in] | pitches | An array containing the pitches of the buffer objects in bytes. |
[in] | offsets | An array containing the offsets of the buffer objects in bytes. |
[out] | buf_id | Receives the framebuffer ID of the created framebuffer if framebuffer creation is successful. |
[in] | flags | Creation flags. |
int drmModeAddFB2WithModifiers | ( | int | fd, |
uint32_t | width, | ||
uint32_t | height, | ||
uint32_t | pixel_format, | ||
const uint32_t | bo_handles[4], | ||
const uint32_t | pitches[4], | ||
const uint32_t | offsets[4], | ||
const uint64_t | modifier[4], | ||
uint32_t * | buf_id, | ||
uint32_t | flags | ||
) |
Creates a framebuffer, specifying format and planes.
This function is similar to :drmModeAddFB2, but accepts modifiers.
[in] | fd | The file descriptor of an open DRM device. |
[in] | width | Framebuffer width in pixels. |
[in] | height | Framebuffer height in pixels. |
[in] | pixel_format | Pixel format of the bo_handle(s). |
[in] | bo_handles | An array of four handles for buffer objects to provide memory backing. Unused array elements must be NULL. |
[in] | pitches | An array containing the pitches of the buffer objects in bytes. |
[in] | offsets | An array containing the offsets of the buffer objects in bytes. |
[in] | modifier | An array containing the format modifiers. For multi-planar formats, each plane should have same modifier value. Supported modifiers can be obtained using IN_FORMATS plane property. |
[out] | buf_id | Receives the framebuffer ID of the created framebuffer if framebuffer creation is successful. |
[in] | flags | flags should be DRM_MODE_FB_MODIFIERS when modifiers are specified, otherwise 0. |
int drmModeAtomicAddProperty | ( | drmModeAtomicReqPtr | req, |
uint32_t | object_id, | ||
uint32_t | property_id, | ||
uint64_t | value | ||
) |
Adds a property to an atomic request.
Adds a property and value to an atomic request.
req | An atomic request. |
object_id | Object ID of a CRTC, plane, or connector to be modified. |
property_id | Property ID of the property to be modified. |
value | The new value for the property. |
-1 | if req is NULL or the API is out of memory, otherwise it returns the number of properties in the atomic request |
-EINVAL | if DRM_CLIENT_CAP_ATOMIC is not enabled. |
int drmModeAtomicCommit | ( | int | fd, |
drmModeAtomicReqPtr | req, | ||
uint32_t | flags, | ||
void * | user_data | ||
) |
Commits an atomic property change request to hardware.
Sends all of the property changes in a drmModeAtomicReqPtr
structure to hardware.
fd | The file descriptor of an open DRM device. |
req | The request object describing properties to commit. |
flags | Flags which influence the operation. The supported flags are:
|
user_data | Unused. |
0 | if successful. |
-1 | if req is NULL. |
-EINVAL | if DRM_CLIENT_CAP_ATOMIC is not enabled, the value of flags is illegal, or atomic property IDs in the request are not recognized. |
drmModeAtomicReqPtr drmModeAtomicDuplicate | ( | drmModeAtomicReqPtr | req | ) |
Duplicates an atomic mode properties structure.
Creates a copy of the drmModeAtomicReq
structure containing all properties previously added to req
.
drmModeAtomicReq
copy of req
. void drmModeAtomicFree | ( | drmModeAtomicReqPtr | req | ) |
Frees an atomic request.
Frees a drmModeAtomicReqPtr object allocated by drmModeAtomicAlloc, and all of the associated drmModeAtomicReqItemPtr objects.
req | The atomic request object to be freed. |
int drmModeAtomicGetCursor | ( | drmModeAtomicReqPtr | req | ) |
Returns the cursor position of the given drmModeAtomicReq
.
This can be seen as the number of properties added to req
and used to remove previously added properties with drmModeAtomicSetCursor.
req
. int drmModeAtomicMerge | ( | drmModeAtomicReqPtr | base, |
drmModeAtomicReqPtr | augment | ||
) |
Adds all properties in one drmModeAtomicReq
to another.
Adds all properties set in augment
to the base
structure.
base
. void drmModeAtomicSetCursor | ( | drmModeAtomicReqPtr | req, |
int | cursor | ||
) |
Removes properties set since the given cursor index.
Function stub.
Sets the cursor position of req
to cursor
, if it is less than the current cursor position. Properties set since the cursor was that value are effectively removed. For example, if cursor
is zero, req
will be cleared of all properties.
int drmModeAttachMode | ( | int | fd, |
uint32_t | connectorId, | ||
drmModeModeInfoPtr | mode_info | ||
) |
Function stub.
int drmModeConnectorSetProperty | ( | int | fd, |
uint32_t | connector_id, | ||
uint32_t | property_id, | ||
uint64_t | value | ||
) |
Sets a connector property.
fd | The file descriptor of an open DRM device. |
connector_id | The ID of a connector whose property is to be set. |
property_id | The ID of the property to be set. |
value | A new value for the property. |
int drmModeCreateLease | ( | int | fd, |
const uint32_t * | objects, | ||
int | num_objects, | ||
int | flags, | ||
uint32_t * | lessee_id | ||
) |
Function stub.
int drmModeCreatePropertyBlob | ( | int | fd, |
const void * | data, | ||
size_t | size, | ||
uint32_t * | id | ||
) |
Creates a property blob.
Stores an opaque blob of memory and returns an ID for it. The ID can then be used for atomic mode setting.
drmModeModeInfoPtr
. When a property blob is created from a drmModeModeInfoPtr
, the returned ID becomes a valid value to set on CRTC properties matching the name MODE_ID
. Atomically committing a MODE_ID
property to the ID of the created blob causes a mode set on that CRTC. The new CRTC mode will be that of the drmModeModeInfoPtr
used as input to drmModeCreatePropertyBlob
.[in] | fd | The file descriptor of an open DRM device. |
[in] | data | Content of the property blob. What data is acceptable depends on the implementation. In DRM-NVDC, data must be a drmModeModeInfoPtr structure. |
[in] | size | Size of data. |
[out] | id | Returns a property ID for the blob. |
0 | if operation is successful. |
-1 | if data is not a valid pointer, or if size or id is invalid. |
-ENOMEM | if blob memory could not be allocated. |
int drmModeCrtcGetGamma | ( | int | fd, |
uint32_t | crtc_id, | ||
uint32_t | size, | ||
uint16_t * | red, | ||
uint16_t * | green, | ||
uint16_t * | blue | ||
) |
Gets the current display gamma ramp.
[in] | fd | The file descriptor of an open DRM device. |
[in] | crtc_id | CRTC ID of the CRTC to be queried. |
[in] | size | Number of elements in each of the red, green, and blue LUTs. |
[out] | red | A pointer to an array in which the red LUT will be stored. |
[out] | green | A pointer to an array in which the green LUT will be stored. |
[out] | blue | A pointer to an array in which the blue LUT will be stored. |
int drmModeCrtcSetGamma | ( | int | fd, |
uint32_t | crtc_id, | ||
uint32_t | size, | ||
uint16_t * | red, | ||
uint16_t * | green, | ||
uint16_t * | blue | ||
) |
Sets the display gamma.
Sets custom display LUT (look up table) for each primary color. Each table is indexed by a value that represents input intensity, and yields a value that represents output intensity. Custom LUTs are most often used to adjust the display gamma ramp. size should be less than or equal to the gamma_size reported by drmModeGetCrtc.
fd | The file descriptor of an open DRM device. |
crtc_id | CRTC ID of the CRTC to be adjusted. |
size | Number of elements in each of the red, green, and blue LUTs. |
red | LUT for red intensity. |
green | LUT for green intensity. |
blue | LUT for blue intensity. |
int drmModeDestroyPropertyBlob | ( | int | fd, |
uint32_t | id | ||
) |
Destroys a property blob.
Destroys a property blob created by a call to drmModeCreatePropertyBlob.
fd | The file descriptor of an open DRM device. |
id | The ID of the property blob to be destroyed. |
-EINVAL
if no property blob with specified ID is found. int drmModeDetachMode | ( | int | fd, |
uint32_t | connectorId, | ||
drmModeModeInfoPtr | mode_info | ||
) |
Function stub.
int drmModeDirtyFB | ( | int | fd, |
uint32_t | bufferId, | ||
drmModeClipPtr | clips, | ||
uint32_t | num_clips | ||
) |
Function stub.
void drmModeFreeConnector | ( | drmModeConnectorPtr | ptr | ) |
Frees a connector.
Frees a drmModeConnectorPtr
structure allocated by drmModeGetConnector.
ptr | A pointer to the connector to be freed. |
void drmModeFreeCrtc | ( | drmModeCrtcPtr | ptr | ) |
Frees a CRTC.
Frees a drmModeCrtcPtr
structure allocated by drmModeGetCrtc.
ptr | A pointer to the CRTC to be freed. |
void drmModeFreeEncoder | ( | drmModeEncoderPtr | ptr | ) |
Frees an encoder.
Frees a drmModeEncoderPtr
structure allocated by drmModeGetEncoder.
ptr | A pointer to encoder to be freed. |
void drmModeFreeFB | ( | drmModeFBPtr | ptr | ) |
Function stub.
void drmModeFreeFB2 | ( | drmModeFB2Ptr | ptr | ) |
Function stub.
void drmModeFreeModeInfo | ( | drmModeModeInfoPtr | ptr | ) |
Function stub.
void drmModeFreeObjectProperties | ( | drmModeObjectPropertiesPtr | ptr | ) |
Frees an object properties structure.
Frees a drmModeObjectPropertiesPtr
structure allocated by drmModeObjectGetProperties.
ptr | A pointer to the object properties structure to be freed. |
void drmModeFreePlane | ( | drmModePlanePtr | ptr | ) |
Frees a plane.
Frees a drmModePlanePtr
structure allocated by drmModeGetPlane.
ptr | A pointer to the plane to be freed. |
void drmModeFreePlaneResources | ( | drmModePlaneResPtr | ptr | ) |
Frees a plane resource information structure.
Frees a drmModePlaneResPtr
structure allocated by drmModeGetPlaneResources.
ptr | A pointer to the plane resource structure to free. |
void drmModeFreeProperty | ( | drmModePropertyPtr | ptr | ) |
Frees a property structure.
Frees a drmModePropertyPtr
structure allocated by drmModeGetProperty.
ptr | A pointer to a property structure returned by drmModeGetProperty . |
void drmModeFreePropertyBlob | ( | drmModePropertyBlobPtr | ptr | ) |
Frees a userspace property blob pointer.
ptr | The pointer to the property blob returned by drmModeGetPropertyBlob |
void drmModeFreeResources | ( | drmModeResPtr | ptr | ) |
Frees a resource information structure.
Frees a drmModeResPtr
structure allocated by drmModeGetResources.
ptr | A pointer to the resource to be freed. |
drmModeConnectorPtr drmModeGetConnector | ( | int | fd, |
uint32_t | connector_id | ||
) |
Gets information for a connector.
If connector_id is valid, fetches a drmModeConnectorPtr
structure which contains information about a connector, such as available modes, connection status, connector type, and which encoder (if any) is attached.
connector->mmWidth
and connector->mmHeight
are currently set to placeholder values.fd | The file descriptor of an open DRM device. |
connector_id | The connector ID of the connector to be retrieved. |
drmModeConnectorPtr
structure if successful, or NULL if the connector is not found or the API is out of memory. drmModeConnectorPtr drmModeGetConnectorCurrent | ( | int | fd, |
uint32_t | connector_id | ||
) |
Function stub.
drmModeCrtcPtr drmModeGetCrtc | ( | int | fd, |
uint32_t | crtc_id | ||
) |
Gets information for a CRTC.
If the specified CRTC ID is valid, fetches a drmModeCrtcPtr
structure which contains information about the CRTC, such as the current framebuffer, mode, position, size, and number of gamma LUT elements.
fd | The file descriptor of an open DRM device. |
crtc_id | The CRTC ID of the CRTC to retrieved. |
drmModeCrtcPtr
structure if successful, or NULL if the CRTC is not found or the API is out of memory. drmModeEncoderPtr drmModeGetEncoder | ( | int | fd, |
uint32_t | encoder_id | ||
) |
Gets information for an encoder.
Fetches a drmModeEncoderPtr
structure which contains information about a specified encoder, such as the current CRTC and compatible CRTCs.
possible_crtcs
, and none in possible_clones
(i.e. the value of possible_clones
is 0).fd | The file descriptor of an open DRM device. |
encoder_id | Encoder ID of the encoder to be retrieved. |
drmModeEncoderPtr
structure if successful, or NULL if the encoder is not found or the API is out of memory. drmModeFBPtr drmModeGetFB | ( | int | fd, |
uint32_t | bufferId | ||
) |
Function stub.
drmModeFB2Ptr drmModeGetFB2 | ( | int | fd, |
uint32_t | bufferId | ||
) |
Function stub.
drmModeObjectListPtr drmModeGetLease | ( | int | fd | ) |
Function stub.
drmModePlanePtr drmModeGetPlane | ( | int | fd, |
uint32_t | plane_id | ||
) |
Gets information about a plane.
If plane_id is valid, fetches a drmModePlanePtr
structure which contains information about the specified plane, such as its current CRTC and compatible CRTCs, the currently bound framebuffer, the number of gamma steps, and the position of the plane.
drmModePlanePtr
structure's possible_crtc
member always has exactly one bit set.fd | The file descriptor of an open DRM device. |
plane_id | Plane ID of the plane to be retrieved. |
drmModePlanePtr
structure if successful, or NULL if the plane is not found or the API out of memory. drmModePlaneResPtr drmModeGetPlaneResources | ( | int | fd | ) |
Gets information about planes.
Gets a list of plane resources for a DRM device. A DRM application typically calls this function early to identify the available display layers.
By default, the information returned includes only "Overlay" type (regular) planes – not "Primary" and "Cursor" planes. If DRM_CLIENT_CAP_UNIVERSAL_PLANES
has been enabled with drmSetClientCap, the information returned includes "Primary" planes representing CTRCs, and "Cursor" planes representing Cursors. This allows CRTCs and Cursors to be manipulated with plane functions such as drmModeSetPlane.
fd | The file descriptor of an open DRM device. |
drmModeResPtr
structure if successful, or NULL otherwise. drmModePropertyPtr drmModeGetProperty | ( | int | fd, |
uint32_t | propertyId | ||
) |
Gets a property structure that describes a property of a DRM object.
The DRM object can be a plane, a CRTC, or a connector.
This function operates on a drmModeObjectPropertiesPtr
structure returned by drmModeObjectGetProperties().
The modifiable properties depend on the DRM object type:
DRM_MODE_OBJECT_PLANE
): "SRC_X", "SRC_Y", "SRC_W", "SRC_H", "zpos", "alpha" "CRTC_X", "CRTC_Y", "CRTC_W", "CRTC_H", "CRTC_ID", "FB_ID"
"MODE_ID", "ACTIVE", "HDR_SUPPORTED", "HDR_METADATA_SMPTE_2086_ID"
"CRTC_ID"
For DRM planes, the enums field holds a list of key-word pairs (name : value) that defines the properties.
To identify the plane type, iterate through the following list to locate the enum whose value field matches the one you seek. Then, get the value from corresponding name field.
For example:
fd | The file descriptor of an open DRM device. |
propertyId | Property ID of the property object to be fetched. |
drmModePropertyPtr
if successful, or NULL otherwise. drmModePropertyBlobPtr drmModeGetPropertyBlob | ( | int | fd, |
uint32_t | blob_id | ||
) |
Allocates and retrieves a userspace property blob pointer.
fd | The file descriptor of an open DRM device. |
blob_id | ID of the property blob to be retrived. |
drmModeResPtr drmModeGetResources | ( | int | fd | ) |
Gets information about a DRM device's CRTCs, encoders, and connectors.
Gets a list of a DRM device's major resources. A DRM application typically calls this function early to identify available displays and other resources. The function does not report plane resources, though. These can be queried with drmModeGetPlaneResources.
drmModeResPtr
structure's min_width, min_height, max_width, and max_height members are set to placeholder values.fd | The file descriptor of an open DRM device. |
drmModeResPtr
structure if successful, or NULL otherwise. drmModeLesseeListPtr drmModeListLessees | ( | int | fd | ) |
Function stub.
int drmModeMoveCursor | ( | int | fd, |
uint32_t | crtc_id, | ||
int | x, | ||
int | y | ||
) |
Moves a cursor.
fd | The file descriptor of an open DRM device. |
crtc_id | CRTC ID of the CRTC whose cursor is to be moved. |
x | Position of the cursor from left. |
y | Position of the cursor from top. |
drmModeObjectPropertiesPtr drmModeObjectGetProperties | ( | int | fd, |
uint32_t | object_id, | ||
uint32_t | object_type | ||
) |
Gets all properties of a DRM object.
Gets an object properties structure that describes all of the atomically modifiable properties of a specified DRM object, as well as read-only properties not included in the corresponding drmModeCrtcPtr
, drmModeConnectorPtr
, and drmModePlanePtr
structures. You can then retrieve individual properties with drmModeGetProperty and change their values with drmModeAtomicAddProperty.
The drmModeObjectPropertiesPtr
structure contains an array of property IDs (props
), an array of corresponding property values (prop_values
), and the number of elements in each array (count_props
). You can get the name of a property by calling drmModeGetProperty on the property ID and looking at the returned drmModePropertyPtr
structure's name
field.
To modify a property atomically, create a drmModeAtomicReqPtr request object by calling drmModeAtomicAlloc, then call drmModeAtomicAddProperty, specifying the drmModeAtomicReqPtr object, the object ID of the object to modify, the property ID of the property to modify, and the property's new value. Then commit the request with drmModeAtomicCommit. You can set several properties in an atomic request and commit them in a single operation.
drmModeObjectPropertiesPtr
structure by calling drmModeFreeObjectProperties.fd | The file descriptor of an open DRM device. |
object_id | The object ID of the DRM object whose properties are to be retrieved. |
object_type | A symbol representing an object type. The following object types are supported:
|
drmModeObjectPropertiesPtr
object if successful, or NULL otherwise. int drmModeObjectSetProperty | ( | int | fd, |
uint32_t | object_id, | ||
uint32_t | object_type, | ||
uint32_t | property_id, | ||
uint64_t | value | ||
) |
Set the current value of an object's property.
[in] | fd | The file descriptor of an open DRM device. |
object_id | The object ID of the DRM object whose properties are to be set. | |
object_type | A symbol representing an object type. The following object types are supported:
| |
property_id | The ID of the property to be set. | |
value | A new value for the property. |
int drmModePageFlip | ( | int | fd, |
uint32_t | crtc_id, | ||
uint32_t | fb_id, | ||
uint32_t | flags, | ||
void * | user_data | ||
) |
Requests a page flip (framebuffer change) on the specified CRTC.
Schedules a page flip on the specified CRTC. By default, the CRTC will be reprogrammed to display the specified framebuffer after the next vertical refresh.
fd | The file descriptor of an open DRM device. |
crtc_id | CRTC ID of the CRTC whose framebuffer is to be changed. |
fb_id | Framebuffer ID of the framebuffer to be displayed. |
flags | Flags affecting the operation. Supported values are:
|
user_data | Data used by the page flip handler if vblank event was requested. |
0 | if successful. |
-EINVAL | if crtc_id or fb_id is invalid. |
-errno | otherwise. |
int drmModePageFlipTarget | ( | int | fd, |
uint32_t | crtc_id, | ||
uint32_t | fb_id, | ||
uint32_t | flags, | ||
void * | user_data, | ||
uint32_t | target_vblank | ||
) |
Function stub.
int drmModeRevokeLease | ( | int | fd, |
uint32_t | lessee_id | ||
) |
Function stub.
int drmModeRmFB | ( | int | fd, |
uint32_t | fb_id | ||
) |
Destroys a framebuffer.
Destroys (frees) a framebuffer allocated by drmModeAddFB or drmModeAddFB2.
fd | The file descriptor of an open DRM device. |
fb_id | The ID of the framebuffer to destroy. |
-ENOENT
if the framebuffer is not found. int drmModeSetCrtc | ( | int | fd, |
uint32_t | crtc_id, | ||
uint32_t | fb_id, | ||
uint32_t | x, | ||
uint32_t | y, | ||
uint32_t * | connectors, | ||
int | count, | ||
drmModeModeInfoPtr | drm_mode | ||
) |
Sets a CRTC configuration.
If the DRM mode is specified (if drm_mode is not NULL), sets the display mode on the CRTC and specified connector(s). New fb_id, x, and y properties will set at vblank.
-ERANGE
if given -1 for x or y.)fd | The file descriptor of an open DRM device. |
crtc_id | The ID of the CRTC to be set. |
fb_id | ID of the framebuffer to display with this CRTC, or -1 to use the same CRTC as the previous operation. |
x | Offset from left of active display region to place the framebuffer. If x is -1, the X offset is not changed. |
y | Offset from top of active display region to place the framebuffer. If y is -1, the Y offset is not changed. |
connectors | A pointer to a list of connectors to bind to the CRTC. |
count | Number of connectors in the connectors list. |
drm_mode | Mode to set, or NULL to use the same mode as the previous operation. |
0 | if successful. |
-EINVAL | if crtc_id is invalid. |
-1 | if count is invalid, or the list specified by connectors is incompatible with the CRTC. |
-errno | otherwise. |
int drmModeSetCursor | ( | int | fd, |
uint32_t | crtc_id, | ||
uint32_t | bo_handle, | ||
uint32_t | width, | ||
uint32_t | height | ||
) |
Sets a cursor image.
fd | The file descriptor of an open DRM device. |
crtc_id | CRTC ID of the CRTC whose cursor is to be changed. |
bo_handle | Handle of a buffer object to use as cursor image. |
width | Width of the cursor image. |
height | Height of the cursor image. |
int drmModeSetCursor2 | ( | int | fd, |
uint32_t | crtcId, | ||
uint32_t | bo_handle, | ||
uint32_t | width, | ||
uint32_t | height, | ||
int32_t | hot_x, | ||
int32_t | hot_y | ||
) |
Function stub.
int drmModeSetPlane | ( | int | fd, |
uint32_t | plane_id, | ||
uint32_t | crtc_id, | ||
uint32_t | fb_id, | ||
uint32_t | flags, | ||
int32_t | crtc_x, | ||
int32_t | crtc_y, | ||
uint32_t | crtc_w, | ||
uint32_t | crtc_h, | ||
uint32_t | src_x, | ||
uint32_t | src_y, | ||
uint32_t | src_w, | ||
uint32_t | src_h | ||
) |
Changes a plane's framebuffer and position.
-ERANGE
when given this value.)drmModeSetPlane
operations are synced to vblank and are blocking.fd | The file descriptor of an open DRM device. |
plane_id | Plane ID of the plane to be changed. |
crtc_id | CRTC ID of the CRTC that the plane is on. |
fb_id | Framebuffer ID of the framebuffer to display on the plane, or -1 to leave the framebuffer unchanged. |
flags | Flags that control function behavior. No flags are currently supported for external use. |
crtc_x | Offset from left of active display region to show plane. |
crtc_y | Offset from top of active display region to show plane. |
crtc_w | Width of output rectangle on display. |
crtc_h | Height of output rectangle on display. |
src_x | Clip offset from left of source framebuffer (Q16.16 fixed point). |
src_y | Clip offset from top of source framebuffer (Q16.16 fixed point). |
src_w | Width of source rectangle (Q16.16 fixed point). |
src_h | Height of source rectangle (Q16.16 fixed point). |
0 | if successful. |
-EINVAL | if plane_id or crtc_id is invalid. |
-errno | otherwise. |
int drmOpen | ( | const char * | name, |
const char * | busid | ||
) |
Opens a DRM device and creates a file descriptor handle.
name | Driver name. Not referenced if bus ID is supplied. |
busid | bus ID. Zero if not known. Ignored if 'name' is "drm-nvdc". |
int drmOpenControl | ( | int | minor | ) |
Function stub.
int drmOpenOnce | ( | void * | unused, |
const char * | BusID, | ||
int * | newlyopened | ||
) |
Function stub.
int drmOpenOnceWithType | ( | const char * | BusID, |
int * | newlyopened, | ||
int | type | ||
) |
Function stub.
int drmOpenRender | ( | int | minor | ) |
Function stub.
int drmOpenWithType | ( | const char * | name, |
const char * | busid, | ||
int | type | ||
) |
Function stub.
int drmPrimeFDToHandle | ( | int | fd, |
int | prime_fd, | ||
uint32_t * | handle | ||
) |
Imports a dma-buf.
Given a dma-buf file descriptor, returns a corresponding handle.
[in] | fd | The file descriptor of an open DRM device. |
[in] | prime_fd | The file descriptor of a dma-buf. |
[out] | handle | A handle for the dma-buf. |
int drmPrimeHandleToFD | ( | int | fd, |
uint32_t | handle, | ||
uint32_t | flags, | ||
int * | prime_fd | ||
) |
Exports a dma-buf.
Given a handle, returns a corresponding dma-buf file descriptor.
[in] | fd | The file descriptor of an open DRM device. |
[in] | handle | A handle for the dma-buf. |
[in] | flags | Flags like DRM_CLOEXEC and DRM_RDWR. |
[out] | prime_fd | The file descriptor of a dma-buf. |
Allocates a drmModeAtomicReq
structure for an atomic mode setting request. The initially empty structure can be populated with properties and values by calls to drmModeAtomicAddProperty, and can then be committed to hardware by a call to drmModeAtomicCommit.
drmModeAtomicReqPtr
structure if successful, or NULL if DRM_CLIENT_CAP_ATOMIC is not enabled or the API is out of memory. unsigned long drmRandom | ( | void * | state | ) |
Function stub.
void* drmRandomCreate | ( | unsigned long | seed | ) |
Function stub.
int drmRandomDestroy | ( | void * | state | ) |
Function stub.
double drmRandomDouble | ( | void * | state | ) |
Function stub.
int drmRmMap | ( | int | fd, |
drm_handle_t | handle | ||
) |
Function stub.
int drmScatterGatherAlloc | ( | int | fd, |
unsigned long | size, | ||
drm_handle_t * | handle | ||
) |
Function stub.
int drmScatterGatherFree | ( | int | fd, |
drm_handle_t | handle | ||
) |
Function stub.
int drmSetBusid | ( | int | fd, |
const char * | busid | ||
) |
Function stub.
int drmSetClientCap | ( | int | fd, |
uint64_t | capability, | ||
uint64_t | value | ||
) |
Enables or disables DRM features (capabilities).
fd | The file descriptor of an open DRM device. |
capability | Specifies the capability to be enabled or disabled. Supported values are:
|
value | 0 to disable the capability, or 1 to enable it. |
-EINVAL
otherwise. int drmSetContextFlags | ( | int | fd, |
drm_context_t | context, | ||
drm_context_tFlags | flags | ||
) |
Function stub.
int drmSetInterfaceVersion | ( | int | fd, |
drmSetVersion * | version | ||
) |
Sets the interface version.
Limits the exposed DRM interface to the features that would be exposed in a specified version.
fd | The file descriptor of an open DRM device. |
version | Version information to be used to limit DRM interface. version->drm_di_major , version->drm_di_minor , version->drm_dd_major , and version->drm_dd_minor can be set to -1 as a "don't care" value. |
int drmSetMaster | ( | int | fd | ) |
Requests master controls for a DRM device.
In DRM drivers that support master mode, requests that a file descriptor be granted master permission for operations that require it, such as the drmModeSet
... functions.
fd | The file descriptor of an open DRM device. |
void drmSetServerInfo | ( | drmServerInfoPtr | info | ) |
Function stub.
void* drmSLCreate | ( | void | ) |
Function stub.
int drmSLDelete | ( | void * | l, |
unsigned long | key | ||
) |
Function stub.
int drmSLDestroy | ( | void * | l | ) |
Function stub.
void drmSLDump | ( | void * | l | ) |
Function stub.
int drmSLFirst | ( | void * | l, |
unsigned long * | key, | ||
void ** | value | ||
) |
Function stub.
int drmSLInsert | ( | void * | l, |
unsigned long | key, | ||
void * | value | ||
) |
Function stub.
int drmSLLookup | ( | void * | l, |
unsigned long | key, | ||
void ** | value | ||
) |
Function stub.
int drmSLLookupNeighbors | ( | void * | l, |
unsigned long | key, | ||
unsigned long * | prev_key, | ||
void ** | prev_value, | ||
unsigned long * | next_key, | ||
void ** | next_value | ||
) |
Function stub.
int drmSLNext | ( | void * | l, |
unsigned long * | key, | ||
void ** | value | ||
) |
Function stub.
int drmSwitchToContext | ( | int | fd, |
drm_context_t | context | ||
) |
Function stub.
int drmSyncobjCreate | ( | int | fd, |
uint32_t | flags, | ||
uint32_t * | handle | ||
) |
Function stub.
int drmSyncobjDestroy | ( | int | fd, |
uint32_t | handle | ||
) |
Function stub.
int drmSyncobjExportSyncFile | ( | int | fd, |
uint32_t | handle, | ||
int * | sync_file_fd | ||
) |
Function stub.
int drmSyncobjFDToHandle | ( | int | fd, |
int | obj_fd, | ||
uint32_t * | handle | ||
) |
Function stub.
int drmSyncobjHandleToFD | ( | int | fd, |
uint32_t | handle, | ||
int * | obj_fd | ||
) |
Function stub.
int drmSyncobjImportSyncFile | ( | int | fd, |
uint32_t | handle, | ||
int | sync_file_fd | ||
) |
Function stub.
int drmSyncobjQuery | ( | int | fd, |
uint32_t * | handles, | ||
uint64_t * | points, | ||
uint32_t | handle_count | ||
) |
Function stub.
int drmSyncobjQuery2 | ( | int | fd, |
uint32_t * | handles, | ||
uint64_t * | points, | ||
uint32_t | handle_count, | ||
uint32_t | flags | ||
) |
Function stub.
int drmSyncobjReset | ( | int | fd, |
const uint32_t * | handles, | ||
uint32_t | handle_count | ||
) |
Function stub.
int drmSyncobjSignal | ( | int | fd, |
const uint32_t * | handles, | ||
uint32_t | handle_count | ||
) |
Function stub.
int drmSyncobjTimelineSignal | ( | int | fd, |
const uint32_t * | handles, | ||
uint64_t * | points, | ||
uint32_t | handle_count | ||
) |
Function stub.
int drmSyncobjTimelineWait | ( | int | fd, |
uint32_t * | handles, | ||
uint64_t * | points, | ||
unsigned | num_handles, | ||
int64_t | timeout_nsec, | ||
unsigned | flags, | ||
uint32_t * | first_signaled | ||
) |
Function stub.
int drmSyncobjTransfer | ( | int | fd, |
uint32_t | dst_handle, | ||
uint64_t | dst_point, | ||
uint32_t | src_handle, | ||
uint64_t | src_point, | ||
uint32_t | flags | ||
) |
Function stub.
int drmSyncobjWait | ( | int | fd, |
uint32_t * | handles, | ||
unsigned | num_handles, | ||
int64_t | timeout_nsec, | ||
unsigned | flags, | ||
uint32_t * | first_signaled | ||
) |
Function stub.
int drmUnlock | ( | int | fd, |
drm_context_t | context | ||
) |
Function stub.
int drmUnmap | ( | drmAddress | address, |
drmSize | size | ||
) |
Function stub.
int drmUnmapBufs | ( | drmBufMapPtr | bufs | ) |
Function stub.
int drmUpdateDrawableInfo | ( | int | fd, |
drm_drawable_t | handle, | ||
drm_drawable_info_type_t | type, | ||
unsigned int | num, | ||
void * | data | ||
) |
Function stub.
int drmWaitVBlank | ( | int | fd, |
drmVBlankPtr | vbl | ||
) |
Waits for a vertical blanking interval (vblank).
Waits for a specified vblank, or requests that the registered vblank handler be called when a specified vblank occurs.
fd | The file descriptor of an open DRM device. |
vbl | A description of the requested vblank. The vbl->type field must contain one of these values:
|