]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/nouveau/ce: cosmetic changes
authorBen Skeggs <bskeggs@redhat.com>
Thu, 20 Aug 2015 04:54:07 +0000 (14:54 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 28 Aug 2015 02:40:11 +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/ce/fuc/com.fuc
drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/gf100.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/ce/fuc/gt215.fuc3.h
drivers/gpu/drm/nouveau/nvkm/engine/ce/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/ce/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/ce/gm204.c
drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c

index d811db7dbfd8d866e73d8992af40c5e82b3f94e8..2a27646ed770f6071481190cf73b96b8b69e5d84 100644 (file)
@@ -51,7 +51,7 @@ struct nvkm_falcon {
        } data;
 };
 
-#define nv_falcon(priv) (&(priv)->base)
+#define nv_falcon(priv) ((struct nvkm_falcon *)priv)
 
 #define nvkm_falcon_create(p,e,c,b,d,i,f,r)                                 \
        nvkm_falcon_create_((p), (e), (c), (b), (d), (i), (f),              \
index a558dfa4d76a228296bdb39a9d879abced033d1b..6226bcd98ca9f689a5336a60b329f32f2eee7524 100644 (file)
@@ -24,9 +24,9 @@
  */
 
 #ifdef GT215
-.section #gt215_pce_data
+.section #gt215_ce_data
 #else
-.section #gf100_pce_data
+.section #gf100_ce_data
 #endif
 
 ctx_object:                   .b32 0
@@ -128,9 +128,9 @@ dispatch_dma:
 .b16 0x800 0
 
 #ifdef GT215
-.section #gt215_pce_code
+.section #gt215_ce_code
 #else
-.section #gf100_pce_code
+.section #gf100_ce_code
 #endif
 
 main:
index d9af6e4e45851747edd4f0bdb486d8fc6fbfcbe5..05bb65608dfe1c655dadb97d5fb1ed476d3fa32a 100644 (file)
@@ -1,4 +1,4 @@
-uint32_t gf100_pce_data[] = {
+uint32_t gf100_ce_data[] = {
 /* 0x0000: ctx_object */
        0x00000000,
 /* 0x0004: ctx_query_address_high */
@@ -171,7 +171,7 @@ uint32_t gf100_pce_data[] = {
        0x00000800,
 };
 
-uint32_t gf100_pce_code[] = {
+uint32_t gf100_ce_code[] = {
 /* 0x0000: main */
        0x04fe04bd,
        0x3517f000,
index f42c0d0d6ceeb1ebdf1b805c124eb11871e7115c..972281d10f38947ce881e176736eedb272465a1c 100644 (file)
@@ -1,4 +1,4 @@
-uint32_t gt215_pce_data[] = {
+uint32_t gt215_ce_data[] = {
 /* 0x0000: ctx_object */
        0x00000000,
 /* 0x0004: ctx_dma */
@@ -183,7 +183,7 @@ uint32_t gt215_pce_data[] = {
        0x00000800,
 };
 
-uint32_t gt215_pce_code[] = {
+uint32_t gt215_ce_code[] = {
 /* 0x0000: main */
        0x04fe04bd,
        0x3517f000,
index 7791428fcafbdd54c83d323afc0c72f8775d881b..bbe07c4d084348f7d1d49920450cca4dab145047 100644 (file)
 #include <engine/falcon.h>
 #include "fuc/gf100.fuc3.h"
 
-struct gf100_ce_priv {
-       struct nvkm_falcon base;
-};
-
 /*******************************************************************************
  * Copy object classes
  ******************************************************************************/
@@ -78,14 +74,14 @@ gf100_ce1_cclass = {
 static int
 gf100_ce_init(struct nvkm_object *object)
 {
-       struct gf100_ce_priv *priv = (void *)object;
+       struct nvkm_falcon *ce = (void *)object;
        int ret;
 
-       ret = nvkm_falcon_init(&priv->base);
+       ret = nvkm_falcon_init(ce);
        if (ret)
                return ret;
 
-       nv_wo32(priv, 0x084, nv_engidx(&priv->base.engine) - NVDEV_ENGINE_CE0);
+       nv_wo32(ce, 0x084, nv_engidx(&ce->engine) - NVDEV_ENGINE_CE0);
        return 0;
 }
 
@@ -94,23 +90,23 @@ gf100_ce0_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
               struct nvkm_oclass *oclass, void *data, u32 size,
               struct nvkm_object **pobject)
 {
-       struct gf100_ce_priv *priv;
+       struct nvkm_falcon *ce;
        int ret;
 
        ret = nvkm_falcon_create(parent, engine, oclass, 0x104000, true,
-                                "PCE0", "ce0", &priv);
-       *pobject = nv_object(priv);
+                                "PCE0", "ce0", &ce);
+       *pobject = nv_object(ce);
        if (ret)
                return ret;
 
-       nv_subdev(priv)->unit = 0x00000040;
-       nv_subdev(priv)->intr = gt215_ce_intr;
-       nv_engine(priv)->cclass = &gf100_ce0_cclass;
-       nv_engine(priv)->sclass = gf100_ce0_sclass;
-       nv_falcon(priv)->code.data = gf100_pce_code;
-       nv_falcon(priv)->code.size = sizeof(gf100_pce_code);
-       nv_falcon(priv)->data.data = gf100_pce_data;
-       nv_falcon(priv)->data.size = sizeof(gf100_pce_data);
+       nv_subdev(ce)->unit = 0x00000040;
+       nv_subdev(ce)->intr = gt215_ce_intr;
+       nv_engine(ce)->cclass = &gf100_ce0_cclass;
+       nv_engine(ce)->sclass = gf100_ce0_sclass;
+       nv_falcon(ce)->code.data = gf100_ce_code;
+       nv_falcon(ce)->code.size = sizeof(gf100_ce_code);
+       nv_falcon(ce)->data.data = gf100_ce_data;
+       nv_falcon(ce)->data.size = sizeof(gf100_ce_data);
        return 0;
 }
 
@@ -119,23 +115,23 @@ gf100_ce1_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
               struct nvkm_oclass *oclass, void *data, u32 size,
               struct nvkm_object **pobject)
 {
-       struct gf100_ce_priv *priv;
+       struct nvkm_falcon *ce;
        int ret;
 
        ret = nvkm_falcon_create(parent, engine, oclass, 0x105000, true,
-                                "PCE1", "ce1", &priv);
-       *pobject = nv_object(priv);
+                                "PCE1", "ce1", &ce);
+       *pobject = nv_object(ce);
        if (ret)
                return ret;
 
-       nv_subdev(priv)->unit = 0x00000080;
-       nv_subdev(priv)->intr = gt215_ce_intr;
-       nv_engine(priv)->cclass = &gf100_ce1_cclass;
-       nv_engine(priv)->sclass = gf100_ce1_sclass;
-       nv_falcon(priv)->code.data = gf100_pce_code;
-       nv_falcon(priv)->code.size = sizeof(gf100_pce_code);
-       nv_falcon(priv)->data.data = gf100_pce_data;
-       nv_falcon(priv)->data.size = sizeof(gf100_pce_data);
+       nv_subdev(ce)->unit = 0x00000080;
+       nv_subdev(ce)->intr = gt215_ce_intr;
+       nv_engine(ce)->cclass = &gf100_ce1_cclass;
+       nv_engine(ce)->sclass = gf100_ce1_sclass;
+       nv_falcon(ce)->code.data = gf100_ce_code;
+       nv_falcon(ce)->code.size = sizeof(gf100_ce_code);
+       nv_falcon(ce)->data.data = gf100_ce_data;
+       nv_falcon(ce)->data.size = sizeof(gf100_ce_data);
        return 0;
 }
 
index a998932fae45fd2b93bc8d068a6d534f0f9146fc..1abf22f87c71026fdabb773c61ca8c754115f699 100644 (file)
 
 #include <core/engctx.h>
 
-struct gk104_ce_priv {
-       struct nvkm_engine base;
-};
-
 /*******************************************************************************
  * Copy object classes
  ******************************************************************************/
@@ -66,13 +62,13 @@ gk104_ce_cclass = {
 static void
 gk104_ce_intr(struct nvkm_subdev *subdev)
 {
-       const int ce = nv_subidx(subdev) - NVDEV_ENGINE_CE0;
-       struct gk104_ce_priv *priv = (void *)subdev;
-       u32 stat = nv_rd32(priv, 0x104908 + (ce * 0x1000));
+       const int idx = nv_subidx(subdev) - NVDEV_ENGINE_CE0;
+       struct nvkm_engine *ce = (void *)subdev;
+       u32 stat = nv_rd32(ce, 0x104908 + (idx * 0x1000));
 
        if (stat) {
-               nv_warn(priv, "unhandled intr 0x%08x\n", stat);
-               nv_wr32(priv, 0x104908 + (ce * 0x1000), stat);
+               nv_warn(ce, "unhandled intr 0x%08x\n", stat);
+               nv_wr32(ce, 0x104908 + (idx * 0x1000), stat);
        }
 }
 
@@ -81,19 +77,19 @@ gk104_ce0_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
               struct nvkm_oclass *oclass, void *data, u32 size,
               struct nvkm_object **pobject)
 {
-       struct gk104_ce_priv *priv;
+       struct nvkm_engine *ce;
        int ret;
 
        ret = nvkm_engine_create(parent, engine, oclass, true,
-                                "PCE0", "ce0", &priv);
-       *pobject = nv_object(priv);
+                                "PCE0", "ce0", &ce);
+       *pobject = nv_object(ce);
        if (ret)
                return ret;
 
-       nv_subdev(priv)->unit = 0x00000040;
-       nv_subdev(priv)->intr = gk104_ce_intr;
-       nv_engine(priv)->cclass = &gk104_ce_cclass;
-       nv_engine(priv)->sclass = gk104_ce_sclass;
+       nv_subdev(ce)->unit = 0x00000040;
+       nv_subdev(ce)->intr = gk104_ce_intr;
+       nv_engine(ce)->cclass = &gk104_ce_cclass;
+       nv_engine(ce)->sclass = gk104_ce_sclass;
        return 0;
 }
 
@@ -102,19 +98,19 @@ gk104_ce1_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
               struct nvkm_oclass *oclass, void *data, u32 size,
               struct nvkm_object **pobject)
 {
-       struct gk104_ce_priv *priv;
+       struct nvkm_engine *ce;
        int ret;
 
        ret = nvkm_engine_create(parent, engine, oclass, true,
-                                "PCE1", "ce1", &priv);
-       *pobject = nv_object(priv);
+                                "PCE1", "ce1", &ce);
+       *pobject = nv_object(ce);
        if (ret)
                return ret;
 
-       nv_subdev(priv)->unit = 0x00000080;
-       nv_subdev(priv)->intr = gk104_ce_intr;
-       nv_engine(priv)->cclass = &gk104_ce_cclass;
-       nv_engine(priv)->sclass = gk104_ce_sclass;
+       nv_subdev(ce)->unit = 0x00000080;
+       nv_subdev(ce)->intr = gk104_ce_intr;
+       nv_engine(ce)->cclass = &gk104_ce_cclass;
+       nv_engine(ce)->sclass = gk104_ce_sclass;
        return 0;
 }
 
@@ -123,19 +119,19 @@ gk104_ce2_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
               struct nvkm_oclass *oclass, void *data, u32 size,
               struct nvkm_object **pobject)
 {
-       struct gk104_ce_priv *priv;
+       struct nvkm_engine *ce;
        int ret;
 
        ret = nvkm_engine_create(parent, engine, oclass, true,
-                                "PCE2", "ce2", &priv);
-       *pobject = nv_object(priv);
+                                "PCE2", "ce2", &ce);
+       *pobject = nv_object(ce);
        if (ret)
                return ret;
 
-       nv_subdev(priv)->unit = 0x00200000;
-       nv_subdev(priv)->intr = gk104_ce_intr;
-       nv_engine(priv)->cclass = &gk104_ce_cclass;
-       nv_engine(priv)->sclass = gk104_ce_sclass;
+       nv_subdev(ce)->unit = 0x00200000;
+       nv_subdev(ce)->intr = gk104_ce_intr;
+       nv_engine(ce)->cclass = &gk104_ce_cclass;
+       nv_engine(ce)->sclass = gk104_ce_sclass;
        return 0;
 }
 
index 577eb2eead0584b56ee68f1ac7849a3b6f22ea25..3fd896a92978dc93c0615d1ccafa305f024112cd 100644 (file)
 
 #include <core/engctx.h>
 
-struct gm204_ce_priv {
-       struct nvkm_engine base;
-};
-
 /*******************************************************************************
  * Copy object classes
  ******************************************************************************/
@@ -66,13 +62,13 @@ gm204_ce_cclass = {
 static void
 gm204_ce_intr(struct nvkm_subdev *subdev)
 {
-       const int ce = nv_subidx(subdev) - NVDEV_ENGINE_CE0;
-       struct gm204_ce_priv *priv = (void *)subdev;
-       u32 stat = nv_rd32(priv, 0x104908 + (ce * 0x1000));
+       const int idx = nv_subidx(subdev) - NVDEV_ENGINE_CE0;
+       struct nvkm_engine *ce = (void *)subdev;
+       u32 stat = nv_rd32(ce, 0x104908 + (idx * 0x1000));
 
        if (stat) {
-               nv_warn(priv, "unhandled intr 0x%08x\n", stat);
-               nv_wr32(priv, 0x104908 + (ce * 0x1000), stat);
+               nv_warn(ce, "unhandled intr 0x%08x\n", stat);
+               nv_wr32(ce, 0x104908 + (idx * 0x1000), stat);
        }
 }
 
@@ -81,19 +77,19 @@ gm204_ce0_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
               struct nvkm_oclass *oclass, void *data, u32 size,
               struct nvkm_object **pobject)
 {
-       struct gm204_ce_priv *priv;
+       struct nvkm_engine *ce;
        int ret;
 
        ret = nvkm_engine_create(parent, engine, oclass, true,
-                                "PCE0", "ce0", &priv);
-       *pobject = nv_object(priv);
+                                "PCE0", "ce0", &ce);
+       *pobject = nv_object(ce);
        if (ret)
                return ret;
 
-       nv_subdev(priv)->unit = 0x00000040;
-       nv_subdev(priv)->intr = gm204_ce_intr;
-       nv_engine(priv)->cclass = &gm204_ce_cclass;
-       nv_engine(priv)->sclass = gm204_ce_sclass;
+       nv_subdev(ce)->unit = 0x00000040;
+       nv_subdev(ce)->intr = gm204_ce_intr;
+       nv_engine(ce)->cclass = &gm204_ce_cclass;
+       nv_engine(ce)->sclass = gm204_ce_sclass;
        return 0;
 }
 
