drm/mm: fix dump table BUG
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 20 Apr 2013 10:08:11 +0000 (12:08 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 30 Apr 2013 13:15:58 +0000 (15:15 +0200)
commit3a359f0b21ab218c1bf7a6a1b638b6fd143d0b99
treef5458fb5ab44cd2058d432342a289de9bc21f7f7
parent4f42f4ef0dba0cf837b628ac33231a7acb8fcc9d
drm/mm: fix dump table BUG

In

commit 9e8944ab564f2e3dde90a518cd32048c58918608
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Nov 15 11:32:17 2012 +0000

    drm: Introduce an iterator over holes in the drm_mm range manager

helpers and iterators for hole handling have been introduced with some
debug BUG_ONs sprinkled over. Unfortunately this broke the mm dumper
which unconditionally tried to compute the size of the very first
hole.

While at it unify the code a bit with the hole dumping in the loop.

v2: Extract a hole dump helper.

Reported-by: Christopher Harvey <charvey@matrox.com>
Cc: Christopher Harvey <charvey@matrox.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@vger.kernel.org
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_mm.c