]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/nouveau/mspdec: cosmetic changes
authorBen Skeggs <bskeggs@redhat.com>
Thu, 20 Aug 2015 04:54:08 +0000 (14:54 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 28 Aug 2015 02:40:12 +0000 (12:40 +1000)
This is purely preparation for upcoming commits, there should be no
code changes here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/g98.c
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/mspdec/gk104.c

index 2a27646ed770f6071481190cf73b96b8b69e5d84..7532cd785c883859a0c814c6af35c78cc05b8a46 100644 (file)
@@ -59,12 +59,12 @@ struct nvkm_falcon {
 #define nvkm_falcon_destroy(p)                                              \
        nvkm_engine_destroy(&(p)->engine)
 #define nvkm_falcon_init(p) ({                                              \
-       struct nvkm_falcon *falcon = (p);                                   \
-       _nvkm_falcon_init(nv_object(falcon));                               \
+       struct nvkm_falcon *_falcon = (p);                                   \
+       _nvkm_falcon_init(nv_object(_falcon));                               \
 })
 #define nvkm_falcon_fini(p,s) ({                                            \
-       struct nvkm_falcon *falcon = (p);                                   \
-       _nvkm_falcon_fini(nv_object(falcon), (s));                          \
+       struct nvkm_falcon *_falcon = (p);                                   \
+       _nvkm_falcon_fini(nv_object(_falcon), (s));                          \
 })
 
 int nvkm_falcon_create_(struct nvkm_object *, struct nvkm_object *,
index 2174577793a417a0fd4bad684e4807b9a089037f..55ffb3f1f36ce24e9fc0ff636a83b1a02755eebc 100644 (file)
 #include <engine/mspdec.h>
 #include <engine/falcon.h>
 
-struct g98_mspdec_priv {
-       struct nvkm_falcon base;
-};
-
 /*******************************************************************************
  * MSPDEC object classes
  ******************************************************************************/
@@ -63,15 +59,15 @@ g98_mspdec_cclass = {
 static int
 g98_mspdec_init(struct nvkm_object *object)
 {
-       struct g98_mspdec_priv *priv = (void *)object;
+       struct nvkm_falcon *mspdec = (void *)object;
        int ret;
 
-       ret = nvkm_falcon_init(&priv->base);
+       ret = nvkm_falcon_init(mspdec);
        if (ret)
                return ret;
 
-       nv_wr32(priv, 0x085010, 0x0000ffd2);
-       nv_wr32(priv, 0x08501c, 0x0000fff2);
+       nv_wr32(mspdec, 0x085010, 0x0000ffd2);
+       nv_wr32(mspdec, 0x08501c, 0x0000fff2);
        return 0;
 }
 
@@ -80,18 +76,18 @@ g98_mspdec_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
                struct nvkm_oclass *oclass, void *data, u32 size,
                struct nvkm_object **pobject)
 {
-       struct g98_mspdec_priv *priv;
+       struct nvkm_falcon *mspdec;
        int ret;
 
        ret = nvkm_falcon_create(parent, engine, oclass, 0x085000, true,
-                                "PMSPDEC", "mspdec", &priv);
-       *pobject = nv_object(priv);
+                                "PMSPDEC", "mspdec", &mspdec);
+       *pobject = nv_object(mspdec);
        if (ret)
                return ret;
 
-       nv_subdev(priv)->unit = 0x01020000;
-       nv_engine(priv)->cclass = &g98_mspdec_cclass;
-       nv_engine(priv)->sclass = g98_mspdec_sclass;
+       nv_subdev(mspdec)->unit = 0x01020000;
+       nv_engine(mspdec)->cclass = &g98_mspdec_cclass;
+       nv_engine(mspdec)->sclass = g98_mspdec_sclass;
        return 0;
 }
 
index c814a5f65eb0f0f6d46c376e3f54d03a6324cec4..7c5d01dcf92efc26135f39edf2099d033a01ea45 100644 (file)
 #include <engine/mspdec.h>
 #include <engine/falcon.h>
 
-struct gf100_mspdec_priv {
-       struct nvkm_falcon base;
-};
-
 /*******************************************************************************
  * MSPDEC object classes
  ******************************************************************************/