@@ -102,19 +98,19 @@ gm204_ce1_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
               struct nvkm_oclass *oclass, void *data, u32 size,
               struct nvkm_object **pobject)
 {
-       struct gm204_ce_priv *priv;
+       struct nvkm_engine *ce;
        int ret;
 
        ret = nvkm_engine_create(parent, engine, oclass, true,
-                                "PCE1", "ce1", &priv);
-       *pobject = nv_object(priv);
+                                "PCE1", "ce1", &ce);
+       *pobject = nv_object(ce);
        if (ret)
                return ret;
 
-       nv_subdev(priv)->unit = 0x00000080;
-       nv_subdev(priv)->intr = gm204_ce_intr;
-       nv_engine(priv)->cclass = &gm204_ce_cclass;
-       nv_engine(priv)->sclass = gm204_ce_sclass;
+       nv_subdev(ce)->unit = 0x00000080;
+       nv_subdev(ce)->intr = gm204_ce_intr;
+       nv_engine(ce)->cclass = &gm204_ce_cclass;
+       nv_engine(ce)->sclass = gm204_ce_sclass;
        return 0;
 }
 
@@ -123,19 +119,19 @@ gm204_ce2_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
               struct nvkm_oclass *oclass, void *data, u32 size,
               struct nvkm_object **pobject)
 {
-       struct gm204_ce_priv *priv;
+       struct nvkm_engine *ce;
        int ret;
 
        ret = nvkm_engine_create(parent, engine, oclass, true,
-                                "PCE2", "ce2", &priv);
-       *pobject = nv_object(priv);
+                                "PCE2", "ce2", &ce);
+       *pobject = nv_object(ce);
        if (ret)
                return ret;
 
