drm/nv04-nv40/instmem: use self as parent for subobjects
authorBen Skeggs <bskeggs@redhat.com>
Wed, 24 Apr 2013 07:48:56 +0000 (17:48 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 26 Apr 2013 05:38:03 +0000 (15:38 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c
drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c

index 932c93b486e6c2270f0fdfddb73d72991f5f8ba6..795393d7b2f56826c0be783c320867bd14d4336b 100644 (file)
@@ -125,23 +125,25 @@ nv04_instmem_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
                return ret;
 
        /* 0x00000-0x10000: reserve for probable vbios image */
-       ret = nouveau_gpuobj_new(parent, NULL, 0x10000, 0, 0, &priv->vbios);
+       ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x10000, 0, 0,
+                               &priv->vbios);
        if (ret)
                return ret;
 
        /* 0x10000-0x18000: reserve for RAMHT */
-       ret = nouveau_ramht_new(parent, NULL, 0x08000, 0, &priv->ramht);
+       ret = nouveau_ramht_new(nv_object(priv), NULL, 0x08000, 0, &priv->ramht);
        if (ret)
                return ret;
 
        /* 0x18000-0x18800: reserve for RAMFC (enough for 32 nv30 channels) */
-       ret = nouveau_gpuobj_new(parent, NULL, 0x00800, 0,
+       ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x00800, 0,
                                 NVOBJ_FLAG_ZERO_ALLOC, &priv->ramfc);
        if (ret)
                return ret;
 
        /* 0x18800-0x18a00: reserve for RAMRO */
-       ret = nouveau_gpuobj_new(parent, NULL, 0x00200, 0, 0, &priv->ramro);
+       ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x00200, 0, 0,
+                               &priv->ramro);
        if (ret)
                return ret;
 
index 5aef79748527c6c6beb3e8efb3d0d1d8e6237c8f..716bf41bc3c107041f2b327e52943c873c735d42 100644 (file)
@@ -82,26 +82,29 @@ nv40_instmem_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
                return ret;
 
        /* 0x00000-0x10000: reserve for probable vbios image */
-       ret = nouveau_gpuobj_new(parent, NULL, 0x10000, 0, 0, &priv->vbios);
+       ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x10000, 0, 0,
+                               &priv->vbios);
        if (ret)
                return ret;
 
        /* 0x10000-0x18000: reserve for RAMHT */
-       ret = nouveau_ramht_new(parent, NULL, 0x08000, 0, &priv->ramht);
+       ret = nouveau_ramht_new(nv_object(priv), NULL, 0x08000, 0,
+                              &priv->ramht);
        if (ret)
                return ret;
 
        /* 0x18000-0x18200: reserve for RAMRO
         * 0x18200-0x20000: padding
         */
-       ret = nouveau_gpuobj_new(parent, NULL, 0x08000, 0, 0, &priv->ramro);
+       ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x08000, 0, 0,
+                               &priv->ramro);
        if (ret)
                return ret;
 
        /* 0x20000-0x21000: reserve for RAMFC
         * 0x21000-0x40000: padding and some unknown crap
         */
-       ret = nouveau_gpuobj_new(parent, NULL, 0x20000, 0,
+       ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x20000, 0,
                                 NVOBJ_FLAG_ZERO_ALLOC, &priv->ramfc);
        if (ret)
                return ret;