gfx: drv: Move stolen vram iounmap() into gtt code
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 20 Mar 2012 14:46:22 +0000 (16:46 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:44 +0000 (12:30 +0300)
The stolen memory is ioremap()ed in gtt init. Move the iounmap to the
gtt takedown function instead of doing it from the fbdev compatibility
code.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/drv/psb_fb.c
drivers/staging/mrst/drv/psb_gtt.c

index 24265a6..036e60b 100644 (file)
@@ -529,7 +529,6 @@ static int psb_fbdev_destroy(struct drm_device * dev, struct psb_fbdev * fbdev)
        if(fbdev->psb_fb_helper.fbdev) {
                info = fbdev->psb_fb_helper.fbdev;
                unregister_framebuffer(info);
-               iounmap(info->screen_base);
                framebuffer_release(info);
        }
 
index 2025c9e..02a3d89 100644 (file)
@@ -68,6 +68,10 @@ void psb_gtt_takedown(struct psb_gtt *pg, int free)
                PSB_WVDC32(pg->pge_ctl, PSB_PGETBL_CTL);
                (void) PSB_RVDC32(PSB_PGETBL_CTL);
        }
+       if (pg->vram_addr) {
+               iounmap(pg->vram_addr);
+               pg->vram_addr = NULL;
+       }
        if (free)
                kfree(pg);
 }