diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_crtc.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_crtc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c index 56476d0c6de8..2c346f797285 100644 --- a/drivers/gpu/drm/nouveau/nv50_crtc.c +++ b/drivers/gpu/drm/nouveau/nv50_crtc.c | |||
@@ -345,7 +345,6 @@ nv50_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv, | |||
345 | uint32_t buffer_handle, uint32_t width, uint32_t height) | 345 | uint32_t buffer_handle, uint32_t width, uint32_t height) |
346 | { | 346 | { |
347 | struct drm_device *dev = crtc->dev; | 347 | struct drm_device *dev = crtc->dev; |
348 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
349 | struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); | 348 | struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); |
350 | struct nouveau_bo *cursor = NULL; | 349 | struct nouveau_bo *cursor = NULL; |
351 | struct drm_gem_object *gem; | 350 | struct drm_gem_object *gem; |
@@ -374,8 +373,7 @@ nv50_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv, | |||
374 | 373 | ||
375 | nouveau_bo_unmap(cursor); | 374 | nouveau_bo_unmap(cursor); |
376 | 375 | ||
377 | nv_crtc->cursor.set_offset(nv_crtc, nv_crtc->cursor.nvbo->bo.offset - | 376 | nv_crtc->cursor.set_offset(nv_crtc, nv_crtc->cursor.nvbo->bo.mem.start << PAGE_SHIFT); |
378 | dev_priv->vm_vram_base); | ||
379 | nv_crtc->cursor.show(nv_crtc, true); | 377 | nv_crtc->cursor.show(nv_crtc, true); |
380 | 378 | ||
381 | out: | 379 | out: |
@@ -437,6 +435,7 @@ static const struct drm_crtc_funcs nv50_crtc_funcs = { | |||
437 | .cursor_move = nv50_crtc_cursor_move, | 435 | .cursor_move = nv50_crtc_cursor_move, |
438 | .gamma_set = nv50_crtc_gamma_set, | 436 | .gamma_set = nv50_crtc_gamma_set, |
439 | .set_config = drm_crtc_helper_set_config, | 437 | .set_config = drm_crtc_helper_set_config, |
438 | .page_flip = nouveau_crtc_page_flip, | ||
440 | .destroy = nv50_crtc_destroy, | 439 | .destroy = nv50_crtc_destroy, |
441 | }; | 440 | }; |
442 | 441 | ||
@@ -453,6 +452,7 @@ nv50_crtc_prepare(struct drm_crtc *crtc) | |||
453 | 452 | ||
454 | NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index); | 453 | NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index); |
455 | 454 | ||
455 | drm_vblank_pre_modeset(dev, nv_crtc->index); | ||
456 | nv50_crtc_blank(nv_crtc, true); | 456 | nv50_crtc_blank(nv_crtc, true); |
457 | } | 457 | } |
458 | 458 | ||
@@ -468,6 +468,7 @@ nv50_crtc_commit(struct drm_crtc *crtc) | |||
468 | NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index); | 468 | NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index); |
469 | 469 | ||
470 | nv50_crtc_blank(nv_crtc, false); | 470 | nv50_crtc_blank(nv_crtc, false); |
471 | drm_vblank_post_modeset(dev, nv_crtc->index); | ||
471 | 472 | ||
472 | ret = RING_SPACE(evo, 2); | 473 | ret = RING_SPACE(evo, 2); |
473 | if (ret) { | 474 | if (ret) { |
@@ -545,7 +546,7 @@ nv50_crtc_do_mode_set_base(struct drm_crtc *crtc, | |||
545 | return -EINVAL; | 546 | return -EINVAL; |
546 | } | 547 | } |
547 | 548 | ||
548 | nv_crtc->fb.offset = fb->nvbo->bo.offset - dev_priv->vm_vram_base; | 549 | nv_crtc->fb.offset = fb->nvbo->bo.mem.start << PAGE_SHIFT; |
549 | nv_crtc->fb.tile_flags = nouveau_bo_tile_layout(fb->nvbo); | 550 | nv_crtc->fb.tile_flags = nouveau_bo_tile_layout(fb->nvbo); |
550 | nv_crtc->fb.cpp = drm_fb->bits_per_pixel / 8; | 551 | nv_crtc->fb.cpp = drm_fb->bits_per_pixel / 8; |
551 | if (!nv_crtc->fb.blanked && dev_priv->chipset != 0x50) { | 552 | if (!nv_crtc->fb.blanked && dev_priv->chipset != 0x50) { |