-       nv_subdev(priv)->unit = 0x00200000;
-       nv_subdev(priv)->intr = gm204_ce_intr;
-       nv_engine(priv)->cclass = &gm204_ce_cclass;
-       nv_engine(priv)->sclass = gm204_ce_sclass;
+       nv_subdev(ce)->unit = 0x00200000;
+       nv_subdev(ce)->intr = gm204_ce_intr;
+       nv_engine(ce)->cclass = &gm204_ce_cclass;
+       nv_engine(ce)->sclass = gm204_ce_sclass;
        return 0;
 }
 
index 72604d332596bb62f852a2bd1d4dcf5cfe41a80b..9addf43e07d438420e09acbaf47585a8cea18a02 100644 (file)
 #include <core/client.h>
 #include <core/enum.h>
 
-struct gt215_ce_priv {
-       struct nvkm_falcon base;
-};
-
 /*******************************************************************************
  * Copy object classes
  ******************************************************************************/
@@ -117,23 +113,23 @@ gt215_ce_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
              struct nvkm_object **pobject)
 {
        bool enable = (nv_device(parent)->chipset != 0xaf);
-       struct gt215_ce_priv *priv;
+       struct nvkm_falcon *ce;
        int ret;
 
        ret = nvkm_falcon_create(parent, engine, oclass, 0x104000, enable,
-                                "PCE0", "ce0", &priv);
-       *pobject = nv_object(priv);
+                                "PCE0", "ce0", &ce);
+       *pobject = nv_object(ce);
        if (ret)
                return ret;
 
-       nv_subdev(priv)->unit = 0x00802000;
-       nv_subdev(priv)->intr = gt215_ce_intr;
-       nv_engine(priv)->cclass = &gt215_ce_cclass;
-       nv_engine(priv)->sclass = gt215_ce_sclass;
-       nv_falcon(priv)->code.data = gt215_pce_code;
-       nv_falcon(priv)->code.size = sizeof(gt215_pce_code);
-       nv_falcon(priv)->data.data = gt215_pce_data;
-       nv_falcon(priv)->data.size = sizeof(gt215_pce_data);
+       nv_subdev(ce)->unit = 0x00802000;
+       nv_subdev(ce)->intr = gt215_ce_intr;
+       nv_engine(ce)->cclass = &gt215_ce_cclass;
+       nv_engine(ce)->sclass = gt215_ce_sclass;
+       nv_falcon(ce)->code.data = gt215_ce_code;
+       nv_falcon(ce)->code.size = sizeof(gt215_ce_code);
+       nv_falcon(ce)->data.data = gt215_ce_data;
+       nv_falcon(ce)->data.size = sizeof(gt215_ce_data);
        return 0;
 }