libdrm: add crtc/output ids to userspace interface
authorDave Airlie <airlied@linux.ie>
Thu, 15 Nov 2007 07:31:50 +0000 (18:31 +1100)
committerDave Airlie <airlied@linux.ie>
Thu, 15 Nov 2007 07:31:50 +0000 (18:31 +1100)
libdrm/xf86drmMode.c
libdrm/xf86drmMode.h

index e7ac58b..c3abb2d 100644 (file)
@@ -265,7 +265,8 @@ drmModeCrtcPtr drmModeGetCrtc(int fd, uint32_t crtcId)
 
        if (!(r = drmMalloc(sizeof(*r))))
                return 0;
-
+       
+       r->crtc_id         = crtc.crtc_id;
        r->x               = crtc.x;
        r->y               = crtc.y;
        r->mode            = crtc.mode;
@@ -337,6 +338,7 @@ drmModeOutputPtr drmModeGetOutput(int fd, uint32_t output_id)
        if(!(r = drmMalloc(sizeof(*r))))
                return 0;
 
+       r->output_id = out.output;
        r->connection   = out.connection;
        r->mmWidth      = out.mm_width;
        r->mmHeight     = out.mm_height;
index b25a661..be9d84a 100644 (file)
@@ -71,7 +71,7 @@ typedef struct _drmModeRes {
 typedef struct drm_mode_fb_cmd drmModeFB, *drmModeFBPtr;
 
 typedef struct _drmModeCrtc {
-
+       unsigned int crtc_id;
        unsigned int buffer_id; /**< FB id to connect to 0 = disconnect*/
 
        uint32_t x, y; /**< Position on the frameuffer */
@@ -104,6 +104,7 @@ typedef enum {
 } drmModeSubPixel;
 
 typedef struct _drmModeOutput {
+       unsigned int output_id;
 
        unsigned int crtc; /**< Crtc currently connected to */
        unsigned char name[DRM_OUTPUT_NAME_LEN];