aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-06-03 06:54:14 -0400
committerDave Airlie <airlied@redhat.com>2011-06-09 00:31:09 -0400
commit618c75e491a5a50cd3819eaf5f853fd87df3ae42 (patch)
treedee705f2c628c276be7b07a7c44067f62bccb406 /drivers/gpu/drm/drm_crtc.c
parent06e86849cf4019945a106913adb9ff0abcc01770 (diff)
drm: fix fbs in DRM_IOCTL_MODE_GETRESOURCES ioctl
The DRM_IOCTL_MODE_GETRESOURCES ioctl just returns bogus framebuffers. That is because the framebuffers for each file are in the filp_head member of struct drm_framebuffer, not in the head member. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r--drivers/gpu/drm/drm_crtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 872747c5a544..21058e6ad2b8 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1113,7 +1113,7 @@ int drm_mode_getresources(struct drm_device *dev, void *data,
1113 if (card_res->count_fbs >= fb_count) { 1113 if (card_res->count_fbs >= fb_count) {
1114 copied = 0; 1114 copied = 0;
1115 fb_id = (uint32_t __user *)(unsigned long)card_res->fb_id_ptr; 1115 fb_id = (uint32_t __user *)(unsigned long)card_res->fb_id_ptr;
1116 list_for_each_entry(fb, &file_priv->fbs, head) { 1116 list_for_each_entry(fb, &file_priv->fbs, filp_head) {
1117 if (put_user(fb->base.id, fb_id + copied)) { 1117 if (put_user(fb->base.id, fb_id + copied)) {
1118 ret = -EFAULT; 1118 ret = -EFAULT;
1119 goto out; 1119 goto out;