diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_display.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv04_crtc.c | 14 |
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 7687a77f01d..2531ef54c3e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c | |||
@@ -107,14 +107,14 @@ nouveau_framebuffer_init(struct drm_device *dev, | |||
107 | 107 | ||
108 | if (!tile_flags) { | 108 | if (!tile_flags) { |
109 | if (dev_priv->card_type < NV_D0) | 109 | if (dev_priv->card_type < NV_D0) |
110 | nv_fb->r_pitch = 0x00100000 | fb->pitch; | 110 | nv_fb->r_pitch = 0x00100000 | fb->pitches[0]; |
111 | else | 111 | else |
112 | nv_fb->r_pitch = 0x01000000 | fb->pitch; | 112 | nv_fb->r_pitch = 0x01000000 | fb->pitches[0]; |
113 | } else { | 113 | } else { |
114 | u32 mode = nvbo->tile_mode; | 114 | u32 mode = nvbo->tile_mode; |
115 | if (dev_priv->card_type >= NV_C0) | 115 | if (dev_priv->card_type >= NV_C0) |
116 | mode >>= 4; | 116 | mode >>= 4; |
117 | nv_fb->r_pitch = ((fb->pitch / 4) << 4) | mode; | 117 | nv_fb->r_pitch = ((fb->pitches[0] / 4) << 4) | mode; |
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
@@ -294,7 +294,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, | |||
294 | /* Initialize a page flip struct */ | 294 | /* Initialize a page flip struct */ |
295 | *s = (struct nouveau_page_flip_state) | 295 | *s = (struct nouveau_page_flip_state) |
296 | { { }, event, nouveau_crtc(crtc)->index, | 296 | { { }, event, nouveau_crtc(crtc)->index, |
297 | fb->bits_per_pixel, fb->pitch, crtc->x, crtc->y, | 297 | fb->bits_per_pixel, fb->pitches[0], crtc->x, crtc->y, |
298 | new_bo->bo.offset }; | 298 | new_bo->bo.offset }; |
299 | 299 | ||
300 | /* Choose the channel the flip will be handled in */ | 300 | /* Choose the channel the flip will be handled in */ |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index d663065181b..defffd14078 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c | |||
@@ -370,7 +370,7 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev, | |||
370 | info->screen_base = nvbo_kmap_obj_iovirtual(nouveau_fb->nvbo); | 370 | info->screen_base = nvbo_kmap_obj_iovirtual(nouveau_fb->nvbo); |
371 | info->screen_size = size; | 371 | info->screen_size = size; |
372 | 372 | ||
373 | drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); | 373 | drm_fb_helper_fill_fix(info, fb->pitches[0], fb->depth); |
374 | drm_fb_helper_fill_var(info, &nfbdev->helper, sizes->fb_width, sizes->fb_height); | 374 | drm_fb_helper_fill_var(info, &nfbdev->helper, sizes->fb_width, sizes->fb_height); |
375 | 375 | ||
376 | /* Set aperture base/size for vesafb takeover */ | 376 | /* Set aperture base/size for vesafb takeover */ |
diff --git a/drivers/gpu/drm/nouveau/nv04_crtc.c b/drivers/gpu/drm/nouveau/nv04_crtc.c index 5e45398a9e2..728d07584d3 100644 --- a/drivers/gpu/drm/nouveau/nv04_crtc.c +++ b/drivers/gpu/drm/nouveau/nv04_crtc.c | |||
@@ -364,7 +364,7 @@ nv_crtc_mode_set_vga(struct drm_crtc *crtc, struct drm_display_mode *mode) | |||
364 | regp->CRTC[NV_CIO_CR_VRE_INDEX] = 1 << 5 | XLATE(vertEnd, 0, NV_CIO_CR_VRE_3_0); | 364 | regp->CRTC[NV_CIO_CR_VRE_INDEX] = 1 << 5 | XLATE(vertEnd, 0, NV_CIO_CR_VRE_3_0); |
365 | regp->CRTC[NV_CIO_CR_VDE_INDEX] = vertDisplay; | 365 | regp->CRTC[NV_CIO_CR_VDE_INDEX] = vertDisplay; |
366 | /* framebuffer can be larger than crtc scanout area. */ | 366 | /* framebuffer can be larger than crtc scanout area. */ |
367 | regp->CRTC[NV_CIO_CR_OFFSET_INDEX] = fb->pitch / 8; | 367 | regp->CRTC[NV_CIO_CR_OFFSET_INDEX] = fb->pitches[0] / 8; |
368 | regp->CRTC[NV_CIO_CR_ULINE_INDEX] = 0x00; | 368 | regp->CRTC[NV_CIO_CR_ULINE_INDEX] = 0x00; |
369 | regp->CRTC[NV_CIO_CR_VBS_INDEX] = vertBlankStart; | 369 | regp->CRTC[NV_CIO_CR_VBS_INDEX] = vertBlankStart; |
370 | regp->CRTC[NV_CIO_CR_VBE_INDEX] = vertBlankEnd; | 370 | regp->CRTC[NV_CIO_CR_VBE_INDEX] = vertBlankEnd; |
@@ -377,9 +377,9 @@ nv_crtc_mode_set_vga(struct drm_crtc *crtc, struct drm_display_mode *mode) | |||
377 | 377 | ||
378 | /* framebuffer can be larger than crtc scanout area. */ | 378 | /* framebuffer can be larger than crtc scanout area. */ |
379 | regp->CRTC[NV_CIO_CRE_RPC0_INDEX] = | 379 | regp->CRTC[NV_CIO_CRE_RPC0_INDEX] = |
380 | XLATE(fb->pitch / 8, 8, NV_CIO_CRE_RPC0_OFFSET_10_8); | 380 | XLATE(fb->pitches[0] / 8, 8, NV_CIO_CRE_RPC0_OFFSET_10_8); |
381 | regp->CRTC[NV_CIO_CRE_42] = | 381 | regp->CRTC[NV_CIO_CRE_42] = |
382 | XLATE(fb->pitch / 8, 11, NV_CIO_CRE_42_OFFSET_11); | 382 | XLATE(fb->pitches[0] / 8, 11, NV_CIO_CRE_42_OFFSET_11); |
383 | regp->CRTC[NV_CIO_CRE_RPC1_INDEX] = mode->crtc_hdisplay < 1280 ? | 383 | regp->CRTC[NV_CIO_CRE_RPC1_INDEX] = mode->crtc_hdisplay < 1280 ? |
384 | MASK(NV_CIO_CRE_RPC1_LARGE) : 0x00; | 384 | MASK(NV_CIO_CRE_RPC1_LARGE) : 0x00; |
385 | regp->CRTC[NV_CIO_CRE_LSR_INDEX] = XLATE(horizBlankEnd, 6, NV_CIO_CRE_LSR_HBE_6) | | 385 | regp->CRTC[NV_CIO_CRE_LSR_INDEX] = XLATE(horizBlankEnd, 6, NV_CIO_CRE_LSR_HBE_6) | |
@@ -835,18 +835,18 @@ nv04_crtc_do_mode_set_base(struct drm_crtc *crtc, | |||
835 | NVWriteRAMDAC(dev, nv_crtc->index, NV_PRAMDAC_GENERAL_CONTROL, | 835 | NVWriteRAMDAC(dev, nv_crtc->index, NV_PRAMDAC_GENERAL_CONTROL, |
836 | regp->ramdac_gen_ctrl); | 836 | regp->ramdac_gen_ctrl); |
837 | 837 | ||
838 | regp->CRTC[NV_CIO_CR_OFFSET_INDEX] = drm_fb->pitch >> 3; | 838 | regp->CRTC[NV_CIO_CR_OFFSET_INDEX] = drm_fb->pitches[0] >> 3; |
839 | regp->CRTC[NV_CIO_CRE_RPC0_INDEX] = | 839 | regp->CRTC[NV_CIO_CRE_RPC0_INDEX] = |
840 | XLATE(drm_fb->pitch >> 3, 8, NV_CIO_CRE_RPC0_OFFSET_10_8); | 840 | XLATE(drm_fb->pitches[0] >> 3, 8, NV_CIO_CRE_RPC0_OFFSET_10_8); |
841 | regp->CRTC[NV_CIO_CRE_42] = | 841 | regp->CRTC[NV_CIO_CRE_42] = |
842 | XLATE(drm_fb->pitch / 8, 11, NV_CIO_CRE_42_OFFSET_11); | 842 | XLATE(drm_fb->pitches[0] / 8, 11, NV_CIO_CRE_42_OFFSET_11); |
843 | crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_RPC0_INDEX); | 843 | crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_RPC0_INDEX); |
844 | crtc_wr_cio_state(crtc, regp, NV_CIO_CR_OFFSET_INDEX); | 844 | crtc_wr_cio_state(crtc, regp, NV_CIO_CR_OFFSET_INDEX); |
845 | crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_42); | 845 | crtc_wr_cio_state(crtc, regp, NV_CIO_CRE_42); |
846 | 846 | ||
847 | /* Update the framebuffer location. */ | 847 | /* Update the framebuffer location. */ |
848 | regp->fb_start = nv_crtc->fb.offset & ~3; | 848 | regp->fb_start = nv_crtc->fb.offset & ~3; |
849 | regp->fb_start += (y * drm_fb->pitch) + (x * drm_fb->bits_per_pixel / 8); | 849 | regp->fb_start += (y * drm_fb->pitches[0]) + (x * drm_fb->bits_per_pixel / 8); |
850 | nv_set_crtc_base(dev, nv_crtc->index, regp->fb_start); | 850 | nv_set_crtc_base(dev, nv_crtc->index, regp->fb_start); |
851 | 851 | ||
852 | /* Update the arbitration parameters. */ | 852 | /* Update the arbitration parameters. */ |