aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2016-11-04 03:20:36 -0400
committerBen Skeggs <bskeggs@redhat.com>2016-11-06 23:04:55 -0500
commit06ab282f13210c80fc74f3ada981f62fca68e625 (patch)
tree5aebffad7b0fd34afb88856a945f79563dc04a67
parent7e08d67c5fe980f2b9d27a07a2325a35e5bb4759 (diff)
drm/nouveau/kms/nv50: separate out vblank dmi commit
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nv50_display.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 67a8b666f82d..b94bc744b8c9 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -1094,13 +1094,14 @@ nv50_head_mode(struct nv50_head *head, struct nv50_head_atom *asyh)
1094 evo_mthd(push, 0x0804 + (head->base.index * 0x400), 2); 1094 evo_mthd(push, 0x0804 + (head->base.index * 0x400), 2);
1095 evo_data(push, 0x00800000 | m->clock); 1095 evo_data(push, 0x00800000 | m->clock);
1096 evo_data(push, m->interlace ? 0x00000002 : 0x00000000); 1096 evo_data(push, m->interlace ? 0x00000002 : 0x00000000);
1097 evo_mthd(push, 0x0810 + (head->base.index * 0x400), 6); 1097 evo_mthd(push, 0x0810 + (head->base.index * 0x400), 7);
1098 evo_data(push, 0x00000000); 1098 evo_data(push, 0x00000000);
1099 evo_data(push, (m->v.active << 16) | m->h.active ); 1099 evo_data(push, (m->v.active << 16) | m->h.active );
1100 evo_data(push, (m->v.synce << 16) | m->h.synce ); 1100 evo_data(push, (m->v.synce << 16) | m->h.synce );
1101 evo_data(push, (m->v.blanke << 16) | m->h.blanke ); 1101 evo_data(push, (m->v.blanke << 16) | m->h.blanke );
1102 evo_data(push, (m->v.blanks << 16) | m->h.blanks ); 1102 evo_data(push, (m->v.blanks << 16) | m->h.blanks );
1103 evo_data(push, (m->v.blank2e << 16) | m->v.blank2s); 1103 evo_data(push, (m->v.blank2e << 16) | m->v.blank2s);
1104 evo_data(push, asyh->mode.v.blankus);
1104 evo_mthd(push, 0x082c + (head->base.index * 0x400), 1); 1105 evo_mthd(push, 0x082c + (head->base.index * 0x400), 1);
1105 evo_data(push, 0x00000000); 1106 evo_data(push, 0x00000000);
1106 } else { 1107 } else {
@@ -1481,22 +1482,6 @@ nv50_crtc_set_scale(struct nouveau_crtc *nv_crtc, bool update)
1481} 1482}
1482 1483
1483static int 1484static int
1484nv50_crtc_set_raster_vblank_dmi(struct nouveau_crtc *nv_crtc, u32 usec)
1485{
1486 struct nv50_mast *mast = nv50_mast(nv_crtc->base.dev);
1487 u32 *push;
1488
1489 push = evo_wait(mast, 8);
1490 if (!push)
1491 return -ENOMEM;
1492
1493 evo_mthd(push, 0x0828 + (nv_crtc->index * 0x400), 1);
1494 evo_data(push, usec);
1495 evo_kick(push, mast);
1496 return 0;
1497}
1498
1499static int
1500nv50_crtc_set_color_vibrance(struct nouveau_crtc *nv_crtc, bool update) 1485nv50_crtc_set_color_vibrance(struct nouveau_crtc *nv_crtc, bool update)
1501{ 1486{
1502 struct nv50_mast *mast = nv50_mast(nv_crtc->base.dev); 1487 struct nv50_mast *mast = nv50_mast(nv_crtc->base.dev);
@@ -1666,7 +1651,6 @@ nv50_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *umode,
1666 struct drm_display_mode *mode, int x, int y, 1651 struct drm_display_mode *mode, int x, int y,
1667 struct drm_framebuffer *old_fb) 1652 struct drm_framebuffer *old_fb)
1668{ 1653{
1669 struct nv50_mast *mast = nv50_mast(crtc->dev);
1670 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); 1654 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
1671 struct nouveau_connector *nv_connector; 1655 struct nouveau_connector *nv_connector;
1672 int ret; 1656 int ret;
@@ -1689,10 +1673,6 @@ nv50_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *umode,
1689 nv50_crtc_set_dither(nv_crtc, false); 1673 nv50_crtc_set_dither(nv_crtc, false);
1690 nv50_crtc_set_scale(nv_crtc, false); 1674 nv50_crtc_set_scale(nv_crtc, false);
1691 1675
1692 /* G94 only accepts this after setting scale */
1693 if (nv50_vers(mast) < GF110_DISP_CORE_CHANNEL_DMA)
1694 nv50_crtc_set_raster_vblank_dmi(nv_crtc, asyh->mode.v.blankus);
1695
1696 nv50_crtc_set_color_vibrance(nv_crtc, false); 1676 nv50_crtc_set_color_vibrance(nv_crtc, false);
1697 nv50_crtc_set_image(nv_crtc, crtc->primary->fb, x, y, false); 1677 nv50_crtc_set_image(nv_crtc, crtc->primary->fb, x, y, false);
1698 return 0; 1678 return 0;