summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-11-15 18:31:23 +1100
committerDave Airlie <airlied@linux.ie>2007-11-15 18:31:23 +1100
commit1e8984a3674c89c3b5ef9b6d3747fb75e10774b3 (patch)
tree2c4279da2ebaa9cac4e7a588c4f4d4aa933be276 /linux-core
parent2520d3fd99636e493060d51b1c3287a5faac22bf (diff)
drm: send correct fb id to userspace
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_crtc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c
index 5b00c115..e40ab6da 100644
--- a/linux-core/drm_crtc.c
+++ b/linux-core/drm_crtc.c
@@ -1271,7 +1271,11 @@ int drm_mode_getcrtc(struct drm_device *dev,
crtc_resp->x = crtc->x;
crtc_resp->y = crtc->y;
- crtc_resp->fb_id = 1;
+
+ if (crtc->fb)
+ crtc_resp->fb_id = crtc->fb->id;
+ else
+ crtc_resp->fb_id = 0;
crtc_resp->outputs = 0;
if (crtc->enabled) {