diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-07-07 19:43:20 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-09-20 02:07:18 -0400 |
commit | 629c1b9207386b00abd6453b72a19b15cd2202f8 (patch) | |
tree | 5bd9c189cd09eb26c9ce4ffee5477da6e515ca37 /drivers/gpu/drm/nouveau/nvd0_display.c | |
parent | f3fdc52dd73a083dcb80f95e5c6ce8a33277b102 (diff) |
drm/nvd0/disp: handle sync polarity, kill off some unknown
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvd0_display.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvd0_display.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c index d85b25939653..6720d63cfccc 100644 --- a/drivers/gpu/drm/nouveau/nvd0_display.c +++ b/drivers/gpu/drm/nouveau/nvd0_display.c | |||
@@ -352,11 +352,15 @@ nvd0_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *umode, | |||
352 | u32 vss2be = vsyncw + vbackp; | 352 | u32 vss2be = vsyncw + vbackp; |
353 | u32 hss2de = htotal - hfrntp; | 353 | u32 hss2de = htotal - hfrntp; |
354 | u32 vss2de = vtotal - vfrntp; | 354 | u32 vss2de = vtotal - vfrntp; |
355 | u32 hstart = 0; | 355 | u32 syncs, *push; |
356 | u32 vstart = 0; | ||
357 | u32 *push; | ||
358 | int ret; | 356 | int ret; |
359 | 357 | ||
358 | syncs = 0x00000001; | ||
359 | if (mode->flags & DRM_MODE_FLAG_NHSYNC) | ||
360 | syncs |= 0x00000008; | ||
361 | if (mode->flags & DRM_MODE_FLAG_NVSYNC) | ||
362 | syncs |= 0x00000010; | ||
363 | |||
360 | ret = nvd0_crtc_swap_fbs(crtc, old_fb); | 364 | ret = nvd0_crtc_swap_fbs(crtc, old_fb); |
361 | if (ret) | 365 | if (ret) |
362 | return ret; | 366 | return ret; |
@@ -364,7 +368,7 @@ nvd0_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *umode, | |||
364 | push = evo_wait(crtc->dev, 0, 64); | 368 | push = evo_wait(crtc->dev, 0, 64); |
365 | if (push) { | 369 | if (push) { |
366 | evo_mthd(push, 0x0410 + (nv_crtc->index * 0x300), 5); | 370 | evo_mthd(push, 0x0410 + (nv_crtc->index * 0x300), 5); |
367 | evo_data(push, (vstart << 16) | hstart); | 371 | evo_data(push, 0x00000000); |
368 | evo_data(push, (vtotal << 16) | htotal); | 372 | evo_data(push, (vtotal << 16) | htotal); |
369 | evo_data(push, (vsyncw << 16) | hsyncw); | 373 | evo_data(push, (vsyncw << 16) | hsyncw); |
370 | evo_data(push, (vss2be << 16) | hss2be); | 374 | evo_data(push, (vss2be << 16) | hss2be); |
@@ -375,8 +379,8 @@ nvd0_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *umode, | |||
375 | evo_data(push, mode->clock * 1000); | 379 | evo_data(push, mode->clock * 1000); |
376 | evo_data(push, 0x00200000); /* ??? */ | 380 | evo_data(push, 0x00200000); /* ??? */ |
377 | evo_data(push, mode->clock * 1000); | 381 | evo_data(push, mode->clock * 1000); |
378 | evo_mthd(push, 0x0408 + (nv_crtc->index * 0x300), 1); | 382 | evo_mthd(push, 0x0404 + (nv_crtc->index * 0x300), 1); |
379 | evo_data(push, 0x31ec6000); /* ??? */ | 383 | evo_data(push, syncs); |
380 | evo_kick(push, crtc->dev, 0); | 384 | evo_kick(push, crtc->dev, 0); |
381 | } | 385 | } |
382 | 386 | ||