diff options
| -rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c | 18 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c | 22 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c | 9 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | 7 |
4 files changed, 31 insertions, 25 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c index 840af6172788..ddaeb5572903 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv50.c | |||
| @@ -210,7 +210,8 @@ nv50_fifo_chan_ctor_dma(struct nouveau_object *parent, | |||
| 210 | nv_parent(chan)->object_attach = nv50_fifo_object_attach; | 210 | nv_parent(chan)->object_attach = nv50_fifo_object_attach; |
| 211 | nv_parent(chan)->object_detach = nv50_fifo_object_detach; | 211 | nv_parent(chan)->object_detach = nv50_fifo_object_detach; |
| 212 | 212 | ||
| 213 | ret = nouveau_ramht_new(parent, parent, 0x8000, 16, &chan->ramht); | 213 | ret = nouveau_ramht_new(nv_object(chan), nv_object(chan), 0x8000, 16, |
| 214 | &chan->ramht); | ||
| 214 | if (ret) | 215 | if (ret) |
| 215 | return ret; | 216 | return ret; |
| 216 | 217 | ||
| @@ -263,7 +264,8 @@ nv50_fifo_chan_ctor_ind(struct nouveau_object *parent, | |||
| 263 | nv_parent(chan)->object_attach = nv50_fifo_object_attach; | 264 | nv_parent(chan)->object_attach = nv50_fifo_object_attach; |
| 264 | nv_parent(chan)->object_detach = nv50_fifo_object_detach; | 265 | nv_parent(chan)->object_detach = nv50_fifo_object_detach; |
| 265 | 266 | ||
| 266 | ret = nouveau_ramht_new(parent, parent, 0x8000, 16, &chan->ramht); | 267 | ret = nouveau_ramht_new(nv_object(chan), nv_object(chan), 0x8000, 16, |
| 268 | &chan->ramht); | ||
| 267 | if (ret) | 269 | if (ret) |
| 268 | return ret; | 270 | return ret; |
| 269 | 271 | ||
| @@ -373,17 +375,17 @@ nv50_fifo_context_ctor(struct nouveau_object *parent, | |||
| 373 | if (ret) | 375 | if (ret) |
| 374 | return ret; | 376 | return ret; |
| 375 | 377 | ||
| 376 | ret = nouveau_gpuobj_new(parent, nv_object(base), 0x0200, 0x1000, | 378 | ret = nouveau_gpuobj_new(nv_object(base), nv_object(base), 0x0200, |
| 377 | NVOBJ_FLAG_ZERO_ALLOC, &base->ramfc); | 379 | 0x1000, NVOBJ_FLAG_ZERO_ALLOC, &base->ramfc); |
| 378 | if (ret) | 380 | if (ret) |
| 379 | return ret; | 381 | return ret; |
| 380 | 382 | ||
| 381 | ret = nouveau_gpuobj_new(parent, nv_object(base), 0x1200, 0, | 383 | ret = nouveau_gpuobj_new(nv_object(base), nv_object(base), 0x1200, 0, |
| 382 | NVOBJ_FLAG_ZERO_ALLOC, &base->eng); | 384 | NVOBJ_FLAG_ZERO_ALLOC, &base->eng); |
| 383 | if (ret) | 385 | if (ret) |
| 384 | return ret; | 386 | return ret; |
| 385 | 387 | ||
| 386 | ret = nouveau_gpuobj_new(parent, nv_object(base), 0x4000, 0, 0, | 388 | ret = nouveau_gpuobj_new(nv_object(base), nv_object(base), 0x4000, 0, 0, |
| 387 | &base->pgd); | 389 | &base->pgd); |
| 388 | if (ret) | 390 | if (ret) |
| 389 | return ret; | 391 | return ret; |
| @@ -437,12 +439,12 @@ nv50_fifo_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
| 437 | if (ret) | 439 | if (ret) |
| 438 | return ret; | 440 | return ret; |
| 439 | 441 | ||
| 440 | ret = nouveau_gpuobj_new(parent, NULL, 128 * 4, 0x1000, 0, | 442 | ret = nouveau_gpuobj_new(nv_object(priv), NULL, 128 * 4, 0x1000, 0, |
| 441 | &priv->playlist[0]); | 443 | &priv->playlist[0]); |
| 442 | if (ret) | 444 | if (ret) |
| 443 | return ret; | 445 | return ret; |
| 444 | 446 | ||
| 445 | ret = nouveau_gpuobj_new(parent, NULL, 128 * 4, 0x1000, 0, | 447 | ret = nouveau_gpuobj_new(nv_object(priv), NULL, 128 * 4, 0x1000, 0, |
| 446 | &priv->playlist[1]); | 448 | &priv->playlist[1]); |
| 447 | if (ret) | 449 | if (ret) |
| 448 | return ret; | 450 | return ret; |
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c index 094000e87871..35b94bd18808 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c | |||
| @@ -180,7 +180,8 @@ nv84_fifo_chan_ctor_dma(struct nouveau_object *parent, | |||
| 180 | if (ret) | 180 | if (ret) |
| 181 | return ret; | 181 | return ret; |
| 182 | 182 | ||
| 183 | ret = nouveau_ramht_new(parent, parent, 0x8000, 16, &chan->ramht); | 183 | ret = nouveau_ramht_new(nv_object(chan), nv_object(chan), 0x8000, 16, |
| 184 | &chan->ramht); | ||
| 184 | if (ret) | 185 | if (ret) |
| 185 | return ret; | 186 | return ret; |
| 186 | 187 | ||
| @@ -242,7 +243,8 @@ nv84_fifo_chan_ctor_ind(struct nouveau_object *parent, | |||
| 242 | if (ret) | 243 | if (ret) |
| 243 | return ret; | 244 | return ret; |
| 244 | 245 | ||
| 245 | ret = nouveau_ramht_new(parent, parent, 0x8000, 16, &chan->ramht); | 246 | ret = nouveau_ramht_new(nv_object(chan), nv_object(chan), 0x8000, 16, |
| 247 | &chan->ramht); | ||
| 246 | if (ret) | 248 | if (ret) |
| 247 | return ret; | 249 | return ret; |
| 248 | 250 | ||
| @@ -336,12 +338,12 @@ nv84_fifo_context_ctor(struct nouveau_object *parent, | |||
| 336 | if (ret) | 338 | if (ret) |
| 337 | return ret; | 339 | return ret; |
| 338 | 340 | ||
| 339 | ret = nouveau_gpuobj_new(parent, nv_object(base), 0x0200, 0, | 341 | ret = nouveau_gpuobj_new(nv_object(base), nv_object(base), 0x0200, 0, |
| 340 | NVOBJ_FLAG_ZERO_ALLOC, &base->eng); | 342 | NVOBJ_FLAG_ZERO_ALLOC, &base->eng); |
| 341 | if (ret) | 343 | if (ret) |
| 342 | return ret; | 344 | return ret; |
| 343 | 345 | ||
| 344 | ret = nouveau_gpuobj_new(parent, nv_object(base), 0x4000, 0, | 346 | ret = nouveau_gpuobj_new(nv_object(base), nv_object(base), 0x4000, 0, |
| 345 | 0, &base->pgd); | 347 | 0, &base->pgd); |
| 346 | if (ret) | 348 | if (ret) |
| 347 | return ret; | 349 | return ret; |
| @@ -350,13 +352,13 @@ nv84_fifo_context_ctor(struct nouveau_object *parent, | |||
| 350 | if (ret) | 352 | if (ret) |
| 351 | return ret; | 353 | return ret; |
| 352 | 354 | ||
| 353 | ret = nouveau_gpuobj_new(parent, nv_object(base), 0x1000, 0x400, | 355 | ret = nouveau_gpuobj_new(nv_object(base), nv_object(base), 0x1000, |
| 354 | NVOBJ_FLAG_ZERO_ALLOC, &base->cache); | 356 | 0x400, NVOBJ_FLAG_ZERO_ALLOC, &base->cache); |
| 355 | if (ret) | 357 | if (ret) |
| 356 | return ret; | 358 | return ret; |
| 357 | 359 | ||
| 358 | ret = nouveau_gpuobj_new(parent, nv_object(base), 0x0100, 0x100, | 360 | ret = nouveau_gpuobj_new(nv_object(base), nv_object(base), 0x0100, |
| 359 | NVOBJ_FLAG_ZERO_ALLOC, &base->ramfc); | 361 | 0x100, NVOBJ_FLAG_ZERO_ALLOC, &base->ramfc); |
| 360 | if (ret) | 362 | if (ret) |
| 361 | return ret; | 363 | return ret; |
| 362 | 364 | ||
| @@ -407,12 +409,12 @@ nv84_fifo_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
| 407 | if (ret) | 409 | if (ret) |
| 408 | return ret; | 410 | return ret; |
| 409 | 411 | ||
| 410 | ret = nouveau_gpuobj_new(parent, NULL, 128 * 4, 0x1000, 0, | 412 | ret = nouveau_gpuobj_new(nv_object(priv), NULL, 128 * 4, 0x1000, 0, |
| 411 | &priv->playlist[0]); | 413 | &priv->playlist[0]); |
| 412 | if (ret) | 414 | if (ret) |
| 413 | return ret; | 415 | return ret; |
| 414 | 416 | ||
| 415 | ret = nouveau_gpuobj_new(parent, NULL, 128 * 4, 0x1000, 0, | 417 | ret = nouveau_gpuobj_new(nv_object(priv), NULL, 128 * 4, 0x1000, 0, |
| 416 | &priv->playlist[1]); | 418 | &priv->playlist[1]); |
| 417 | if (ret) | 419 | if (ret) |
| 418 | return ret; | 420 | return ret; |
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c index 4f226afb5591..4d4a6b905370 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c | |||
| @@ -292,7 +292,8 @@ nvc0_fifo_context_ctor(struct nouveau_object *parent, | |||
| 292 | if (ret) | 292 | if (ret) |
| 293 | return ret; | 293 | return ret; |
| 294 | 294 | ||
| 295 | ret = nouveau_gpuobj_new(parent, NULL, 0x10000, 0x1000, 0, &base->pgd); | 295 | ret = nouveau_gpuobj_new(nv_object(base), NULL, 0x10000, 0x1000, 0, |
| 296 | &base->pgd); | ||
| 296 | if (ret) | 297 | if (ret) |
| 297 | return ret; | 298 | return ret; |
| 298 | 299 | ||
| @@ -623,17 +624,17 @@ nvc0_fifo_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
| 623 | if (ret) | 624 | if (ret) |
| 624 | return ret; | 625 | return ret; |
| 625 | 626 | ||
| 626 | ret = nouveau_gpuobj_new(parent, NULL, 0x1000, 0x1000, 0, | 627 | ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x1000, 0x1000, 0, |
| 627 | &priv->playlist[0]); | 628 | &priv->playlist[0]); |
| 628 | if (ret) | 629 | if (ret) |
| 629 | return ret; | 630 | return ret; |
| 630 | 631 | ||
| 631 | ret = nouveau_gpuobj_new(parent, NULL, 0x1000, 0x1000, 0, | 632 | ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x1000, 0x1000, 0, |
| 632 | &priv->playlist[1]); | 633 | &priv->playlist[1]); |
| 633 | if (ret) | 634 | if (ret) |
| 634 | return ret; | 635 | return ret; |
| 635 | 636 | ||
| 636 | ret = nouveau_gpuobj_new(parent, NULL, 128 * 0x1000, 0x1000, 0, | 637 | ret = nouveau_gpuobj_new(nv_object(priv), NULL, 128 * 0x1000, 0x1000, 0, |
| 637 | &priv->user.mem); | 638 | &priv->user.mem); |
| 638 | if (ret) | 639 | if (ret) |
| 639 | return ret; | 640 | return ret; |
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c index 4419e40d88e9..9151919fb831 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | |||
| @@ -96,7 +96,7 @@ nve0_fifo_playlist_update(struct nve0_fifo_priv *priv, u32 engine) | |||
| 96 | 96 | ||
| 97 | cur = engn->playlist[engn->cur_playlist]; | 97 | cur = engn->playlist[engn->cur_playlist]; |
| 98 | if (unlikely(cur == NULL)) { | 98 | if (unlikely(cur == NULL)) { |
| 99 | int ret = nouveau_gpuobj_new(nv_object(priv)->parent, NULL, | 99 | int ret = nouveau_gpuobj_new(nv_object(priv), NULL, |
| 100 | 0x8000, 0x1000, 0, &cur); | 100 | 0x8000, 0x1000, 0, &cur); |
| 101 | if (ret) { | 101 | if (ret) { |
| 102 | nv_error(priv, "playlist alloc failed\n"); | 102 | nv_error(priv, "playlist alloc failed\n"); |
| @@ -333,7 +333,8 @@ nve0_fifo_context_ctor(struct nouveau_object *parent, | |||
| 333 | if (ret) | 333 | if (ret) |
| 334 | return ret; | 334 | return ret; |
| 335 | 335 | ||
| 336 | ret = nouveau_gpuobj_new(parent, NULL, 0x10000, 0x1000, 0, &base->pgd); | 336 | ret = nouveau_gpuobj_new(nv_object(base), NULL, 0x10000, 0x1000, 0, |
| 337 | &base->pgd); | ||
| 337 | if (ret) | 338 | if (ret) |
| 338 | return ret; | 339 | return ret; |
| 339 | 340 | ||
| @@ -595,7 +596,7 @@ nve0_fifo_ctor(struct nouveau_object *parent, struct nouveau_object *engine, | |||
| 595 | if (ret) | 596 | if (ret) |
| 596 | return ret; | 597 | return ret; |
| 597 | 598 | ||
| 598 | ret = nouveau_gpuobj_new(parent, NULL, 4096 * 0x200, 0x1000, | 599 | ret = nouveau_gpuobj_new(nv_object(priv), NULL, 4096 * 0x200, 0x1000, |
| 599 | NVOBJ_FLAG_ZERO_ALLOC, &priv->user.mem); | 600 | NVOBJ_FLAG_ZERO_ALLOC, &priv->user.mem); |
| 600 | if (ret) | 601 | if (ret) |
| 601 | return ret; | 602 | return ret; |
