diff options
| author | Ben Skeggs <bskeggs@redhat.com> | 2012-03-04 19:05:45 -0500 |
|---|---|---|
| committer | Ben Skeggs <bskeggs@redhat.com> | 2012-03-22 10:21:14 -0400 |
| commit | e592c73b91e9dfc7403fe41f649dd18593805ccd (patch) | |
| tree | 7d9db6cd6b8264f7daf5b0fce941003ef53660e8 /drivers/gpu/drm/nouveau | |
| parent | 68455a43debe26dd1d2a42c0b67dd5697c201420 (diff) | |
drm/nve0/disp: nvidia randomly decided to move the dithering method
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
| -rw-r--r-- | drivers/gpu/drm/nouveau/nvd0_display.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c index 421d301b3797..d69642da8b56 100644 --- a/drivers/gpu/drm/nouveau/nvd0_display.c +++ b/drivers/gpu/drm/nouveau/nvd0_display.c | |||
| @@ -363,10 +363,12 @@ nvd0_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb, | |||
| 363 | static int | 363 | static int |
| 364 | nvd0_crtc_set_dither(struct nouveau_crtc *nv_crtc, bool update) | 364 | nvd0_crtc_set_dither(struct nouveau_crtc *nv_crtc, bool update) |
| 365 | { | 365 | { |
| 366 | struct drm_nouveau_private *dev_priv = nv_crtc->base.dev->dev_private; | ||
| 366 | struct drm_device *dev = nv_crtc->base.dev; | 367 | struct drm_device *dev = nv_crtc->base.dev; |
| 367 | struct nouveau_connector *nv_connector; | 368 | struct nouveau_connector *nv_connector; |
| 368 | struct drm_connector *connector; | 369 | struct drm_connector *connector; |
| 369 | u32 *push, mode = 0x00; | 370 | u32 *push, mode = 0x00; |
| 371 | u32 mthd; | ||
| 370 | 372 | ||
| 371 | nv_connector = nouveau_crtc_connector_get(nv_crtc); | 373 | nv_connector = nouveau_crtc_connector_get(nv_crtc); |
| 372 | connector = &nv_connector->base; | 374 | connector = &nv_connector->base; |
| @@ -384,9 +386,14 @@ nvd0_crtc_set_dither(struct nouveau_crtc *nv_crtc, bool update) | |||
| 384 | mode |= nv_connector->dithering_depth; | 386 | mode |= nv_connector->dithering_depth; |
| 385 | } | 387 | } |
| 386 | 388 | ||
| 389 | if (dev_priv->card_type < NV_E0) | ||
| 390 | mthd = 0x0490 + (nv_crtc->index * 0x0300); | ||
| 391 | else | ||
| 392 | mthd = 0x04a0 + (nv_crtc->index * 0x0300); | ||
| 393 | |||
| 387 | push = evo_wait(dev, EVO_MASTER, 4); | 394 | push = evo_wait(dev, EVO_MASTER, 4); |
| 388 | if (push) { | 395 | if (push) { |
| 389 | evo_mthd(push, 0x0490 + (nv_crtc->index * 0x300), 1); | 396 | evo_mthd(push, mthd, 1); |
| 390 | evo_data(push, mode); | 397 | evo_data(push, mode); |
| 391 | if (update) { | 398 | if (update) { |
| 392 | evo_mthd(push, 0x0080, 1); | 399 | evo_mthd(push, 0x0080, 1); |
