Message ID | 20110603105414.GQ23771@pengutronix.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi David, Somehow my Cc got lost. Maybe you missed this. Any comments? Thanks Sascha On Fri, Jun 03, 2011 at 12:54:14PM +0200, Sascha Hauer wrote: > > 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> > --- > drivers/gpu/drm/drm_crtc.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index 872747c..21058e6 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, > if (card_res->count_fbs >= fb_count) { > copied = 0; > fb_id = (uint32_t __user *)(unsigned long)card_res->fb_id_ptr; > - list_for_each_entry(fb, &file_priv->fbs, head) { > + list_for_each_entry(fb, &file_priv->fbs, filp_head) { > if (put_user(fb->base.id, fb_id + copied)) { > ret = -EFAULT; > goto out; > -- > 1.7.5.3 > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel >
On Fri, 2011-06-03 at 12:54 +0200, Sascha Hauer wrote: > 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> > --- Looks good, commited to drm-fixes tree. Dave.
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 872747c..21058e6 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, if (card_res->count_fbs >= fb_count) { copied = 0; fb_id = (uint32_t __user *)(unsigned long)card_res->fb_id_ptr; - list_for_each_entry(fb, &file_priv->fbs, head) { + list_for_each_entry(fb, &file_priv->fbs, filp_head) { if (put_user(fb->base.id, fb_id + copied)) { ret = -EFAULT; goto out;
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> --- drivers/gpu/drm/drm_crtc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)