summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2007-12-03 15:27:49 +1000
committerDave Airlie <airlied@redhat.com>2007-12-03 15:30:05 +1000
commit34bb2e733a612de49a390babddd8477825deb895 (patch)
tree31622aec10cfaa2a64f021c24227e8422b6b13d3 /libdrm
parent96df9b11ad8974d7a2a0a589114cbbb04a584f18 (diff)
mode: copy back the mode if is valid correctly
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drmMode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
index cf596730..bb7be13c 100644
--- a/libdrm/xf86drmMode.c
+++ b/libdrm/xf86drmMode.c
@@ -263,7 +263,9 @@ drmModeCrtcPtr drmModeGetCrtc(int fd, uint32_t crtcId)
r->crtc_id = crtc.crtc_id;
r->x = crtc.x;
r->y = crtc.y;
- r->mode = crtc.mode;
+ r->mode_valid = crtc.mode_valid;
+ if (r->mode_valid)
+ memcpy(&r->mode, &crtc.mode, sizeof(struct drm_mode_modeinfo));
r->buffer_id = crtc.fb_id;
r->gamma_size = crtc.gamma_size;
r->count_outputs = crtc.count_outputs;