aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-04-24 03:48:56 -0400
committerBen Skeggs <bskeggs@redhat.com>2013-04-26 01:38:03 -0400
commit1409d90f24573c938231ec277a5b847eb8226ea7 (patch)
tree76ee2382dd93c050b1b136c3c70d7c95beb5139f /drivers/gpu/drm/nouveau/core
parentbe1e8e16ecb13b81e3ca7c459c60c7e939fb9d0e (diff)
drm/nv04-nv40/instmem: use self as parent for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c10
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c11
2 files changed, 13 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c b/drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c
index 932c93b486e6..795393d7b2f5 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/instmem/nv04.c
@@ -125,23 +125,25 @@ nv04_instmem_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
125 return ret; 125 return ret;
126 126
127 /* 0x00000-0x10000: reserve for probable vbios image */ 127 /* 0x00000-0x10000: reserve for probable vbios image */
128 ret = nouveau_gpuobj_new(parent, NULL, 0x10000, 0, 0, &priv->vbios); 128 ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x10000, 0, 0,
129 &priv->vbios);
129 if (ret) 130 if (ret)
130 return ret; 131 return ret;
131 132
132 /* 0x10000-0x18000: reserve for RAMHT */ 133 /* 0x10000-0x18000: reserve for RAMHT */
133 ret = nouveau_ramht_new(parent, NULL, 0x08000, 0, &priv->ramht); 134 ret = nouveau_ramht_new(nv_object(priv), NULL, 0x08000, 0, &priv->ramht);
134 if (ret) 135 if (ret)
135 return ret; 136 return ret;
136 137
137 /* 0x18000-0x18800: reserve for RAMFC (enough for 32 nv30 channels) */ 138 /* 0x18000-0x18800: reserve for RAMFC (enough for 32 nv30 channels) */
138 ret = nouveau_gpuobj_new(parent, NULL, 0x00800, 0, 139 ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x00800, 0,
139 NVOBJ_FLAG_ZERO_ALLOC, &priv->ramfc); 140 NVOBJ_FLAG_ZERO_ALLOC, &priv->ramfc);
140 if (ret) 141 if (ret)
141 return ret; 142 return ret;
142 143
143 /* 0x18800-0x18a00: reserve for RAMRO */ 144 /* 0x18800-0x18a00: reserve for RAMRO */
144 ret = nouveau_gpuobj_new(parent, NULL, 0x00200, 0, 0, &priv->ramro); 145 ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x00200, 0, 0,
146 &priv->ramro);
145 if (ret) 147 if (ret)
146 return ret; 148 return ret;
147 149
diff --git a/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c b/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c
index 5aef79748527..716bf41bc3c1 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c
@@ -82,26 +82,29 @@ nv40_instmem_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
82 return ret; 82 return ret;
83 83
84 /* 0x00000-0x10000: reserve for probable vbios image */ 84 /* 0x00000-0x10000: reserve for probable vbios image */
85 ret = nouveau_gpuobj_new(parent, NULL, 0x10000, 0, 0, &priv->vbios); 85 ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x10000, 0, 0,
86 &priv->vbios);
86 if (ret) 87 if (ret)
87 return ret; 88 return ret;
88 89
89 /* 0x10000-0x18000: reserve for RAMHT */ 90 /* 0x10000-0x18000: reserve for RAMHT */
90 ret = nouveau_ramht_new(parent, NULL, 0x08000, 0, &priv->ramht); 91 ret = nouveau_ramht_new(nv_object(priv), NULL, 0x08000, 0,
92 &priv->ramht);
91 if (ret) 93 if (ret)
92 return ret; 94 return ret;
93 95
94 /* 0x18000-0x18200: reserve for RAMRO 96 /* 0x18000-0x18200: reserve for RAMRO
95 * 0x18200-0x20000: padding 97 * 0x18200-0x20000: padding
96 */ 98 */
97 ret = nouveau_gpuobj_new(parent, NULL, 0x08000, 0, 0, &priv->ramro); 99 ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x08000, 0, 0,
100 &priv->ramro);
98 if (ret) 101 if (ret)
99 return ret; 102 return ret;
100 103
101 /* 0x20000-0x21000: reserve for RAMFC 104 /* 0x20000-0x21000: reserve for RAMFC
102 * 0x21000-0x40000: padding and some unknown crap 105 * 0x21000-0x40000: padding and some unknown crap
103 */ 106 */
104 ret = nouveau_gpuobj_new(parent, NULL, 0x20000, 0, 107 ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x20000, 0,
105 NVOBJ_FLAG_ZERO_ALLOC, &priv->ramfc); 108 NVOBJ_FLAG_ZERO_ALLOC, &priv->ramfc);
106 if (ret) 109 if (ret)
107 return ret; 110 return ret;