--- initial
+++ final
@@ -1,75 +1,75 @@
 static int radeonfb_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
   struct radeon_fbdev *rfbdev = container_of(helper, struct radeon_fbdev, helper);
   struct radeon_device *rdev = rfbdev->rdev;
   struct fb_info *info;
   struct drm_framebuffer *fb = NULL;
   struct drm_mode_fb_cmd2 mode_cmd;
   struct drm_gem_object *gobj = NULL;
   struct radeon_bo *rbo = NULL;
   int ret;
   unsigned long tmp;
   mode_cmd.width = sizes->surface_width;
   mode_cmd.height = sizes->surface_height;
   /* avivo can't scanout real 24bpp */
   if ((sizes->surface_bpp == 24) && ASIC_IS_AVIVO(rdev)) sizes->surface_bpp = 32;
   mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth);
   ret = radeonfb_create_pinned_object(rfbdev, &mode_cmd, &gobj);
   if (ret) {
     DRM_ERROR("failed to create fbcon object %d\n", ret);
     return ret;
   }
   rbo = gem_to_radeon_bo(gobj);
   /* okay we have an object now allocate the framebuffer */
   info = drm_fb_helper_alloc_fbi(helper);
   if (IS_ERR(info)) {
     ret = PTR_ERR(info);
     goto out_unref;
   }
   info->par = rfbdev;
   info->skip_vt_switch = true;
   ret = radeon_framebuffer_init(rdev->ddev, &rfbdev->rfb, &mode_cmd, gobj);
   if (ret) {
     DRM_ERROR("failed to initialize framebuffer %d\n", ret);
     goto out_destroy_fbi;
   }
   fb = &rfbdev->rfb.base;
   /* setup helper */
   rfbdev->helper.fb = fb;
   memset_io(rbo->kptr, 0x0, radeon_bo_size(rbo));
   strcpy(info->fix.id, "radeondrmfb");
-  drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth);
+  drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
   info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT;
   info->fbops = &radeonfb_ops;
   tmp = radeon_bo_gpu_offset(rbo) - rdev->mc.vram_start;
   info->fix.smem_start = rdev->mc.aper_base + tmp;
   info->fix.smem_len = radeon_bo_size(rbo);
   info->screen_base = rbo->kptr;
   info->screen_size = radeon_bo_size(rbo);
   drm_fb_helper_fill_var(info, &rfbdev->helper, sizes->fb_width, sizes->fb_height);
   /* setup aperture base/size for vesafb takeover */
   info->apertures->ranges[0].base = rdev->ddev->mode_config.fb_base;
   info->apertures->ranges[0].size = rdev->mc.aper_size;
   /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
   if (info->screen_base == NULL) {
     ret = -ENOSPC;
     goto out_destroy_fbi;
   }
   DRM_INFO("fb mappable at 0x%lX\n", info->fix.smem_start);
   DRM_INFO("vram apper at 0x%lX\n", (unsigned long)rdev->mc.aper_base);
   DRM_INFO("size %lu\n", (unsigned long)radeon_bo_size(rbo));
-  DRM_INFO("fb depth is %d\n", fb->depth);
+  DRM_INFO("fb depth is %d\n", fb->format->depth);
   DRM_INFO("   pitch is %d\n", fb->pitches[0]);
   vga_switcheroo_client_fb_set(rdev->ddev->pdev, info);
   return 0;
 out_destroy_fbi:
   drm_fb_helper_release_fbi(helper);
 out_unref:
   if (rbo) {}
   if (fb && ret) {
     drm_gem_object_unreference_unlocked(gobj);
     drm_framebuffer_unregister_private(fb);
     drm_framebuffer_cleanup(fb);
     kfree(fb);
   }
   return ret;
 }<sep>@@
struct drm_framebuffer *fb;
@@
- fb->depth
+ fb->format->depth

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