Lines Matching refs:drm

49 	struct nouveau_drm *drm = nouveau_drm(dev);  in nv10_bo_update_tile_region()  local
50 int i = reg - drm->tile.reg; in nv10_bo_update_tile_region()
51 struct nvkm_fb *pfb = nvxx_fb(&drm->device); in nv10_bo_update_tile_region()
74 struct nouveau_drm *drm = nouveau_drm(dev); in nv10_bo_get_tile_region() local
75 struct nouveau_drm_tile *tile = &drm->tile.reg[i]; in nv10_bo_get_tile_region()
77 spin_lock(&drm->tile.lock); in nv10_bo_get_tile_region()
85 spin_unlock(&drm->tile.lock); in nv10_bo_get_tile_region()
93 struct nouveau_drm *drm = nouveau_drm(dev); in nv10_bo_put_tile_region() local
96 spin_lock(&drm->tile.lock); in nv10_bo_put_tile_region()
99 spin_unlock(&drm->tile.lock); in nv10_bo_put_tile_region()
107 struct nouveau_drm *drm = nouveau_drm(dev); in nv10_bo_set_tiling() local
108 struct nvkm_fb *pfb = nvxx_fb(&drm->device); in nv10_bo_set_tiling()
136 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_bo_del_ttm() local
137 struct drm_device *dev = drm->dev; in nouveau_bo_del_ttm()
151 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); in nouveau_bo_fixup_align() local
152 struct nvif_device *device = &drm->device; in nouveau_bo_fixup_align()
187 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_bo_new() local
195 if (drm->client.vm) in nouveau_bo_new()
196 lpg_shift = drm->client.vm->mmu->lpg_shift; in nouveau_bo_new()
200 NV_WARN(drm, "skipped size %x\n", (u32)size); in nouveau_bo_new()
215 nvbo->bo.bdev = &drm->ttm.bdev; in nouveau_bo_new()
217 if (!nv_device_is_cpu_coherent(nvxx_device(&drm->device))) in nouveau_bo_new()
221 if (drm->client.vm) { in nouveau_bo_new()
223 nvbo->page_shift = drm->client.vm->mmu->lpg_shift; in nouveau_bo_new()
230 acc_size = ttm_bo_dma_acc_size(&drm->ttm.bdev, size, in nouveau_bo_new()
233 ret = ttm_bo_init(&drm->ttm.bdev, &nvbo->bo, size, in nouveau_bo_new()
262 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); in set_placement_range() local
263 u32 vram_pages = drm->device.info.ram_size >> PAGE_SHIFT; in set_placement_range()
266 if (drm->device.info.family == NV_DEVICE_INFO_V0_CELSIUS && in set_placement_range()
315 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); in nouveau_bo_pin() local
324 if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA && in nouveau_bo_pin()
339 NV_ERROR(drm, "bo %p pinned elsewhere: " in nouveau_bo_pin()
370 drm->gem.vram_available -= bo->mem.size; in nouveau_bo_pin()
373 drm->gem.gart_available -= bo->mem.size; in nouveau_bo_pin()
389 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); in nouveau_bo_unpin() local
408 drm->gem.vram_available += bo->mem.size; in nouveau_bo_unpin()
411 drm->gem.gart_available += bo->mem.size; in nouveau_bo_unpin()
461 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); in nouveau_bo_sync_for_device() local
462 struct nvkm_device *device = nvxx_device(&drm->device); in nouveau_bo_sync_for_device()
481 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); in nouveau_bo_sync_for_cpu() local
482 struct nvkm_device *device = nvxx_device(&drm->device); in nouveau_bo_sync_for_cpu()
583 struct nouveau_drm *drm = nouveau_bdev(bdev); in nouveau_ttm_tt_create() local
584 struct drm_device *dev = drm->dev; in nouveau_ttm_tt_create()
586 if (drm->agp.stat == ENABLED) { in nouveau_ttm_tt_create()
606 struct nouveau_drm *drm = nouveau_bdev(bdev); in nouveau_bo_init_mem_type() local
621 if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { in nouveau_bo_init_mem_type()
623 if (nvxx_bar(&drm->device)->iomap_uncached) { in nouveau_bo_init_mem_type()
636 if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) in nouveau_bo_init_mem_type()
639 if (drm->agp.stat != ENABLED) in nouveau_bo_init_mem_type()
644 if (drm->agp.stat == ENABLED) { in nouveau_bo_init_mem_type()
885 OUT_RING (chan, chan->drm->ntfy.handle); in nv50_bo_move_init()
974 OUT_RING (chan, chan->drm->ntfy.handle); in nv04_bo_move_init()
1036 nouveau_bo_move_prep(struct nouveau_drm *drm, struct ttm_buffer_object *bo, in nouveau_bo_move_prep() argument
1044 ret = nvkm_vm_get(drm->client.vm, size, old_node->page_shift, in nouveau_bo_move_prep()
1049 ret = nvkm_vm_get(drm->client.vm, size, new_node->page_shift, in nouveau_bo_move_prep()
1065 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_bo_move_m2mf() local
1066 struct nouveau_channel *chan = drm->ttm.chan; in nouveau_bo_move_m2mf()
1075 if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { in nouveau_bo_move_m2mf()
1076 ret = nouveau_bo_move_prep(drm, bo, new_mem); in nouveau_bo_move_m2mf()
1084 ret = drm->ttm.move(chan, bo, &bo->mem, new_mem); in nouveau_bo_move_m2mf()
1102 nouveau_bo_move_init(struct nouveau_drm *drm) in nouveau_bo_move_init() argument
1134 chan = drm->cechan; in nouveau_bo_move_init()
1136 chan = drm->channel; in nouveau_bo_move_init()
1143 &drm->ttm.copy); in nouveau_bo_move_init()
1145 ret = mthd->init(chan, drm->ttm.copy.handle); in nouveau_bo_move_init()
1147 nvif_object_fini(&drm->ttm.copy); in nouveau_bo_move_init()
1151 drm->ttm.move = mthd->exec; in nouveau_bo_move_init()
1152 drm->ttm.chan = chan; in nouveau_bo_move_init()
1158 NV_INFO(drm, "MM: using %s for buffer copies\n", name); in nouveau_bo_move_init()
1257 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_bo_vm_bind() local
1258 struct drm_device *dev = drm->dev; in nouveau_bo_vm_bind()
1266 if (drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS) { in nouveau_bo_vm_bind()
1280 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_bo_vm_cleanup() local
1281 struct drm_device *dev = drm->dev; in nouveau_bo_vm_cleanup()
1292 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_bo_move() local
1299 NV_WARN(drm, "Moving pinned object %p!\n", nvbo); in nouveau_bo_move()
1301 if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) { in nouveau_bo_move()
1316 if (drm->ttm.move) { in nouveau_bo_move()
1336 if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) { in nouveau_bo_move()
1358 struct nouveau_drm *drm = nouveau_bdev(bdev); in nouveau_ttm_io_mem_reserve() local
1375 if (drm->agp.stat == ENABLED) { in nouveau_ttm_io_mem_reserve()
1377 mem->bus.base = drm->agp.base; in nouveau_ttm_io_mem_reserve()
1378 mem->bus.is_iomem = !drm->dev->agp->cant_use_aperture; in nouveau_ttm_io_mem_reserve()
1381 if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA || !node->memtype) in nouveau_ttm_io_mem_reserve()
1387 mem->bus.base = nv_device_resource_start(nvxx_device(&drm->device), 1); in nouveau_ttm_io_mem_reserve()
1389 if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { in nouveau_ttm_io_mem_reserve()
1390 struct nvkm_bar *bar = nvxx_bar(&drm->device); in nouveau_ttm_io_mem_reserve()
1409 struct nouveau_drm *drm = nouveau_bdev(bdev); in nouveau_ttm_io_mem_free() local
1410 struct nvkm_bar *bar = nvxx_bar(&drm->device); in nouveau_ttm_io_mem_free()
1422 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_ttm_fault_reserve_notify() local
1424 struct nvif_device *device = &drm->device; in nouveau_ttm_fault_reserve_notify()
1432 if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA || in nouveau_ttm_fault_reserve_notify()
1447 if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA || in nouveau_ttm_fault_reserve_notify()
1469 struct nouveau_drm *drm; in nouveau_ttm_tt_populate() local
1488 drm = nouveau_bdev(ttm->bdev); in nouveau_ttm_tt_populate()
1489 device = nvxx_device(&drm->device); in nouveau_ttm_tt_populate()
1490 dev = drm->dev; in nouveau_ttm_tt_populate()
1502 if (drm->agp.stat == ENABLED) { in nouveau_ttm_tt_populate()
1543 struct nouveau_drm *drm; in nouveau_ttm_tt_unpopulate() local
1553 drm = nouveau_bdev(ttm->bdev); in nouveau_ttm_tt_unpopulate()
1554 device = nvxx_device(&drm->device); in nouveau_ttm_tt_unpopulate()
1555 dev = drm->dev; in nouveau_ttm_tt_unpopulate()
1569 if (drm->agp.stat == ENABLED) { in nouveau_ttm_tt_unpopulate()