summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:14 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:28 +1000
commit572fb13db2a9dc5336a4b769d60428bc9cff0af6 (patch)
treea30cdbde4dba8f854a7b25b2469506b733ff20e1
parent142ea05f49b9517929f8b27ee800160e7ebf3a02 (diff)
downloadop-kernel-dev-572fb13db2a9dc5336a4b769d60428bc9cff0af6.zip
op-kernel-dev-572fb13db2a9dc5336a4b769d60428bc9cff0af6.tar.gz
drm/nouveau/mpeg: switch to gpuobj accessor macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c10
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c4
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c19
3 files changed, 22 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c
index d4d1abb..1586213 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c
@@ -49,10 +49,12 @@ nv31_mpeg_object_ctor(struct nvkm_object *parent,
if (ret)
return ret;
- nv_wo32(obj, 0x00, nv_mclass(obj));
- nv_wo32(obj, 0x04, 0x00000000);
- nv_wo32(obj, 0x08, 0x00000000);
- nv_wo32(obj, 0x0c, 0x00000000);
+ nvkm_kmap(obj);
+ nvkm_wo32(obj, 0x00, nv_mclass(obj));
+ nvkm_wo32(obj, 0x04, 0x00000000);
+ nvkm_wo32(obj, 0x08, 0x00000000);
+ nvkm_wo32(obj, 0x0c, 0x00000000);
+ nvkm_done(obj);
return 0;
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c
index 9bd5fc1..9393667 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c
@@ -50,7 +50,9 @@ nv44_mpeg_context_ctor(struct nvkm_object *parent,
if (ret)
return ret;
- nv_wo32(&chan->base.base, 0x78, 0x02001ec1);
+ nvkm_kmap(&chan->base.base.gpuobj);
+ nvkm_wo32(&chan->base.base.gpuobj, 0x78, 0x02001ec1);
+ nvkm_done(&chan->base.base.gpuobj);
return 0;
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c
index 0a4ada7..6af707b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c
@@ -49,10 +49,12 @@ nv50_mpeg_object_ctor(struct nvkm_object *parent,
if (ret)
return ret;
- nv_wo32(obj, 0x00, nv_mclass(obj));
- nv_wo32(obj, 0x04, 0x00000000);
- nv_wo32(obj, 0x08, 0x00000000);
- nv_wo32(obj, 0x0c, 0x00000000);
+ nvkm_kmap(obj);
+ nvkm_wo32(obj, 0x00, nv_mclass(obj));
+ nvkm_wo32(obj, 0x04, 0x00000000);
+ nvkm_wo32(obj, 0x08, 0x00000000);
+ nvkm_wo32(obj, 0x0c, 0x00000000);
+ nvkm_done(obj);
return 0;
}
@@ -84,6 +86,7 @@ nv50_mpeg_context_ctor(struct nvkm_object *parent,
{
struct nvkm_bar *bar = nvkm_bar(parent);
struct nv50_mpeg_chan *chan;
+ struct nvkm_gpuobj *image;
int ret;
ret = nvkm_mpeg_context_create(parent, engine, oclass, NULL, 128 * 4,
@@ -92,9 +95,13 @@ nv50_mpeg_context_ctor(struct nvkm_object *parent,
if (ret)
return ret;
- nv_wo32(chan, 0x0070, 0x00801ec1);
- nv_wo32(chan, 0x007c, 0x0000037c);
+ image = &chan->base.base.gpuobj;
+
+ nvkm_kmap(image);
+ nvkm_wo32(image, 0x0070, 0x00801ec1);
+ nvkm_wo32(image, 0x007c, 0x0000037c);
bar->flush(bar);
+ nvkm_done(image);
return 0;
}
OpenPOWER on IntegriCloud