Merge branch 'modesetting-gem' of ssh://git.freedesktop.org/git/mesa/drm into modeset...
[profile/ivi/libdrm.git] / libdrm / xf86drmMode.h
index 2f3a8f7..59612a9 100644 (file)
@@ -32,7 +32,6 @@
  */
 
 #include <drm.h>
-#include "xf86mm.h"
 
 /*
  * This is the interface for modesetting for drm.
@@ -51,7 +50,6 @@
  * buffer object interface. This object needs to be pinned.
  */
 
-
 typedef struct _drmModeRes {
 
        int count_fbs;
@@ -92,19 +90,13 @@ typedef struct _drmModeProperty {
 
 typedef struct _drmModeCrtc {
        unsigned int crtc_id;
-       unsigned int buffer_id; /**< FB id to connect to 0 = disconnect*/
+       unsigned int buffer_id; /**< FB id to connect to 0 = disconnect */
 
-       uint32_t x, y; /**< Position on the frameuffer */
+       uint32_t x, y; /**< Position on the framebuffer */
        uint32_t width, height;
        int mode_valid;
        struct drm_mode_modeinfo mode;
 
-       int count_connectors;
-       uint32_t connectors; /**< Connectors that are connected */
-
-       int count_possibles;
-       uint32_t possibles; /**< Connectors that can be connected */
-
        int gamma_size; /**< Number of gamma stops */
 
 } drmModeCrtc, *drmModeCrtcPtr;
@@ -112,9 +104,9 @@ typedef struct _drmModeCrtc {
 typedef struct _drmModeEncoder {
        unsigned int encoder_id;
        unsigned int encoder_type;
-       uint32_t crtc;
-       uint32_t crtcs;
-       uint32_t clones;
+       unsigned int crtc_id;
+       uint32_t possible_crtcs;
+       uint32_t possible_clones;
 } drmModeEncoder, *drmModeEncoderPtr;
 
 typedef enum {
@@ -134,8 +126,7 @@ typedef enum {
 
 typedef struct _drmModeConnector {
        unsigned int connector_id;
-
-       unsigned int encoder; /**< Crtc currently connected to */
+       unsigned int encoder_id; /**< Encoder currently connected to */
        unsigned int connector_type;
        unsigned int connector_type_id;
        drmModeConnection connection;
@@ -263,3 +254,8 @@ extern void drmModeFreePropertyBlob(drmModePropertyBlobPtr ptr);
 extern int drmModeConnectorSetProperty(int fd, uint32_t connector_id, uint32_t property_id,
                                    uint64_t value);
 extern int drmCheckModesettingSupported(const char *busid);
+
+extern int drmModeCrtcSetGamma(int fd, uint32_t crtc_id, uint32_t size,
+                              uint16_t *red, uint16_t *green, uint16_t *blue);
+extern int drmModeCrtcGetGamma(int fd, uint32_t crtc_id, uint32_t size,
+                              uint16_t *red, uint16_t *green, uint16_t *blue);