--- initial
+++ final
@@ -1,99 +1,99 @@
 static int psbfb_create(struct psb_fbdev *fbdev, struct drm_fb_helper_surface_size *sizes) {
   struct drm_device *dev = fbdev->psb_fb_helper.dev;
   struct drm_psb_private *dev_priv = dev->dev_private;
   struct fb_info *info;
   struct drm_framebuffer *fb;
   struct psb_framebuffer *psbfb = &fbdev->pfb;
   struct drm_mode_fb_cmd2 mode_cmd;
   int size;
   int ret;
   struct gtt_range *backing;
   u32 bpp, depth;
   int gtt_roll = 0;
   int pitch_lines = 0;
   mode_cmd.width = sizes->surface_width;
   mode_cmd.height = sizes->surface_height;
   bpp = sizes->surface_bpp;
   depth = sizes->surface_depth;
   /* No 24bit packed */
   if (bpp == 24) bpp = 32;
   do {
     /*
      * Acceleration via the GTT requires pitch to be
      * power of two aligned. Preferably page but less
      * is ok with some fonts
      */
     mode_cmd.pitches[0] = ALIGN(mode_cmd.width * ((bpp + 7) / 8), 4096 >> pitch_lines);
     size = mode_cmd.pitches[0] * mode_cmd.height;
     size = ALIGN(size, PAGE_SIZE);
     /* Allocate the fb in the GTT with stolen page backing */
     backing = psbfb_alloc(dev, size);
     if (pitch_lines)
       pitch_lines *= 2;
     else
       pitch_lines = 1;
     gtt_roll++;
   } while (backing == NULL && pitch_lines <= 16);
   /* The final pitch we accepted if we succeeded */
   pitch_lines /= 2;
   if (backing == NULL) {
     /*
      *	We couldn't get the space we wanted, fall back to the
      *	display engine requirement instead.  The HW requires
      *	the pitch to be 64 byte aligned
      */
     gtt_roll = 0; /* Don't use GTT accelerated scrolling */
     pitch_lines = 64;
     mode_cmd.pitches[0] = ALIGN(mode_cmd.width * ((bpp + 7) / 8), 64);
     size = mode_cmd.pitches[0] * mode_cmd.height;
     size = ALIGN(size, PAGE_SIZE);
     /* Allocate the framebuffer in the GTT with stolen page backing */
     backing = psbfb_alloc(dev, size);
     if (backing == NULL) return -ENOMEM;
   }
   memset(dev_priv->vram_addr + backing->offset, 0, size);
   info = drm_fb_helper_alloc_fbi(&fbdev->psb_fb_helper);
   if (IS_ERR(info)) {
     ret = PTR_ERR(info);
     goto err_free_range;
   }
   info->par = fbdev;
   mode_cmd.pixel_format = drm_mode_legacy_fb_format(bpp, depth);
   ret = psb_framebuffer_init(dev, psbfb, &mode_cmd, backing);
   if (ret) goto err_release;
   fb = &psbfb->base;
   psbfb->fbdev = info;
   fbdev->psb_fb_helper.fb = fb;
-  drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
+  drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
   strcpy(info->fix.id, "psbdrmfb");
   info->flags = FBINFO_DEFAULT;
   if (dev_priv->ops->accel_2d && pitch_lines > 8) /* 2D engine */
     info->fbops = &psbfb_ops;
   else if (gtt_roll) { /* GTT rolling seems best */
     info->fbops = &psbfb_roll_ops;
     info->flags |= FBINFO_HWACCEL_YPAN;
   } else /* Software */
     info->fbops = &psbfb_unaccel_ops;
   info->fix.smem_start = dev->mode_config.fb_base;
   info->fix.smem_len = size;
   info->fix.ywrapstep = gtt_roll;
   info->fix.ypanstep = 0;
   /* Accessed stolen memory directly */
   info->screen_base = dev_priv->vram_addr + backing->offset;
   info->screen_size = size;
   if (dev_priv->gtt.stolen_size) {
     info->apertures->ranges[0].base = dev->mode_config.fb_base;
     info->apertures->ranges[0].size = dev_priv->gtt.stolen_size;
   }
   drm_fb_helper_fill_var(info, &fbdev->psb_fb_helper, sizes->fb_width, sizes->fb_height);
   info->fix.mmio_start = pci_resource_start(dev->pdev, 0);
   info->fix.mmio_len = pci_resource_len(dev->pdev, 0);
   /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
   dev_dbg(dev->dev, "allocated %dx%d fb\n", psbfb->base.width, psbfb->base.height);
   return 0;
 err_release:
   drm_fb_helper_release_fbi(&fbdev->psb_fb_helper);
 err_free_range:
   psb_gtt_free_range(dev, backing);
   return ret;
 }<sep>@@
struct drm_framebuffer *fb;
@@
- fb->depth
+ fb->format->depth

@@
struct drm_framebuffer *fb;
@@
- (fb->format->depth)
+ fb->format->depth