[06/14] drm/i915: Use drm_for_each_fb in i915_debugfs.c
diff mbox

Message ID 1436478277-10861-7-git-send-email-daniel.vetter@ffwll.ch
State New
Headers show

Commit Message

Daniel Vetter July 9, 2015, 9:44 p.m. UTC
Just so I have a user for this macro.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Ville Syrjälä July 10, 2015, 7:53 a.m. UTC | #1
On Thu, Jul 09, 2015 at 11:44:29PM +0200, Daniel Vetter wrote:
> Just so I have a user for this macro.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 053adbb97037..60eebf5f6da8 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1855,6 +1855,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
>  	struct drm_device *dev = node->minor->dev;
>  	struct intel_fbdev *ifbdev = NULL;
>  	struct intel_framebuffer *fb;
> +	struct drm_framebuffer *drm_fb;
>  
>  #ifdef CONFIG_DRM_I915_FBDEV
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> @@ -1874,7 +1875,8 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
>  #endif
>  
>  	mutex_lock(&dev->mode_config.fb_lock);
> -	list_for_each_entry(fb, &dev->mode_config.fb_list, base.head) {
> +	drm_for_each_plane(drm_fb, dev) {
                     ^^^^^

That's no fb.

> +		fb = to_intel_framebuffer(drm_fb);
>  		if (ifbdev && &fb->base == ifbdev->helper.fb)
>  			continue;
>  
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 053adbb97037..60eebf5f6da8 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1855,6 +1855,7 @@  static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
 	struct drm_device *dev = node->minor->dev;
 	struct intel_fbdev *ifbdev = NULL;
 	struct intel_framebuffer *fb;
+	struct drm_framebuffer *drm_fb;
 
 #ifdef CONFIG_DRM_I915_FBDEV
 	struct drm_i915_private *dev_priv = dev->dev_private;
@@ -1874,7 +1875,8 @@  static int i915_gem_framebuffer_info(struct seq_file *m, void *data)
 #endif
 
 	mutex_lock(&dev->mode_config.fb_lock);
-	list_for_each_entry(fb, &dev->mode_config.fb_list, base.head) {
+	drm_for_each_plane(drm_fb, dev) {
+		fb = to_intel_framebuffer(drm_fb);
 		if (ifbdev && &fb->base == ifbdev->helper.fb)
 			continue;