summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-06-02 10:41:12 +1000
committerDave Airlie <airlied@redhat.com>2008-06-02 10:41:12 +1000
commitdba95ec34315d62934ff0e493e085aa6a03cde7c (patch)
tree3dcca87cf34028dcb0758ae9de54a1e14e3de705 /libdrm
parente439e74776b215d70d8e34e8aa9cea22179dcbc6 (diff)
drm: fixup some interfaces so test code works again
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drmMode.c14
-rw-r--r--libdrm/xf86drmMode.h3
2 files changed, 5 insertions, 12 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
index 8b7f2bcf..d11fc12e 100644
--- a/libdrm/xf86drmMode.c
+++ b/libdrm/xf86drmMode.c
@@ -254,10 +254,6 @@ drmModeCrtcPtr drmModeGetCrtc(int fd, uint32_t crtcId)
struct drm_mode_crtc crtc;
drmModeCrtcPtr r;
- crtc.count_connectors = 0;
- crtc.connectors = 0;
- crtc.count_possibles = 0;
- crtc.possibles = 0;
crtc.crtc_id = crtcId;
if (ioctl(fd, DRM_IOCTL_MODE_GETCRTC, &crtc))
@@ -278,12 +274,6 @@ drmModeCrtcPtr drmModeGetCrtc(int fd, uint32_t crtcId)
memcpy(&r->mode, &crtc.mode, sizeof(struct drm_mode_modeinfo));
r->buffer_id = crtc.fb_id;
r->gamma_size = crtc.gamma_size;
- r->count_connectors = crtc.count_connectors;
- r->count_possibles = crtc.count_possibles;
- /* TODO we realy should test if these alloc & cpy fails. */
- r->connectors = crtc.connectors;
- r->possibles = crtc.possibles;
-
return r;
}
@@ -362,6 +352,8 @@ drmModeEncoderPtr drmModeGetEncoder(int fd, uint32_t encoder_id)
if (!(r = drmMalloc(sizeof(*r))))
return 0;
+ r->encoder_id = enc.encoder_id;
+ r->crtc = enc.crtc;
r->encoder_type = enc.encoder_type;
r->crtcs = enc.crtcs;
r->clones = enc.clones;
@@ -411,7 +403,7 @@ drmModeConnectorPtr drmModeGetConnector(int fd, uint32_t connector_id)
}
r->connector_id = conn.connector;
- r->crtc = conn.crtc;
+ r->encoder = conn.encoder;
r->connection = conn.connection;
r->mmWidth = conn.mm_width;
r->mmHeight = conn.mm_height;
diff --git a/libdrm/xf86drmMode.h b/libdrm/xf86drmMode.h
index ceaa9abc..2f3a8f74 100644
--- a/libdrm/xf86drmMode.h
+++ b/libdrm/xf86drmMode.h
@@ -112,6 +112,7 @@ typedef struct _drmModeCrtc {
typedef struct _drmModeEncoder {
unsigned int encoder_id;
unsigned int encoder_type;
+ uint32_t crtc;
uint32_t crtcs;
uint32_t clones;
} drmModeEncoder, *drmModeEncoderPtr;
@@ -134,7 +135,7 @@ typedef enum {
typedef struct _drmModeConnector {
unsigned int connector_id;
- unsigned int crtc; /**< Crtc currently connected to */
+ unsigned int encoder; /**< Crtc currently connected to */
unsigned int connector_type;
unsigned int connector_type_id;
drmModeConnection connection;