Merge branch 'fix/misc' into for-linus
[pandora-kernel.git] / drivers / gpu / drm / radeon / radeon_fb.c
index c39ddda..9ac57a0 100644 (file)
@@ -28,6 +28,7 @@
      */
 
 #include <linux/module.h>
+#include <linux/slab.h>
 #include <linux/fb.h>
 
 #include "drmP.h"
@@ -39,6 +40,8 @@
 
 #include "drm_fb_helper.h"
 
+#include <linux/vga_switcheroo.h>
+
 struct radeon_fb_device {
        struct drm_fb_helper helper;
        struct radeon_framebuffer       *rfb;
@@ -59,7 +62,7 @@ static struct fb_ops radeonfb_ops = {
 };
 
 /**
- * Curretly it is assumed that the old framebuffer is reused.
+ * Currently it is assumed that the old framebuffer is reused.
  *
  * LOCKING
  * caller should hold the mode config lock.
@@ -243,7 +246,7 @@ int radeonfb_create(struct drm_device *dev,
        if (ret)
                goto out_unref;
 
-       memset_io(fbptr, 0xff, aligned_size);
+       memset_io(fbptr, 0x0, aligned_size);
 
        strcpy(info->fix.id, "radeondrmfb");
 
@@ -286,6 +289,7 @@ int radeonfb_create(struct drm_device *dev,
        rfbdev->rdev = rdev;
 
        mutex_unlock(&rdev->ddev->struct_mutex);
+       vga_switcheroo_client_fb_set(rdev->ddev->pdev, info);
        return 0;
 
 out_unref: