diff options
author | Dave Airlie <airlied@redhat.com> | 2014-12-01 19:58:33 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-12-01 19:58:33 -0500 |
commit | e8115e79aa62b6ebdb3e8e61ca4092cc32938afc (patch) | |
tree | 42b791ab54ef9d5c73dcd49f907b8b37fa2f7e19 /drivers/gpu/drm/nouveau/nv50_display.c | |
parent | 9be23ae4350bfd71c0cc2ea3494671ee90e5603b (diff) | |
parent | 009d0431c3914de64666bec0d350e54fdd59df6a (diff) |
Merge tag 'v3.18-rc7' into drm-next
This fixes a bunch of conflicts prior to merging i915 tree.
Linux 3.18-rc7
Conflicts:
drivers/gpu/drm/exynos/exynos_drm_drv.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_pm.c
drivers/gpu/drm/tegra/dc.c
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_display.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_display.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index 76b8c4f980ea..5beae7596f62 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c | |||
@@ -792,6 +792,22 @@ nv50_crtc_set_scale(struct nouveau_crtc *nv_crtc, bool update) | |||
792 | } | 792 | } |
793 | 793 | ||
794 | static int | 794 | static int |
795 | nv50_crtc_set_raster_vblank_dmi(struct nouveau_crtc *nv_crtc, u32 usec) | ||
796 | { | ||
797 | struct nv50_mast *mast = nv50_mast(nv_crtc->base.dev); | ||
798 | u32 *push; | ||
799 | |||
800 | push = evo_wait(mast, 8); | ||
801 | if (!push) | ||
802 | return -ENOMEM; | ||
803 | |||
804 | evo_mthd(push, 0x0828 + (nv_crtc->index * 0x400), 1); | ||
805 | evo_data(push, usec); | ||
806 | evo_kick(push, mast); | ||
807 | return 0; | ||
808 | } | ||
809 | |||
810 | static int | ||
795 | nv50_crtc_set_color_vibrance(struct nouveau_crtc *nv_crtc, bool update) | 811 | nv50_crtc_set_color_vibrance(struct nouveau_crtc *nv_crtc, bool update) |
796 | { | 812 | { |
797 | struct nv50_mast *mast = nv50_mast(nv_crtc->base.dev); | 813 | struct nv50_mast *mast = nv50_mast(nv_crtc->base.dev); |
@@ -1105,14 +1121,14 @@ nv50_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *umode, | |||
1105 | evo_mthd(push, 0x0804 + (nv_crtc->index * 0x400), 2); | 1121 | evo_mthd(push, 0x0804 + (nv_crtc->index * 0x400), 2); |
1106 | evo_data(push, 0x00800000 | mode->clock); | 1122 | evo_data(push, 0x00800000 | mode->clock); |
1107 | evo_data(push, (ilace == 2) ? 2 : 0); | 1123 | evo_data(push, (ilace == 2) ? 2 : 0); |
1108 | evo_mthd(push, 0x0810 + (nv_crtc->index * 0x400), 8); | 1124 | evo_mthd(push, 0x0810 + (nv_crtc->index * 0x400), 6); |
1109 | evo_data(push, 0x00000000); | 1125 | evo_data(push, 0x00000000); |
1110 | evo_data(push, (vactive << 16) | hactive); | 1126 | evo_data(push, (vactive << 16) | hactive); |
1111 | evo_data(push, ( vsynce << 16) | hsynce); | 1127 | evo_data(push, ( vsynce << 16) | hsynce); |
1112 | evo_data(push, (vblanke << 16) | hblanke); | 1128 | evo_data(push, (vblanke << 16) | hblanke); |
1113 | evo_data(push, (vblanks << 16) | hblanks); | 1129 | evo_data(push, (vblanks << 16) | hblanks); |
1114 | evo_data(push, (vblan2e << 16) | vblan2s); | 1130 | evo_data(push, (vblan2e << 16) | vblan2s); |
1115 | evo_data(push, vblankus); | 1131 | evo_mthd(push, 0x082c + (nv_crtc->index * 0x400), 1); |
1116 | evo_data(push, 0x00000000); | 1132 | evo_data(push, 0x00000000); |
1117 | evo_mthd(push, 0x0900 + (nv_crtc->index * 0x400), 2); | 1133 | evo_mthd(push, 0x0900 + (nv_crtc->index * 0x400), 2); |
1118 | evo_data(push, 0x00000311); | 1134 | evo_data(push, 0x00000311); |
@@ -1142,6 +1158,11 @@ nv50_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *umode, | |||
1142 | nv_connector = nouveau_crtc_connector_get(nv_crtc); | 1158 | nv_connector = nouveau_crtc_connector_get(nv_crtc); |
1143 | nv50_crtc_set_dither(nv_crtc, false); | 1159 | nv50_crtc_set_dither(nv_crtc, false); |
1144 | nv50_crtc_set_scale(nv_crtc, false); | 1160 | nv50_crtc_set_scale(nv_crtc, false); |
1161 | |||
1162 | /* G94 only accepts this after setting scale */ | ||
1163 | if (nv50_vers(mast) < GF110_DISP_CORE_CHANNEL_DMA) | ||
1164 | nv50_crtc_set_raster_vblank_dmi(nv_crtc, vblankus); | ||
1165 | |||
1145 | nv50_crtc_set_color_vibrance(nv_crtc, false); | 1166 | nv50_crtc_set_color_vibrance(nv_crtc, false); |
1146 | nv50_crtc_set_image(nv_crtc, crtc->primary->fb, x, y, false); | 1167 | nv50_crtc_set_image(nv_crtc, crtc->primary->fb, x, y, false); |
1147 | return 0; | 1168 | return 0; |