diff options
Diffstat (limited to 'libdrm/xf86drmMode.h')
-rw-r--r-- | libdrm/xf86drmMode.h | 104 |
1 files changed, 14 insertions, 90 deletions
diff --git a/libdrm/xf86drmMode.h b/libdrm/xf86drmMode.h index 6aa104a9..b25a6610 100644 --- a/libdrm/xf86drmMode.h +++ b/libdrm/xf86drmMode.h @@ -40,25 +40,17 @@ * In order to use this interface you must include either <stdint.h> or another * header defining uint32_t, int32_t and uint16_t. * - * It aims to provide a randr compatible interface for modesettings in the + * It aims to provide a randr1.2 compatible interface for modesettings in the * kernel, the interface is also ment to be used by libraries like EGL. * * More information can be found in randrproto.txt which can be found here: * http://gitweb.freedesktop.org/?p=xorg/proto/randrproto.git * - * All framebuffer, crtc and output ids start at 1 while 0 is either an invalid - * parameter or used to indicate that the command should disconnect from the - * currently bound target, as with drmModeMapOutput. - * - * Currently only one framebuffer exist and has a id of 1, which is also the - * default framebuffer and should allways be avaible to the client, unless - * it is locked/used or any other limiting state is applied on it. - * + * There are some major diffrences to be noted. Unlike the randr1.2 proto you + * need to create the memory object of the framebuffer yourself with the ttm + * buffer object interface. This object needs to be pinned. */ -typedef struct _drmModeGammaTriple { - uint16_t r, g, b; -} drmModeGammaTriple, *drmModeGammaTriplePtr; typedef struct _drmModeRes { @@ -130,53 +122,7 @@ typedef struct _drmModeOutput { } drmModeOutput, *drmModeOutputPtr; -/* - * RRSetScreenConfig o - * RRGetScreenInfo o - * - * RRGetScreenSizeRange - see frameBuffer info - * RRSetScreenSize - * RRGetScreenResources - * - * RRGetOutputInfo - * - * RRListOutputProperties * - * RRQueryOutputProperty * - * RRConfigureOutputProperty * - * RRChangeOutputProperty * - * RRDeleteOutputProperty * - * RRGetOutputProperty * - * - * RRCreateMode - * RRDestroyMode - * RRAddOutputMode - * RRDeleteOutputMode - * - * RRGetCrtcInfo - * RRSetCrtcConfig - * - * RRGetCrtcGammaSize - see crtc info - * RRGetCrtcGamma - * RRSetCrtcGamma - * - * drmModeGetResources - * drmModeForceProbe - * - * drmModeGetFrameBufferInfo - * drmModeSetFrameBufferSize - * - * drmModeGetCrtcInfo - * drmModeSetCrtcConfig - * drmModeGetCrtcGamma - * drmModeSetCrtcGamma - * - * drmModeGetOutputInfo - * - * drmModeAddMode - * drmModeDestroyMode - * drmModeAddOutputMode - * drmModeDeleteOutputMode - */ + extern void drmModeFreeModeInfo( struct drm_mode_modeinfo *ptr ); extern void drmModeFreeResources( drmModeResPtr ptr ); @@ -189,11 +135,6 @@ extern void drmModeFreeOutput( drmModeOutputPtr ptr ); */ extern drmModeResPtr drmModeGetResources(int fd); -/** - * Forces a probe of the give output outputId, on 0 all will be probed. - */ -extern int drmModeForceProbe(int fd, uint32_t outputId); - /* * FrameBuffer manipulation. @@ -215,13 +156,9 @@ extern int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth, */ extern int drmModeRmFB(int fd, uint32_t bufferId); -/** - * Changes the scanout buffer to the given buffer object. - */ -extern int drmModeFlipFrameBuffer(int fd, uint32_t bufferId, drmBO *bo); /* - * Crtc function. + * Crtc functions */ /** @@ -236,19 +173,6 @@ extern int drmModeSetCrtc(int fd, uint32_t crtcId, uint32_t bufferId, uint32_t x, uint32_t y, uint32_t modeId, uint32_t *outputs, int count); -/** - * Gets the gamma from a crtc - */ -extern drmModeGammaTriplePtr drmModeGetCrtcGamma(int fd, uint32_t crtcId, - int *count); - -/** - * Sets the gamma on a crtc - */ -extern int drmModeSetCrtcGamma(int fd, uint32_t crtcId, - drmModeGammaTriplePtr ptr, int count); - - /* * Output manipulation @@ -261,24 +185,24 @@ extern drmModeOutputPtr drmModeGetOutput(int fd, uint32_t outputId); /** - * Creates a new mode from the given mode info. + * Adds a new mode from the given mode info. * Name must be unique. */ -extern uint32_t drmModeNewMode(int fd, struct drm_mode_modeinfo *modeInfo); +extern uint32_t drmModeAddMode(int fd, struct drm_mode_modeinfo *modeInfo); /** - * Destroys a mode created with CreateMode, must be unused. + * Removes a mode created with AddMode, must be unused. */ -extern int drmModeDesMode(int fd, uint32_t modeId); +extern int drmModeRmMode(int fd, uint32_t modeId); /** - * Adds the given mode to an output. + * Attaches the given mode to an output. */ -extern int drmModeAddMode(int fd, uint32_t outputId, uint32_t modeId); +extern int drmModeAttachMode(int fd, uint32_t outputId, uint32_t modeId); /** - * Deletes a mode Added with AddOutputMode from the output, + * Detaches a mode from the output * must be unused, by the given mode. */ -extern int drmModeDelMode(int fd, uint32_t outputId, uint32_t modeId); +extern int drmModeDetachMode(int fd, uint32_t outputId, uint32_t modeId); |