diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-06-07 00:21:29 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-06-23 02:00:37 -0400 |
commit | 7375c95b343aa575940704a38482a334ea87ac6c (patch) | |
tree | 5c6c61ceefe74bc5b3aefe810ba6d3cad87c9618 /drivers | |
parent | e758a3111914af7ee4351be86f1ac0efe87ed06e (diff) |
drm/nouveau: remove 'chan' argument from nouveau_bo_new
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_channel.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fence.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_gem.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_mem.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv04_crtc.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_crtc.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_evo.c | 4 |
9 files changed, 15 insertions, 18 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 36f3137b3ae2..49af4072c0f6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -87,9 +87,9 @@ nouveau_bo_fixup_align(struct nouveau_bo *nvbo, u32 flags, | |||
87 | } | 87 | } |
88 | 88 | ||
89 | int | 89 | int |
90 | nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan, | 90 | nouveau_bo_new(struct drm_device *dev, int size, int align, |
91 | int size, int align, uint32_t flags, uint32_t tile_mode, | 91 | uint32_t flags, uint32_t tile_mode, uint32_t tile_flags, |
92 | uint32_t tile_flags, struct nouveau_bo **pnvbo) | 92 | struct nouveau_bo **pnvbo) |
93 | { | 93 | { |
94 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 94 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
95 | struct nouveau_bo *nvbo; | 95 | struct nouveau_bo *nvbo; |
@@ -123,7 +123,6 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan, | |||
123 | } | 123 | } |
124 | } | 124 | } |
125 | 125 | ||
126 | nvbo->channel = chan; | ||
127 | ret = ttm_bo_init(&dev_priv->ttm.bdev, &nvbo->bo, size, | 126 | ret = ttm_bo_init(&dev_priv->ttm.bdev, &nvbo->bo, size, |
128 | ttm_bo_type_device, &nvbo->placement, | 127 | ttm_bo_type_device, &nvbo->placement, |
129 | align >> PAGE_SHIFT, 0, false, NULL, size, | 128 | align >> PAGE_SHIFT, 0, false, NULL, size, |
@@ -132,7 +131,6 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan, | |||
132 | /* ttm will call nouveau_bo_del_ttm if it fails.. */ | 131 | /* ttm will call nouveau_bo_del_ttm if it fails.. */ |
133 | return ret; | 132 | return ret; |
134 | } | 133 | } |
135 | nvbo->channel = NULL; | ||
136 | 134 | ||
137 | *pnvbo = nvbo; | 135 | *pnvbo = nvbo; |
138 | return 0; | 136 | return 0; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c index c03fa7b6944e..b0d753f45bbd 100644 --- a/drivers/gpu/drm/nouveau/nouveau_channel.c +++ b/drivers/gpu/drm/nouveau/nouveau_channel.c | |||
@@ -38,7 +38,7 @@ nouveau_channel_pushbuf_init(struct nouveau_channel *chan) | |||
38 | int ret; | 38 | int ret; |
39 | 39 | ||
40 | /* allocate buffer object */ | 40 | /* allocate buffer object */ |
41 | ret = nouveau_bo_new(dev, NULL, 65536, 0, mem, 0, 0, &chan->pushbuf_bo); | 41 | ret = nouveau_bo_new(dev, 65536, 0, mem, 0, 0, &chan->pushbuf_bo); |
42 | if (ret) | 42 | if (ret) |
43 | goto out; | 43 | goto out; |
44 | 44 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 4a48d6c25f95..bdb682d613d3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
@@ -1270,10 +1270,9 @@ extern int nv04_crtc_create(struct drm_device *, int index); | |||
1270 | 1270 | ||
1271 | /* nouveau_bo.c */ | 1271 | /* nouveau_bo.c */ |
1272 | extern struct ttm_bo_driver nouveau_bo_driver; | 1272 | extern struct ttm_bo_driver nouveau_bo_driver; |
1273 | extern int nouveau_bo_new(struct drm_device *, struct nouveau_channel *, | 1273 | extern int nouveau_bo_new(struct drm_device *, int size, int align, |
1274 | int size, int align, uint32_t flags, | 1274 | uint32_t flags, uint32_t tile_mode, |
1275 | uint32_t tile_mode, uint32_t tile_flags, | 1275 | uint32_t tile_flags, struct nouveau_bo **); |
1276 | struct nouveau_bo **); | ||
1277 | extern int nouveau_bo_pin(struct nouveau_bo *, uint32_t flags); | 1276 | extern int nouveau_bo_pin(struct nouveau_bo *, uint32_t flags); |
1278 | extern int nouveau_bo_unpin(struct nouveau_bo *); | 1277 | extern int nouveau_bo_unpin(struct nouveau_bo *); |
1279 | extern int nouveau_bo_map(struct nouveau_bo *); | 1278 | extern int nouveau_bo_map(struct nouveau_bo *); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c index 9d5c57778453..8d02d875376d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c | |||
@@ -574,7 +574,7 @@ nouveau_fence_init(struct drm_device *dev) | |||
574 | 574 | ||
575 | /* Create a shared VRAM heap for cross-channel sync. */ | 575 | /* Create a shared VRAM heap for cross-channel sync. */ |
576 | if (USE_SEMA(dev)) { | 576 | if (USE_SEMA(dev)) { |
577 | ret = nouveau_bo_new(dev, NULL, size, 0, TTM_PL_FLAG_VRAM, | 577 | ret = nouveau_bo_new(dev, size, 0, TTM_PL_FLAG_VRAM, |
578 | 0, 0, &dev_priv->fence.bo); | 578 | 0, 0, &dev_priv->fence.bo); |
579 | if (ret) | 579 | if (ret) |
580 | return ret; | 580 | return ret; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 05ca72ed7e30..3e1c7010e076 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c | |||
@@ -96,7 +96,7 @@ nouveau_gem_new(struct drm_device *dev, int size, int align, uint32_t domain, | |||
96 | if (!flags || domain & NOUVEAU_GEM_DOMAIN_CPU) | 96 | if (!flags || domain & NOUVEAU_GEM_DOMAIN_CPU) |
97 | flags |= TTM_PL_FLAG_SYSTEM; | 97 | flags |= TTM_PL_FLAG_SYSTEM; |
98 | 98 | ||
99 | ret = nouveau_bo_new(dev, NULL, size, align, flags, tile_mode, | 99 | ret = nouveau_bo_new(dev, size, align, flags, tile_mode, |
100 | tile_flags, pnvbo); | 100 | tile_flags, pnvbo); |
101 | if (ret) | 101 | if (ret) |
102 | return ret; | 102 | return ret; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 9d9605644175..976887dc2bab 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c | |||
@@ -479,7 +479,7 @@ nouveau_mem_vram_init(struct drm_device *dev) | |||
479 | } | 479 | } |
480 | 480 | ||
481 | if (dev_priv->card_type < NV_50) { | 481 | if (dev_priv->card_type < NV_50) { |
482 | ret = nouveau_bo_new(dev, NULL, 256*1024, 0, TTM_PL_FLAG_VRAM, | 482 | ret = nouveau_bo_new(dev, 256*1024, 0, TTM_PL_FLAG_VRAM, |
483 | 0, 0, &dev_priv->vga_ram); | 483 | 0, 0, &dev_priv->vga_ram); |
484 | if (ret == 0) | 484 | if (ret == 0) |
485 | ret = nouveau_bo_pin(dev_priv->vga_ram, | 485 | ret = nouveau_bo_pin(dev_priv->vga_ram, |
diff --git a/drivers/gpu/drm/nouveau/nv04_crtc.c b/drivers/gpu/drm/nouveau/nv04_crtc.c index f1a3ae491995..118261d4927a 100644 --- a/drivers/gpu/drm/nouveau/nv04_crtc.c +++ b/drivers/gpu/drm/nouveau/nv04_crtc.c | |||
@@ -1035,7 +1035,7 @@ nv04_crtc_create(struct drm_device *dev, int crtc_num) | |||
1035 | drm_crtc_helper_add(&nv_crtc->base, &nv04_crtc_helper_funcs); | 1035 | drm_crtc_helper_add(&nv_crtc->base, &nv04_crtc_helper_funcs); |
1036 | drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256); | 1036 | drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256); |
1037 | 1037 | ||
1038 | ret = nouveau_bo_new(dev, NULL, 64*64*4, 0x100, TTM_PL_FLAG_VRAM, | 1038 | ret = nouveau_bo_new(dev, 64*64*4, 0x100, TTM_PL_FLAG_VRAM, |
1039 | 0, 0x0000, &nv_crtc->cursor.nvbo); | 1039 | 0, 0x0000, &nv_crtc->cursor.nvbo); |
1040 | if (!ret) { | 1040 | if (!ret) { |
1041 | ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); | 1041 | ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); |
diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c index 115b780247ee..46ad59ea2185 100644 --- a/drivers/gpu/drm/nouveau/nv50_crtc.c +++ b/drivers/gpu/drm/nouveau/nv50_crtc.c | |||
@@ -747,7 +747,7 @@ nv50_crtc_create(struct drm_device *dev, int index) | |||
747 | } | 747 | } |
748 | nv_crtc->lut.depth = 0; | 748 | nv_crtc->lut.depth = 0; |
749 | 749 | ||
750 | ret = nouveau_bo_new(dev, NULL, 4096, 0x100, TTM_PL_FLAG_VRAM, | 750 | ret = nouveau_bo_new(dev, 4096, 0x100, TTM_PL_FLAG_VRAM, |
751 | 0, 0x0000, &nv_crtc->lut.nvbo); | 751 | 0, 0x0000, &nv_crtc->lut.nvbo); |
752 | if (!ret) { | 752 | if (!ret) { |
753 | ret = nouveau_bo_pin(nv_crtc->lut.nvbo, TTM_PL_FLAG_VRAM); | 753 | ret = nouveau_bo_pin(nv_crtc->lut.nvbo, TTM_PL_FLAG_VRAM); |
@@ -773,7 +773,7 @@ nv50_crtc_create(struct drm_device *dev, int index) | |||
773 | drm_crtc_helper_add(&nv_crtc->base, &nv50_crtc_helper_funcs); | 773 | drm_crtc_helper_add(&nv_crtc->base, &nv50_crtc_helper_funcs); |
774 | drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256); | 774 | drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256); |
775 | 775 | ||
776 | ret = nouveau_bo_new(dev, NULL, 64*64*4, 0x100, TTM_PL_FLAG_VRAM, | 776 | ret = nouveau_bo_new(dev, 64*64*4, 0x100, TTM_PL_FLAG_VRAM, |
777 | 0, 0x0000, &nv_crtc->cursor.nvbo); | 777 | 0, 0x0000, &nv_crtc->cursor.nvbo); |
778 | if (!ret) { | 778 | if (!ret) { |
779 | ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); | 779 | ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); |
diff --git a/drivers/gpu/drm/nouveau/nv50_evo.c b/drivers/gpu/drm/nouveau/nv50_evo.c index 9bba97f15b04..c99d9751880c 100644 --- a/drivers/gpu/drm/nouveau/nv50_evo.c +++ b/drivers/gpu/drm/nouveau/nv50_evo.c | |||
@@ -117,7 +117,7 @@ nv50_evo_channel_new(struct drm_device *dev, int chid, | |||
117 | evo->user_get = 4; | 117 | evo->user_get = 4; |
118 | evo->user_put = 0; | 118 | evo->user_put = 0; |
119 | 119 | ||
120 | ret = nouveau_bo_new(dev, NULL, 4096, 0, TTM_PL_FLAG_VRAM, 0, 0, | 120 | ret = nouveau_bo_new(dev, 4096, 0, TTM_PL_FLAG_VRAM, 0, 0, |
121 | &evo->pushbuf_bo); | 121 | &evo->pushbuf_bo); |
122 | if (ret == 0) | 122 | if (ret == 0) |
123 | ret = nouveau_bo_pin(evo->pushbuf_bo, TTM_PL_FLAG_VRAM); | 123 | ret = nouveau_bo_pin(evo->pushbuf_bo, TTM_PL_FLAG_VRAM); |
@@ -332,7 +332,7 @@ nv50_evo_create(struct drm_device *dev) | |||
332 | if (ret) | 332 | if (ret) |
333 | goto err; | 333 | goto err; |
334 | 334 | ||
335 | ret = nouveau_bo_new(dev, NULL, 4096, 0x1000, TTM_PL_FLAG_VRAM, | 335 | ret = nouveau_bo_new(dev, 4096, 0x1000, TTM_PL_FLAG_VRAM, |
336 | 0, 0x0000, &dispc->sem.bo); | 336 | 0, 0x0000, &dispc->sem.bo); |
337 | if (!ret) { | 337 | if (!ret) { |
338 | ret = nouveau_bo_pin(dispc->sem.bo, TTM_PL_FLAG_VRAM); | 338 | ret = nouveau_bo_pin(dispc->sem.bo, TTM_PL_FLAG_VRAM); |