drm: do not set fb_info->pixmap fields
authorSascha Hauer <s.hauer@pengutronix.de>
Mon, 6 Feb 2012 09:58:19 +0000 (10:58 +0100)
committerDave Airlie <airlied@redhat.com>
Thu, 9 Feb 2012 10:34:43 +0000 (10:34 +0000)
The drm drivers set the fb_info->pixmap fields without setting
fb_info->pixmap.addr. If this is not set the fb core will overwrite
these all fb_info->pixmap fields anyway, so there is not much point
in setting them in the first place.

[airlied: dropped nvidiafb piece - not mine]

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/gma500/framebuffer.c
drivers/gpu/drm/i915/intel_fb.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/radeon/radeon_fb.c
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c

index 78733b5fd3fbc07d29b1302b82ab2a21db55bb68..c1c4dc174fa27bb51245360b5db7f884d425e858 100644 (file)
@@ -507,11 +507,7 @@ static int psbfb_create(struct psb_fbdev *fbdev,
        info->fix.mmio_start = pci_resource_start(dev->pdev, 0);
        info->fix.mmio_len = pci_resource_len(dev->pdev, 0);
 
-       info->pixmap.size = 64 * 1024;
-       info->pixmap.buf_align = 8;
-       info->pixmap.access_align = 32;
-       info->pixmap.flags = FB_PIXMAP_SYSTEM;
-       info->pixmap.scan_align = 1;
+       /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
 
        dev_info(dev->dev, "allocated %dx%d fb\n",
                                        psbfb->base.width, psbfb->base.height);
index 571375a3eef4cb69e446ce5fa078cfbb28e49bae..2d8766978388d43316263fa542a31971b078b176 100644 (file)
@@ -152,11 +152,7 @@ static int intelfb_create(struct intel_fbdev *ifbdev,
        drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
        drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height);
 
-       info->pixmap.size = 64*1024;
-       info->pixmap.buf_align = 8;
-       info->pixmap.access_align = 32;
-       info->pixmap.flags = FB_PIXMAP_SYSTEM;
-       info->pixmap.scan_align = 1;
+       /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
 
        DRM_DEBUG_KMS("allocated %dx%d fb: 0x%08x, bo %p\n",
                      fb->width, fb->height,
index 9892218d7452b0deaa48ef03c46fb7bbecf9b372..8113e9201ed95e102c3e1b2579faecceea995d46 100644 (file)
@@ -381,11 +381,7 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
                goto out_unref;
        }
 
-       info->pixmap.size = 64*1024;
-       info->pixmap.buf_align = 8;
-       info->pixmap.access_align = 32;
-       info->pixmap.flags = FB_PIXMAP_SYSTEM;
-       info->pixmap.scan_align = 1;
+       /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
 
        mutex_unlock(&dev->struct_mutex);
 
index cf2bf35b56b8efea936066b469d3211dbe607de1..a5692d5f415d423075bc1b062200b2bb817afc59 100644 (file)
@@ -254,11 +254,7 @@ static int radeonfb_create(struct radeon_fbdev *rfbdev,
        info->apertures->ranges[0].base = rdev->ddev->mode_config.fb_base;
        info->apertures->ranges[0].size = rdev->mc.aper_size;
 
-       info->pixmap.size = 64*1024;
-       info->pixmap.buf_align = 8;
-       info->pixmap.access_align = 32;
-       info->pixmap.flags = FB_PIXMAP_SYSTEM;
-       info->pixmap.scan_align = 1;
+       /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
 
        if (info->screen_base == NULL) {
                ret = -ENOSPC;
index 34e51a1695b84f1d438431501f6df60598bbb79b..67f1d54b79b4f8acfb8a7a7c712ef0bc710e8fda 100644 (file)
@@ -515,19 +515,7 @@ int vmw_fb_init(struct vmw_private *vmw_priv)
        info->var.xres = initial_width;
        info->var.yres = initial_height;
 
-#if 0
-       info->pixmap.size = 64*1024;
-       info->pixmap.buf_align = 8;
-       info->pixmap.access_align = 32;
-       info->pixmap.flags = FB_PIXMAP_SYSTEM;
-       info->pixmap.scan_align = 1;
-#else
-       info->pixmap.size = 0;
-       info->pixmap.buf_align = 8;
-       info->pixmap.access_align = 32;
-       info->pixmap.flags = FB_PIXMAP_SYSTEM;
-       info->pixmap.scan_align = 1;
-#endif
+       /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
 
        info->apertures = alloc_apertures(1);
        if (!info->apertures) {