From 1e8984a3674c89c3b5ef9b6d3747fb75e10774b3 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 15 Nov 2007 18:31:23 +1100 Subject: drm: send correct fb id to userspace --- linux-core/drm_crtc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'linux-core/drm_crtc.c') 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) { -- cgit v1.2.3