39 int drmOpen(
const char* name,
const char* busid);
73 int drmGetCap(
int fd, uint64_t capability, uint64_t *value);
230 int drmIoctl(
int fd,
unsigned long request,
void *arg);
391 uint32_t connector_id,
392 uint32_t property_id,
467 uint32_t *connectors,
469 drmModeModeInfoPtr drm_mode);
490 uint16_t *red, uint16_t *green, uint16_t *blue);
509 uint16_t *red, uint16_t *green, uint16_t *blue);
740 uint32_t object_type);
804 * printf(
"\tcon_value : %s\n", name);
808 * printf(
"\tcon_value : %" PRIu64
"\n", value);
812 * @note The zpos value
for a plane is initialized with an offset of 10 relative to
813 * the next plane. This is to allow
for flexible configuration of heads. For example:
814 * -
"Primary" type Plane zpos = 10
815 * - First
"Overlay" Plane zpos = 20
816 * - Next
"Overlay" Plane zpos = 30
819 * @note The allowed range
for zpos is [0, 255]. Planes with numerically greater values
for
820 * zpos occlude planes with numerically lesser values.
822 * @note The alpha value
for a plane causes a plane-wide transparency to be
823 * applied as well as the per-pixel alpha contained in the buffer
object. The
824 * allowed range
for alpha is [0, 255], where 0 is fully transparent and 255 indicates
825 * that only per-pixel alpha has an effect. For non-alpha pixel formats,
826 * there is no per-pixel alpha, so 255 indicates fully opaque.
828 * @post If the call is successful, the application must free the
property
831 * @param fd The file descriptor of an open DRM device.
832 * @param propertyId Property ID of the
property object to be fetched.
833 * @
return A @c drmModePropertyPtr
if successful, or NULL otherwise.
852 uint32_t property_id, uint64_t value);
968 drmModeAtomicReqPtr drmModeAtomicAlloc(
void);
986 uint32_t property_id,
1016 drmModeAtomicReqPtr req,
1106 const void *data,
size_t size,
1190 unsigned long drmCommandIndex,
1192 unsigned long size);
1211 int drmRmMap(
int fd, drm_handle_t handle);
1256 int drmMap(
int fd, drm_handle_t handle, drmSize size, drmAddressPtr address);
1265 int drmUnlock(
int fd, drm_context_t context);
1297 int drmAddMap(
int fd, drm_handle_t offset, drmSize size,
1298 drmMapType type, drmMapFlags
flags,
1299 drm_handle_t *handle);
1318 drm_drawable_info_type_t type,
1356 int drmUnmap(drmAddress address, drmSize size);
1401 int drmHashNext(
void *t,
unsigned long *key,
void **value);
1410 int drmHashFirst(
void *t,
unsigned long *key,
void **value);
1430 int drmModeAddFB2WithModifiers(
int fd, uint32_t width,
drmModeEncoderPtr drmModeGetEncoder(int fd, uint32_t encoder_id)
Gets information for an encoder.
int drmSetContextFlags(int fd, drm_context_t context, drm_context_tFlags flags)
Function stub.
void drmModeFreePlaneResources(drmModePlaneResPtr ptr)
Frees a plane resource information structure.
int drmHashFirst(void *t, unsigned long *key, void **value)
Function stub.
int drmCreateDrawable(int fd, drm_drawable_t *handle)
Function stub.
int uint32_t uint32_t uint32_t const uint32_t const uint32_t const uint32_t const uint64_t modifier[4]
void drmModeFreeObjectProperties(drmModeObjectPropertiesPtr ptr)
Frees an object properties structure.
int drmUnmap(drmAddress address, drmSize size)
Function stub.
drmModeObjectPropertiesPtr drmModeObjectGetProperties(int fd, uint32_t object_id, uint32_t object_type)
Gets all properties of a DRM object.
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.
drmModePropertyBlobPtr drmModeGetPropertyBlob(int fd, uint32_t blob_id)
Allocates and retrieves a userspace property blob pointer.
int drmSetClientCap(int fd, uint64_t capability, uint64_t value)
Enables or disables DRM features (capabilities).
int drmDelContextTag(int fd, drm_context_t context)
Function stub.
int uint32_t uint32_t uint32_t const uint32_t const uint32_t const uint32_t offsets[4]
int drmWaitVBlank(int fd, drmVBlankPtr vbl)
Waits for a vertical blanking interval (vblank).
int drmDestroyContext(int fd, drm_context_t handle)
Function stub.
int drmModeDestroyPropertyBlob(int fd, uint32_t id)
Destroys a property blob.
int drmMap(int fd, drm_handle_t handle, drmSize size, drmAddressPtr address)
Function stub.
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.
int drmCommandWriteRead(int fd, unsigned long drmCommandIndex, void *data, unsigned long size)
Send a device-specific read-write command.
drmModeCrtcPtr drmModeGetCrtc(int fd, uint32_t crtc_id)
Gets information for a CRTC.
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.
int drmGetCap(int fd, uint64_t capability, uint64_t *value)
Gets capabilities of the DRM driver.
int drmDropMaster(int fd)
Releases master controls for a DRM device.
int drmModeSetCursor(int fd, uint32_t crtc_id, uint32_t bo_handle, uint32_t width, uint32_t height)
Sets a cursor image.
int drmModeConnectorSetProperty(int fd, uint32_t connector_id, uint32_t property_id, uint64_t value)
Sets a connector property.
int drmModeAtomicCommit(int fd, drmModeAtomicReqPtr req, uint32_t flags, void *user_data)
Commits an atomic property change request to hardware.
void drmModeFreeConnector(drmModeConnectorPtr ptr)
Frees a connector.
char * drmGetBusid(int fd)
Gets the bus ID of a device.
void drmSetServerInfo(drmServerInfoPtr info)
Function stub.
int drmCreateContext(int fd, drm_context_t *handle)
Function stub.
void drmModeFreeProperty(drmModePropertyPtr ptr)
Frees a property structure.
void drmModeFreePlane(drmModePlanePtr ptr)
Frees a plane.
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.
int drmModeCreatePropertyBlob(int fd, const void *data, size_t size, uint32_t *id)
Creates a property blob.
int uint32_t uint32_t uint32_t const uint32_t bo_handles[4]
int drmHashNext(void *t, unsigned long *key, void **value)
Function stub.
int drmAddMap(int fd, drm_handle_t offset, drmSize size, drmMapType type, drmMapFlags flags, drm_handle_t *handle)
Function stub.
void drmFreeBusid(const char *busid)
Frees bus ID information.
int uint32_t uint32_t uint32_t const uint32_t const uint32_t const uint32_t const uint64_t uint32_t uint32_t flags
int uint32_t uint32_t height
void drmModeAtomicFree(drmModeAtomicReqPtr req)
Frees an atomic request.
void drmModeFreePropertyBlob(drmModePropertyBlobPtr ptr)
Frees a userspace property blob pointer.
drmModeConnectorPtr drmModeGetConnector(int fd, uint32_t connector_id)
Gets information for a connector.
int drmModeAtomicAddProperty(drmModeAtomicReqPtr req, uint32_t object_id, uint32_t property_id, uint64_t value)
Adds a property to an atomic request.
int uint32_t uint32_t uint32_t const uint32_t const uint32_t pitches[4]
int drmIoctl(int fd, unsigned long request, void *arg)
Issues a DRM input/output control (IOCTL).
drmModePlanePtr drmModeGetPlane(int fd, uint32_t plane_id)
Gets information about a plane.
int drmAuthMagic(int fd, drm_magic_t magic)
Authenticates a magic cookie.
int drmDestroyDrawable(int fd, drm_drawable_t handle)
Function stub.
int drmPrimeFDToHandle(int fd, int prime_fd, uint32_t *handle)
Imports a dma-buf.
int drmAddContextTag(int fd, drm_context_t context, void *tag)
Function stub.
drmModeResPtr drmModeGetResources(int fd)
Gets information about a DRM device's CRTCs, encoders, and connectors.
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.
int drmGetMagic(int fd, drm_magic_t *magic)
Retrieves a magic cookie.
drmVersionPtr drmGetVersion(int fd)
Retrieves version information for the DRM driver.
void drmModeFreeCrtc(drmModeCrtcPtr ptr)
Frees a CRTC.
int drmHandleEvent(int fd, drmEventContextPtr evctx)
Polls for an event, specifying a callback function.
int drmSetInterfaceVersion(int fd, drmSetVersion *version)
Sets the interface version.
int drmAvailable(void)
Function stub.
drmModePropertyPtr drmModeGetProperty(int fd, uint32_t propertyId)
Gets a property structure that describes a property of a DRM object.
drm_context_t * drmGetReservedContextList(int fd, int *count)
Function stub.
int drmUpdateDrawableInfo(int fd, drm_drawable_t handle, drm_drawable_info_type_t type, unsigned int num, void *data)
Function stub.
int drmModeMoveCursor(int fd, uint32_t crtc_id, int x, int y)
Moves a cursor.
drmHashEntry * drmGetEntry(int fd)
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.
int drmClose(int fd)
Closes a DRM device.
int drmSetBusid(int fd, const char *busid)
Function stub.
int drmGetLock(int fd, drm_context_t context, drmLockFlags flags)
Function stub.
void * drmGetHashTable(void)
Function stub.
drmModePlaneResPtr drmModeGetPlaneResources(int fd)
Gets information about planes.
int drmModeCrtcSetGamma(int fd, uint32_t crtc_id, uint32_t size, uint16_t *red, uint16_t *green, uint16_t *blue)
Sets the display gamma.
void * drmGetContextTag(int fd, drm_context_t context)
Function stub.
int uint32_t uint32_t uint32_t pixel_format
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.
int uint32_t uint32_t uint32_t const uint32_t const uint32_t const uint32_t const uint64_t uint32_t * buf_id
char * drmGetDeviceNameFromFd(int fd)
Gets a DRM device's name string.
void drmModeFreeEncoder(drmModeEncoderPtr ptr)
Frees an encoder.
int drmUnlock(int fd, drm_context_t context)
Function stub.
int drmSetMaster(int fd)
Requests master controls for a DRM device.
int drmPrimeHandleToFD(int fd, uint32_t handle, uint32_t flags, int *prime_fd) drmModeAtomicReqPtr drmModeAtomicAlloc(void)
Exports a dma-buf.
void drmFreeReservedContextList(drm_context_t *pt)
Function stub.
void drmFreeVersion(drmVersionPtr version)
Frees a version information structure.
int drmOpen(const char *name, const char *busid)
Opens a DRM device and creates a file descriptor handle.
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) int drmModeAddFB2WithModifiers(int fd
Function stub.
void drmModeFreeResources(drmModeResPtr ptr)
Frees a resource information structure.
int drmRmMap(int fd, drm_handle_t handle)
Function stub.
int drmModeRmFB(int fd, uint32_t fb_id)
Destroys a framebuffer.
void drmFree(void *p)
Frees a block of memory.