Merge tag 'v3.2-rc6' of /home/airlied/devel/kernel/linux-2.6 into drm-core-next
[pandora-kernel.git] / drivers / gpu / drm / nouveau / nouveau_display.c
index b12fd2c..7e88cd7 100644 (file)
@@ -64,7 +64,7 @@ static const struct drm_framebuffer_funcs nouveau_framebuffer_funcs = {
 int
 nouveau_framebuffer_init(struct drm_device *dev,
                         struct nouveau_framebuffer *nv_fb,
-                        struct drm_mode_fb_cmd *mode_cmd,
+                        struct drm_mode_fb_cmd2 *mode_cmd,
                         struct nouveau_bo *nvbo)
 {
        struct drm_nouveau_private *dev_priv = dev->dev_private;
@@ -107,14 +107,14 @@ nouveau_framebuffer_init(struct drm_device *dev,
 
                if (!tile_flags) {
                        if (dev_priv->card_type < NV_D0)
-                               nv_fb->r_pitch = 0x00100000 | fb->pitch;
+                               nv_fb->r_pitch = 0x00100000 | fb->pitches[0];
                        else
-                               nv_fb->r_pitch = 0x01000000 | fb->pitch;
+                               nv_fb->r_pitch = 0x01000000 | fb->pitches[0];
                } else {
                        u32 mode = nvbo->tile_mode;
                        if (dev_priv->card_type >= NV_C0)
                                mode >>= 4;
-                       nv_fb->r_pitch = ((fb->pitch / 4) << 4) | mode;
+                       nv_fb->r_pitch = ((fb->pitches[0] / 4) << 4) | mode;
                }
        }
 
@@ -124,13 +124,13 @@ nouveau_framebuffer_init(struct drm_device *dev,
 static struct drm_framebuffer *
 nouveau_user_framebuffer_create(struct drm_device *dev,
                                struct drm_file *file_priv,
-                               struct drm_mode_fb_cmd *mode_cmd)
+                               struct drm_mode_fb_cmd2 *mode_cmd)
 {
        struct nouveau_framebuffer *nouveau_fb;
        struct drm_gem_object *gem;
        int ret;
 
-       gem = drm_gem_object_lookup(dev, file_priv, mode_cmd->handle);
+       gem = drm_gem_object_lookup(dev, file_priv, mode_cmd->handles[0]);
        if (!gem)
                return ERR_PTR(-ENOENT);
 
@@ -294,7 +294,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
        /* Initialize a page flip struct */
        *s = (struct nouveau_page_flip_state)
                { { }, event, nouveau_crtc(crtc)->index,
-                 fb->bits_per_pixel, fb->pitch, crtc->x, crtc->y,
+                 fb->bits_per_pixel, fb->pitches[0], crtc->x, crtc->y,
                  new_bo->bo.offset };
 
        /* Choose the channel the flip will be handled in */