summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_state.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-03-20 14:36:04 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-05-24 16:31:45 +1000
commitc6b7e89582bdb028e1b1763197ff24c77a43e1b0 (patch)
treee3fcb3794462c02758f253183d80ec9fa69c4d56 /drivers/gpu/drm/nouveau/nouveau_state.c
parentf1c65e7c7fb7e109290e969ad17f08c45993b41c (diff)
drm/nve0/ttm: implement buffer moves with weirdo pcopy-on-pgraph methods
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_state.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_state.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
index 2dd7187b08d3..78fb2cbeea23 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -657,6 +657,20 @@ nouveau_card_channel_init(struct drm_device *dev)
BEGIN_NVC0(chan, 2, NvSubM2MF, 0x0000, 1);
OUT_RING (chan, 0x00009039);
+ } else
+ if (dev_priv->card_type <= NV_E0) {
+ /* not used, but created to get a graph context */
+ ret = nouveau_gpuobj_gr_new(chan, 0xa040, 0xa040);
+ if (ret)
+ goto error;
+
+ /* bind strange copy engine to subchannel 4 (fixed...) */
+ ret = RING_SPACE(chan, 2);
+ if (ret)
+ goto error;
+
+ BEGIN_NVC0(chan, 2, NvSubCopy, 0x0000, 1);
+ OUT_RING (chan, 0x0000a0b5);
}
FIRE_RING (chan);