summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-04-29 10:07:59 +1000
committerBen Skeggs <bskeggs@redhat.com>2013-04-29 10:08:25 +1000
commit653c95d60af0f7c19a1d2f3b76dd17bb169d9c9b (patch)
tree54831152cfae7c81ceaf32c1ffa78fd6e1a599be
parent6771424d79e541d2fa7253a582db3dc9108fd97d (diff)
downloadxorg-driver-xf86-video-nouveau-653c95d60af0f7c19a1d2f3b76dd17bb169d9c9b.tar.gz
nve0: explicitly ask kernel for copy2 object
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--src/nv_accel_common.c5
-rw-r--r--src/nv_proto.h1
-rw-r--r--src/nv_type.h1
-rw-r--r--src/nvc0_accel.c17
4 files changed, 22 insertions, 2 deletions
diff --git a/src/nv_accel_common.c b/src/nv_accel_common.c
index b06fe0c..18e6a2f 100644
--- a/src/nv_accel_common.c
+++ b/src/nv_accel_common.c
@@ -649,8 +649,10 @@ NVAccelCommonInit(ScrnInfoPtr pScrn)
else
if (pNv->Architecture < NV_ARCH_E0)
INIT_CONTEXT_OBJECT(M2MF_NVC0);
- else
+ else {
INIT_CONTEXT_OBJECT(P2MF_NVE0);
+ INIT_CONTEXT_OBJECT(COPY_NVE0);
+ }
/* 3D init */
switch (pNv->Architecture) {
@@ -702,6 +704,7 @@ void NVAccelFree(ScrnInfoPtr pScrn)
nouveau_object_del(&pNv->NvMemFormat);
nouveau_object_del(&pNv->NvSW);
nouveau_object_del(&pNv->Nv3D);
+ nouveau_object_del(&pNv->NvCOPY);
nouveau_bo_ref(NULL, &pNv->scratch);
}
diff --git a/src/nv_proto.h b/src/nv_proto.h
index bcf927d..a573269 100644
--- a/src/nv_proto.h
+++ b/src/nv_proto.h
@@ -153,6 +153,7 @@ void NVC0SyncToVBlank(PixmapPtr ppix, BoxPtr box);
Bool NVAccelInitM2MF_NVC0(ScrnInfoPtr pScrn);
Bool NVAccelInitCopy_NVC0(ScrnInfoPtr pScrn);
Bool NVAccelInitP2MF_NVE0(ScrnInfoPtr pScrn);
+Bool NVAccelInitCOPY_NVE0(ScrnInfoPtr pScrn);
Bool NVAccelInit2D_NVC0(ScrnInfoPtr pScrn);
Bool NVAccelInit3D_NVC0(ScrnInfoPtr pScrn);
diff --git a/src/nv_type.h b/src/nv_type.h
index ed21c6d..8aabe77 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -103,6 +103,7 @@ typedef struct _NVRec {
struct nouveau_object *Nv2D;
struct nouveau_object *Nv3D;
struct nouveau_object *NvSW;
+ struct nouveau_object *NvCOPY;
struct nouveau_bo *scratch;
Bool ce_enabled;
diff --git a/src/nvc0_accel.c b/src/nvc0_accel.c
index 406bc59..4b3745f 100644
--- a/src/nvc0_accel.c
+++ b/src/nvc0_accel.c
@@ -121,8 +121,23 @@ NVAccelInitP2MF_NVE0(ScrnInfoPtr pScrn)
BEGIN_NVC0(push, NV01_SUBC(P2MF, OBJECT), 1);
PUSH_DATA (push, pNv->NvMemFormat->handle);
+ return TRUE;
+}
+
+Bool
+NVAccelInitCOPY_NVE0(ScrnInfoPtr pScrn)
+{
+ NVPtr pNv = NVPTR(pScrn);
+ struct nouveau_pushbuf *push = pNv->pushbuf;
+ int ret;
+
+ ret = nouveau_object_new(pNv->channel, 0x0000a0b5, 0xa0b5,
+ NULL, 0, &pNv->NvCOPY);
+ if (ret)
+ return FALSE;
+
BEGIN_NVC0(push, NV01_SUBC(COPY, OBJECT), 1);
- PUSH_DATA (push, 0x0000a0b5);
+ PUSH_DATA (push, pNv->NvCOPY->handle);
return TRUE;
}