--- initial
+++ final
@@ -1,80 +1,80 @@
 static int nouveau_fbcon_create(struct drm_fb_helper *helper, struct drm_fb_helper_surface_size *sizes) {
   struct nouveau_fbdev *fbcon = container_of(helper, struct nouveau_fbdev, helper);
   struct drm_device *dev = fbcon->helper.dev;
   struct nouveau_drm *drm = nouveau_drm(dev);
   struct nvif_device *device = &drm->device;
   struct fb_info *info;
   struct nouveau_framebuffer *fb;
   struct nouveau_channel *chan;
   struct nouveau_bo *nvbo;
   struct drm_mode_fb_cmd2 mode_cmd;
   int ret;
   mode_cmd.width = sizes->surface_width;
   mode_cmd.height = sizes->surface_height;
   mode_cmd.pitches[0] = mode_cmd.width * (sizes->surface_bpp >> 3);
   mode_cmd.pitches[0] = roundup(mode_cmd.pitches[0], 256);
   mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth);
   ret = nouveau_gem_new(dev, mode_cmd.pitches[0] * mode_cmd.height, 0, NOUVEAU_GEM_DOMAIN_VRAM, 0, 0x0000, &nvbo);
   if (ret) {
     NV_ERROR(drm, "failed to allocate framebuffer\n");
     goto out;
   }
   ret = nouveau_framebuffer_new(dev, &mode_cmd, nvbo, &fb);
   if (ret) goto out_unref;
   ret = nouveau_bo_pin(nvbo, TTM_PL_FLAG_VRAM, false);
   if (ret) {
     NV_ERROR(drm, "failed to pin fb: %d\n", ret);
     goto out_unref;
   }
   ret = nouveau_bo_map(nvbo);
   if (ret) {
     NV_ERROR(drm, "failed to map fb: %d\n", ret);
     goto out_unpin;
   }
   chan = nouveau_nofbaccel ? NULL : drm->channel;
   if (chan && device->info.family >= NV_DEVICE_INFO_V0_TESLA) {
     ret = nouveau_bo_vma_add(nvbo, drm->client.vm, &fb->vma);
     if (ret) {
       NV_ERROR(drm, "failed to map fb into chan: %d\n", ret);
       chan = NULL;
     }
   }
   info = drm_fb_helper_alloc_fbi(helper);
   if (IS_ERR(info)) {
     ret = PTR_ERR(info);
     goto out_unlock;
   }
   info->skip_vt_switch = 1;
   info->par = fbcon;
   /* setup helper */
   fbcon->helper.fb = &fb->base;
   strcpy(info->fix.id, "nouveaufb");
   if (!chan)
     info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_DISABLED;
   else
     info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA | FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_IMAGEBLIT;
   info->flags |= FBINFO_CAN_FORCE_OUTPUT;
   info->fbops = &nouveau_fbcon_sw_ops;
   info->fix.smem_start = fb->nvbo->bo.mem.bus.base + fb->nvbo->bo.mem.bus.offset;
   info->fix.smem_len = fb->nvbo->bo.mem.num_pages << PAGE_SHIFT;
   info->screen_base = nvbo_kmap_obj_iovirtual(fb->nvbo);
   info->screen_size = fb->nvbo->bo.mem.num_pages << PAGE_SHIFT;
-  drm_fb_helper_fill_fix(info, fb->base.pitches[0], fb->base.depth);
+  drm_fb_helper_fill_fix(info, fb->base.pitches[0], fb->base.format->depth);
   drm_fb_helper_fill_var(info, &fbcon->helper, sizes->fb_width, sizes->fb_height);
   /* Use default scratch pixmap (info->pixmap.flags = FB_PIXMAP_SYSTEM) */
   if (chan) nouveau_fbcon_accel_init(dev);
   nouveau_fbcon_zfill(dev, fbcon);
   /* To allow resizeing without swapping buffers */
   NV_INFO(drm, "allocated %dx%d fb: 0x%llx, bo %p\n", fb->base.width, fb->base.height, fb->nvbo->bo.offset, nvbo);
   vga_switcheroo_client_fb_set(dev->pdev, info);
   return 0;
 out_unlock:
   if (chan) nouveau_bo_vma_del(fb->nvbo, &fb->vma);
   nouveau_bo_unmap(fb->nvbo);
 out_unpin:
   nouveau_bo_unpin(fb->nvbo);
 out_unref:
   nouveau_bo_ref(NULL, &fb->nvbo);
 out:
   return ret;
 }<sep>@@
struct nouveau_framebuffer *fb;
@@
- fb->base.depth
+ fb->base.format->depth