diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_crtc.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_crtc.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c index a19ccaa025b3..ebabacf38da9 100644 --- a/drivers/gpu/drm/nouveau/nv50_crtc.c +++ b/drivers/gpu/drm/nouveau/nv50_crtc.c | |||
@@ -286,7 +286,7 @@ nv50_crtc_set_clock(struct drm_device *dev, int head, int pclk) | |||
286 | nv_wr32(dev, pll.reg + 8, reg2 | (P << 28) | (M2 << 16) | N2); | 286 | nv_wr32(dev, pll.reg + 8, reg2 | (P << 28) | (M2 << 16) | N2); |
287 | } else | 287 | } else |
288 | if (dev_priv->chipset < NV_C0) { | 288 | if (dev_priv->chipset < NV_C0) { |
289 | ret = nv50_calc_pll2(dev, &pll, pclk, &N1, &N2, &M1, &P); | 289 | ret = nva3_calc_pll(dev, &pll, pclk, &N1, &N2, &M1, &P); |
290 | if (ret <= 0) | 290 | if (ret <= 0) |
291 | return 0; | 291 | return 0; |
292 | 292 | ||
@@ -298,7 +298,7 @@ nv50_crtc_set_clock(struct drm_device *dev, int head, int pclk) | |||
298 | nv_wr32(dev, pll.reg + 4, reg1 | (P << 16) | (M1 << 8) | N1); | 298 | nv_wr32(dev, pll.reg + 4, reg1 | (P << 16) | (M1 << 8) | N1); |
299 | nv_wr32(dev, pll.reg + 8, N2); | 299 | nv_wr32(dev, pll.reg + 8, N2); |
300 | } else { | 300 | } else { |
301 | ret = nv50_calc_pll2(dev, &pll, pclk, &N1, &N2, &M1, &P); | 301 | ret = nva3_calc_pll(dev, &pll, pclk, &N1, &N2, &M1, &P); |
302 | if (ret <= 0) | 302 | if (ret <= 0) |
303 | return 0; | 303 | return 0; |
304 | 304 | ||
@@ -349,14 +349,14 @@ nv50_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv, | |||
349 | struct drm_gem_object *gem; | 349 | struct drm_gem_object *gem; |
350 | int ret = 0, i; | 350 | int ret = 0, i; |
351 | 351 | ||
352 | if (width != 64 || height != 64) | ||
353 | return -EINVAL; | ||
354 | |||
355 | if (!buffer_handle) { | 352 | if (!buffer_handle) { |
356 | nv_crtc->cursor.hide(nv_crtc, true); | 353 | nv_crtc->cursor.hide(nv_crtc, true); |
357 | return 0; | 354 | return 0; |
358 | } | 355 | } |
359 | 356 | ||
357 | if (width != 64 || height != 64) | ||
358 | return -EINVAL; | ||
359 | |||
360 | gem = drm_gem_object_lookup(dev, file_priv, buffer_handle); | 360 | gem = drm_gem_object_lookup(dev, file_priv, buffer_handle); |
361 | if (!gem) | 361 | if (!gem) |
362 | return -ENOENT; | 362 | return -ENOENT; |
@@ -532,8 +532,7 @@ nv50_crtc_do_mode_set_base(struct drm_crtc *crtc, | |||
532 | if (atomic) { | 532 | if (atomic) { |
533 | drm_fb = passed_fb; | 533 | drm_fb = passed_fb; |
534 | fb = nouveau_framebuffer(passed_fb); | 534 | fb = nouveau_framebuffer(passed_fb); |
535 | } | 535 | } else { |
536 | else { | ||
537 | /* If not atomic, we can go ahead and pin, and unpin the | 536 | /* If not atomic, we can go ahead and pin, and unpin the |
538 | * old fb we were passed. | 537 | * old fb we were passed. |
539 | */ | 538 | */ |