aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/engine/cipher
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:07 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:11 +1000
commite2f1cf253e0cf5b64fa6fee439aeeda49c6f09d8 (patch)
tree0f3b4bb86886f42a9f3270435b1f29939703f76d /drivers/gpu/drm/nouveau/nvkm/engine/cipher
parentd9261a68374fbeda5a180fbba926aaba29321a75 (diff)
drm/nouveau/cipher: cosmetic changes
This is purely preparation for upcoming commits, there should be no code changes here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/cipher')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c44
1 files changed, 20 insertions, 24 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c b/drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c
index 13f30428a305..c1f065d8efa4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c
@@ -28,10 +28,6 @@
#include <core/engctx.h>
#include <core/enum.h>
-struct g84_cipher_priv {
- struct nvkm_engine base;
-};
-
/*******************************************************************************
* Crypt object classes
******************************************************************************/
@@ -111,26 +107,26 @@ g84_cipher_intr(struct nvkm_subdev *subdev)
struct nvkm_fifo *pfifo = nvkm_fifo(subdev);
struct nvkm_engine *engine = nv_engine(subdev);
struct nvkm_object *engctx;
- struct g84_cipher_priv *priv = (void *)subdev;
- u32 stat = nv_rd32(priv, 0x102130);
- u32 mthd = nv_rd32(priv, 0x102190);
- u32 data = nv_rd32(priv, 0x102194);
- u32 inst = nv_rd32(priv, 0x102188) & 0x7fffffff;
+ struct nvkm_engine *cipher = (void *)subdev;
+ u32 stat = nv_rd32(cipher, 0x102130);
+ u32 mthd = nv_rd32(cipher, 0x102190);
+ u32 data = nv_rd32(cipher, 0x102194);
+ u32 inst = nv_rd32(cipher, 0x102188) & 0x7fffffff;
int chid;
engctx = nvkm_engctx_get(engine, inst);
chid = pfifo->chid(pfifo, engctx);
if (stat) {
- nv_error(priv, "%s", "");
+ nv_error(cipher, "%s", "");
nvkm_bitfield_print(g84_cipher_intr_mask, stat);
pr_cont(" ch %d [0x%010llx %s] mthd 0x%04x data 0x%08x\n",
chid, (u64)inst << 12, nvkm_client_name(engctx),
mthd, data);
}
- nv_wr32(priv, 0x102130, stat);
- nv_wr32(priv, 0x10200c, 0x10);
+ nv_wr32(cipher, 0x102130, stat);
+ nv_wr32(cipher, 0x10200c, 0x10);
nvkm_engctx_put(engctx);
}
@@ -140,35 +136,35 @@ g84_cipher_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
struct nvkm_oclass *oclass, void *data, u32 size,
struct nvkm_object **pobject)
{
- struct g84_cipher_priv *priv;
+ struct nvkm_engine *cipher;
int ret;
ret = nvkm_engine_create(parent, engine, oclass, true,
- "PCIPHER", "cipher", &priv);
- *pobject = nv_object(priv);
+ "PCIPHER", "cipher", &cipher);
+ *pobject = nv_object(cipher);
if (ret)
return ret;
- nv_subdev(priv)->unit = 0x00004000;
- nv_subdev(priv)->intr = g84_cipher_intr;
- nv_engine(priv)->cclass = &g84_cipher_cclass;
- nv_engine(priv)->sclass = g84_cipher_sclass;
+ nv_subdev(cipher)->unit = 0x00004000;
+ nv_subdev(cipher)->intr = g84_cipher_intr;
+ nv_engine(cipher)->cclass = &g84_cipher_cclass;
+ nv_engine(cipher)->sclass = g84_cipher_sclass;
return 0;
}
static int
g84_cipher_init(struct nvkm_object *object)
{
- struct g84_cipher_priv *priv = (void *)object;
+ struct nvkm_engine *cipher = (void *)object;
int ret;
- ret = nvkm_engine_init(&priv->base);
+ ret = nvkm_engine_init(cipher);
if (ret)
return ret;
- nv_wr32(priv, 0x102130, 0xffffffff);
- nv_wr32(priv, 0x102140, 0xffffffbf);
- nv_wr32(priv, 0x10200c, 0x00000010);
+ nv_wr32(cipher, 0x102130, 0xffffffff);
+ nv_wr32(cipher, 0x102140, 0xffffffbf);
+ nv_wr32(cipher, 0x10200c, 0x00000010);
return 0;
}