aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-06-06 21:24:14 -0400
committerBen Skeggs <bskeggs@redhat.com>2011-06-23 01:59:44 -0400
commit180cc30637b47dafa26e3202a41964b5ebdab365 (patch)
treec6c6831aab07a9abd78c6ec5ce3c5551b462f252 /drivers
parent07533ea549e725360209f958bb916085f18ff5b9 (diff)
drm/nouveau: convert bo.mem.start usage to bo.offset
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c1
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_channel.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drv.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_notifier.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_object.c2
-rw-r--r--drivers/gpu/drm/nouveau/nv50_crtc.c6
-rw-r--r--drivers/gpu/drm/nouveau/nv50_display.c2
-rw-r--r--drivers/gpu/drm/nouveau/nv50_evo.c5
8 files changed, 10 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 46c0914991dc..ae1f0e46e481 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -433,7 +433,6 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
433 TTM_MEMTYPE_FLAG_CMA; 433 TTM_MEMTYPE_FLAG_CMA;
434 man->available_caching = TTM_PL_MASK_CACHING; 434 man->available_caching = TTM_PL_MASK_CACHING;
435 man->default_caching = TTM_PL_FLAG_CACHED; 435 man->default_caching = TTM_PL_FLAG_CACHED;
436 man->gpu_offset = dev_priv->gart_info.aper_base;
437 break; 436 break;
438 default: 437 default:
439 NV_ERROR(dev, "Unknown GART type: %d\n", 438 NV_ERROR(dev, "Unknown GART type: %d\n",
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
index d199097b8918..d0e458336c75 100644
--- a/drivers/gpu/drm/nouveau/nouveau_channel.c
+++ b/drivers/gpu/drm/nouveau/nouveau_channel.c
@@ -54,7 +54,7 @@ nouveau_channel_pushbuf_init(struct nouveau_channel *chan)
54 * buffer resides, userspace can submit its own push buffers from 54 * buffer resides, userspace can submit its own push buffers from
55 * anywhere within the same memtype. 55 * anywhere within the same memtype.
56 */ 56 */
57 chan->pushbuf_base = chan->pushbuf_bo->bo.mem.start << PAGE_SHIFT; 57 chan->pushbuf_base = chan->pushbuf_bo->bo.offset;
58 if (dev_priv->card_type >= NV_50) { 58 if (dev_priv->card_type >= NV_50) {
59 if (dev_priv->card_type < NV_C0) { 59 if (dev_priv->card_type < NV_C0) {
60 ret = nouveau_gpuobj_dma_new(chan, 60 ret = nouveau_gpuobj_dma_new(chan,
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
index 4e481c39f5a4..8256370e5938 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -358,7 +358,7 @@ nouveau_pci_resume(struct pci_dev *pdev)
358 358
359 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { 359 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
360 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); 360 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
361 u32 offset = nv_crtc->cursor.nvbo->bo.mem.start << PAGE_SHIFT; 361 u32 offset = nv_crtc->cursor.nvbo->bo.offset;
362 362
363 nv_crtc->cursor.set_offset(nv_crtc, offset); 363 nv_crtc->cursor.set_offset(nv_crtc, offset);
364 nv_crtc->cursor.set_pos(nv_crtc, nv_crtc->cursor_saved_x, 364 nv_crtc->cursor.set_pos(nv_crtc, nv_crtc->cursor_saved_x,
diff --git a/drivers/gpu/drm/nouveau/nouveau_notifier.c b/drivers/gpu/drm/nouveau/nouveau_notifier.c
index 29190e845fd7..81b54e0bb822 100644
--- a/drivers/gpu/drm/nouveau/nouveau_notifier.c
+++ b/drivers/gpu/drm/nouveau/nouveau_notifier.c
@@ -122,7 +122,7 @@ nouveau_notifier_alloc(struct nouveau_channel *chan, uint32_t handle,
122 target = NV_MEM_TARGET_VRAM; 122 target = NV_MEM_TARGET_VRAM;
123 else 123 else
124 target = NV_MEM_TARGET_GART; 124 target = NV_MEM_TARGET_GART;
125 offset = chan->notifier_bo->bo.mem.start << PAGE_SHIFT; 125 offset = chan->notifier_bo->bo.offset;
126 } else { 126 } else {
127 target = NV_MEM_TARGET_VM; 127 target = NV_MEM_TARGET_VM;
128 offset = chan->notifier_bo->vma.offset; 128 offset = chan->notifier_bo->vma.offset;
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c
index ab4be9ca43cc..37e6ca8990c6 100644
--- a/drivers/gpu/drm/nouveau/nouveau_object.c
+++ b/drivers/gpu/drm/nouveau/nouveau_object.c
@@ -768,7 +768,7 @@ nouveau_gpuobj_channel_init(struct nouveau_channel *chan,
768 struct nouveau_gpuobj *sem = NULL; 768 struct nouveau_gpuobj *sem = NULL;
769 struct nv50_display_crtc *dispc = 769 struct nv50_display_crtc *dispc =
770 &nv50_display(dev)->crtc[i]; 770 &nv50_display(dev)->crtc[i];
771 u64 offset = dispc->sem.bo->bo.mem.start << PAGE_SHIFT; 771 u64 offset = dispc->sem.bo->bo.offset;
772 772
773 ret = nouveau_gpuobj_dma_new(chan, 0x3d, offset, 0xfff, 773 ret = nouveau_gpuobj_dma_new(chan, 0x3d, offset, 0xfff,
774 NV_MEM_ACCESS_RW, 774 NV_MEM_ACCESS_RW,
diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c
index ebabacf38da9..115b780247ee 100644
--- a/drivers/gpu/drm/nouveau/nv50_crtc.c
+++ b/drivers/gpu/drm/nouveau/nv50_crtc.c
@@ -104,7 +104,7 @@ nv50_crtc_blank(struct nouveau_crtc *nv_crtc, bool blanked)
104 OUT_RING(evo, nv_crtc->lut.depth == 8 ? 104 OUT_RING(evo, nv_crtc->lut.depth == 8 ?
105 NV50_EVO_CRTC_CLUT_MODE_OFF : 105 NV50_EVO_CRTC_CLUT_MODE_OFF :
106 NV50_EVO_CRTC_CLUT_MODE_ON); 106 NV50_EVO_CRTC_CLUT_MODE_ON);
107 OUT_RING(evo, (nv_crtc->lut.nvbo->bo.mem.start << PAGE_SHIFT) >> 8); 107 OUT_RING(evo, nv_crtc->lut.nvbo->bo.offset >> 8);
108 if (dev_priv->chipset != 0x50) { 108 if (dev_priv->chipset != 0x50) {
109 BEGIN_RING(evo, 0, NV84_EVO_CRTC(index, CLUT_DMA), 1); 109 BEGIN_RING(evo, 0, NV84_EVO_CRTC(index, CLUT_DMA), 1);
110 OUT_RING(evo, NvEvoVRAM); 110 OUT_RING(evo, NvEvoVRAM);
@@ -372,7 +372,7 @@ nv50_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
372 372
373 nouveau_bo_unmap(cursor); 373 nouveau_bo_unmap(cursor);
374 374
375 nv_crtc->cursor.set_offset(nv_crtc, nv_crtc->cursor.nvbo->bo.mem.start << PAGE_SHIFT); 375 nv_crtc->cursor.set_offset(nv_crtc, nv_crtc->cursor.nvbo->bo.offset);
376 nv_crtc->cursor.show(nv_crtc, true); 376 nv_crtc->cursor.show(nv_crtc, true);
377 377
378out: 378out:
@@ -546,7 +546,7 @@ nv50_crtc_do_mode_set_base(struct drm_crtc *crtc,
546 } 546 }
547 } 547 }
548 548
549 nv_crtc->fb.offset = fb->nvbo->bo.mem.start << PAGE_SHIFT; 549 nv_crtc->fb.offset = fb->nvbo->bo.offset;
550 nv_crtc->fb.tile_flags = nouveau_bo_tile_layout(fb->nvbo); 550 nv_crtc->fb.tile_flags = nouveau_bo_tile_layout(fb->nvbo);
551 nv_crtc->fb.cpp = drm_fb->bits_per_pixel / 8; 551 nv_crtc->fb.cpp = drm_fb->bits_per_pixel / 8;
552 if (!nv_crtc->fb.blanked && dev_priv->chipset != 0x50) { 552 if (!nv_crtc->fb.blanked && dev_priv->chipset != 0x50) {
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 08da478ba544..93857e6c662d 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -484,7 +484,7 @@ nv50_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb,
484 OUT_RING (evo, 0x00000000); 484 OUT_RING (evo, 0x00000000);
485 OUT_RING (evo, 0x00000000); 485 OUT_RING (evo, 0x00000000);
486 BEGIN_RING(evo, 0, 0x0800, 5); 486 BEGIN_RING(evo, 0, 0x0800, 5);
487 OUT_RING (evo, (nv_fb->nvbo->bo.mem.start << PAGE_SHIFT) >> 8); 487 OUT_RING (evo, nv_fb->nvbo->bo.offset >> 8);
488 OUT_RING (evo, 0); 488 OUT_RING (evo, 0);
489 OUT_RING (evo, (fb->height << 16) | fb->width); 489 OUT_RING (evo, (fb->height << 16) | fb->width);
490 OUT_RING (evo, nv_fb->r_pitch); 490 OUT_RING (evo, nv_fb->r_pitch);
diff --git a/drivers/gpu/drm/nouveau/nv50_evo.c b/drivers/gpu/drm/nouveau/nv50_evo.c
index 18c61929c450..9bba97f15b04 100644
--- a/drivers/gpu/drm/nouveau/nv50_evo.c
+++ b/drivers/gpu/drm/nouveau/nv50_evo.c
@@ -154,7 +154,7 @@ nv50_evo_channel_init(struct nouveau_channel *evo)
154{ 154{
155 struct drm_device *dev = evo->dev; 155 struct drm_device *dev = evo->dev;
156 int id = evo->id, ret, i; 156 int id = evo->id, ret, i;
157 u64 pushbuf = evo->pushbuf_bo->bo.mem.start << PAGE_SHIFT; 157 u64 pushbuf = evo->pushbuf_bo->bo.offset;
158 u32 tmp; 158 u32 tmp;
159 159
160 tmp = nv_rd32(dev, NV50_PDISPLAY_EVO_CTRL(id)); 160 tmp = nv_rd32(dev, NV50_PDISPLAY_EVO_CTRL(id));
@@ -335,13 +335,12 @@ nv50_evo_create(struct drm_device *dev)
335 ret = nouveau_bo_new(dev, NULL, 4096, 0x1000, TTM_PL_FLAG_VRAM, 335 ret = nouveau_bo_new(dev, NULL, 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 offset = dispc->sem.bo->bo.mem.start << PAGE_SHIFT;
339
340 ret = nouveau_bo_pin(dispc->sem.bo, TTM_PL_FLAG_VRAM); 338 ret = nouveau_bo_pin(dispc->sem.bo, TTM_PL_FLAG_VRAM);
341 if (!ret) 339 if (!ret)
342 ret = nouveau_bo_map(dispc->sem.bo); 340 ret = nouveau_bo_map(dispc->sem.bo);
343 if (ret) 341 if (ret)
344 nouveau_bo_ref(NULL, &dispc->sem.bo); 342 nouveau_bo_ref(NULL, &dispc->sem.bo);
343 offset = dispc->sem.bo->bo.offset;
345 } 344 }
346 345
347 if (ret) 346 if (ret)