@@ -62,15 +58,15 @@ gf100_mspdec_cclass = {
 static int
 gf100_mspdec_init(struct nvkm_object *object)
 {
-       struct gf100_mspdec_priv *priv = (void *)object;
+       struct nvkm_falcon *mspdec = (void *)object;
        int ret;
 
-       ret = nvkm_falcon_init(&priv->base);
+       ret = nvkm_falcon_init(mspdec);
        if (ret)
                return ret;
 
-       nv_wr32(priv, 0x085010, 0x0000fff2);
-       nv_wr32(priv, 0x08501c, 0x0000fff2);
+       nv_wr32(mspdec, 0x085010, 0x0000fff2);
+       nv_wr32(mspdec, 0x08501c, 0x0000fff2);
        return 0;
 }
 
@@ -79,19 +75,19 @@ gf100_mspdec_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
                  struct nvkm_oclass *oclass, void *data, u32 size,
                  struct nvkm_object **pobject)
 {
-       struct gf100_mspdec_priv *priv;
+       struct nvkm_falcon *mspdec;
        int ret;
 
        ret = nvkm_falcon_create(parent, engine, oclass, 0x085000, true,
-                                "PMSPDEC", "mspdec", &priv);
-       *pobject = nv_object(priv);
+                                "PMSPDEC", "mspdec", &mspdec);
+       *pobject = nv_object(mspdec);
        if (ret)
                return ret;
 
-       nv_subdev(priv)->unit = 0x00020000;
-       nv_subdev(priv)->intr = nvkm_falcon_intr;
-       nv_engine(priv)->cclass = &gf100_mspdec_cclass;
-       nv_engine(priv)->sclass = gf100_mspdec_sclass;
+       nv_subdev(mspdec)->unit = 0x00020000;
+       nv_subdev(mspdec)->intr = nvkm_falcon_intr;
+       nv_engine(mspdec)->cclass = &gf100_mspdec_cclass;
+       nv_engine(mspdec)->sclass = gf100_mspdec_sclass;
        return 0;
 }
 
index 979920650dbd561fe2f9187cf7b06e9c207887b4..60755185e88e4ef2c789850fb855eb811f9e7354 100644 (file)
 #include <engine/mspdec.h>
 #include <engine/falcon.h>
 
-struct gk104_mspdec_priv {
-       struct nvkm_falcon base;
-};
-
 /*******************************************************************************
  * MSPDEC object classes
  ******************************************************************************/
@@ -62,15 +58,15 @@ gk104_mspdec_cclass = {
 static int
 gk104_mspdec_init(struct nvkm_object *object)
 {
-       struct gk104_mspdec_priv *priv = (void *)object;
+       struct nvkm_falcon *falcon = (void *)object;
        int ret;
 
-       ret = nvkm_falcon_init(&priv->base);
+       ret = nvkm_falcon_init(falcon);
        if (ret)
                return ret;
 
-       nv_wr32(priv, 0x085010, 0x0000fff2);
-       nv_wr32(priv, 0x08501c, 0x0000fff2);
+       nv_wr32(falcon, 0x085010, 0x0000fff2);
+       nv_wr32(falcon, 0x08501c, 0x0000fff2);
        return 0;
 }
 
@@ -79,19 +75,19 @@ gk104_mspdec_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
                  struct nvkm_oclass *oclass, void *data, u32 size,
                  struct nvkm_object **pobject)
 {
-       struct gk104_mspdec_priv *priv;
+       struct nvkm_falcon *falcon;
        int ret;
 
        ret = nvkm_falcon_create(parent, engine, oclass, 0x085000, true,
-                                "PMSPDEC", "mspdec", &priv);
-       *pobject = nv_object(priv);
+                                "PMSPDEC", "mspdec", &falcon);
+       *pobject = nv_object(falcon);
        if (ret)
                return ret;
 
-       nv_subdev(priv)->unit = 0x00020000;
-       nv_subdev(priv)->intr = nvkm_falcon_intr;
-       nv_engine(priv)->cclass = &gk104_mspdec_cclass;
-       nv_engine(priv)->sclass = gk104_mspdec_sclass;
+       nv_subdev(falcon)->unit = 0x00020000;
+       nv_subdev(falcon)->intr = nvkm_falcon_intr;
+       nv_engine(falcon)->cclass = &gk104_mspdec_cclass;
+       nv_engine(falcon)->sclass = gk104_mspdec_sclass;
        return 0;
 }