Home
last modified time | relevance | path

Searched full:vram (Results 1 – 25 of 234) sorted by relevance

12345678910

/linux/drivers/gpu/drm/nouveau/nvkm/subdev/fb/
H A Dram.c48 struct nvkm_vram *vram = nvkm_vram(memory); in nvkm_vram_map() local
50 .memory = &vram->memory, in nvkm_vram_map()
52 .mem = vram->mn, in nvkm_vram_map()
67 struct nvkm_vram *vram = nvkm_vram(memory); in nvkm_vram_addr() local
68 if (!nvkm_mm_contiguous(vram->mn)) in nvkm_vram_addr()
70 return (u64)nvkm_mm_addr(vram->mn) << NVKM_RAM_MM_SHIFT; in nvkm_vram_addr()
88 struct nvkm_vram *vram = nvkm_vram(memory); in nvkm_vram_dtor() local
89 struct nvkm_mm_node *next = vram->mn; in nvkm_vram_dtor()
94 mutex_lock(&vram->ram->mutex); in nvkm_vram_dtor()
97 nvkm_mm_free(&vram->ram->vram, &node); in nvkm_vram_dtor()
[all …]
H A Dramgp102.c24 nvkm_mm_fini(&(*pram)->vram); in gp102_ram_new()
26 return nvkm_mm_init(&(*pram)->vram, NVKM_RAM_MM_NORMAL, in gp102_ram_new()
/linux/drivers/gpu/drm/virtio/
H A Dvirtgpu_vram.c10 struct virtio_gpu_object_vram *vram = to_virtio_gpu_vram(bo); in virtio_gpu_vram_free() local
15 unmap = drm_mm_node_allocated(&vram->vram_node); in virtio_gpu_vram_free()
38 struct virtio_gpu_object_vram *vram = to_virtio_gpu_vram(bo); in virtio_gpu_vram_mmap() local
45 wait_event(vgdev->resp_wq, vram->map_state != STATE_INITIALIZING); in virtio_gpu_vram_mmap()
46 if (vram->map_state != STATE_OK) in virtio_gpu_vram_mmap()
55 if (vram->map_info == VIRTIO_GPU_MAP_CACHE_WC) in virtio_gpu_vram_mmap()
57 else if (vram->map_info == VIRTIO_GPU_MAP_CACHE_UNCACHED) in virtio_gpu_vram_mmap()
63 if (vm_end > vram->vram_node.size) in virtio_gpu_vram_mmap()
67 (vram->vram_node.start >> PAGE_SHIFT) + vma->vm_pgoff, in virtio_gpu_vram_mmap()
77 struct virtio_gpu_object_vram *vram = to_virtio_gpu_vram(bo); in virtio_gpu_vram_map_dma_buf() local
[all …]
H A Dvirtgpu_object.c74 struct virtio_gpu_object_vram *vram = to_virtio_gpu_vram(bo); in virtio_gpu_cleanup_object() local
77 if (drm_mm_node_allocated(&vram->vram_node)) in virtio_gpu_cleanup_object()
78 drm_mm_remove_node(&vram->vram_node); in virtio_gpu_cleanup_object()
82 drm_gem_free_mmap_offset(&vram->base.base.base); in virtio_gpu_cleanup_object()
83 drm_gem_object_release(&vram->base.base.base); in virtio_gpu_cleanup_object()
84 kfree(vram); in virtio_gpu_cleanup_object()
/linux/drivers/gpu/drm/radeon/
H A Dradeon_benchmark.c192 /* simple test, VRAM to GTT and GTT to VRAM */ in radeon_benchmark()
199 /* simple test, VRAM to VRAM */ in radeon_benchmark()
204 /* GTT to VRAM, buffer size sweep, powers of 2 */ in radeon_benchmark()
211 /* VRAM to GTT, buffer size sweep, powers of 2 */ in radeon_benchmark()
218 /* VRAM to VRAM, buffer size sweep, powers of 2 */ in radeon_benchmark()
225 /* GTT to VRAM, buffer size sweep, common modes */ in radeon_benchmark()
232 /* VRAM to GTT, buffer size sweep, common modes */ in radeon_benchmark()
239 /* VRAM to VRAM, buffer size sweep, common modes */ in radeon_benchmark()
H A Dradeon_test.c34 /* Test BO GTT->VRAM and VRAM->GTT GPU copies across the whole GTT aperture */
73 DRM_ERROR("Failed to create VRAM object\n"); in radeon_do_test_moves()
81 DRM_ERROR("Failed to pin VRAM object\n"); in radeon_do_test_moves()
129 DRM_ERROR("Failed GTT->VRAM copy %d\n", i); in radeon_do_test_moves()
136 DRM_ERROR("Failed to wait for GTT->VRAM fence %d\n", i); in radeon_do_test_moves()
144 DRM_ERROR("Failed to map VRAM object after copy %d\n", i); in radeon_do_test_moves()
153 DRM_ERROR("Incorrect GTT->VRAM copy %d: Got 0x%p, " in radeon_do_test_moves()
154 "expected 0x%p (GTT/VRAM offset " in radeon_do_test_moves()
180 DRM_ERROR("Failed VRAM->GTT copy %d\n", i); in radeon_do_test_moves()
187 DRM_ERROR("Failed to wait for VRAM->GTT fence %d\n", i); in radeon_do_test_moves()
[all …]
H A Dradeon_object.c83 * CPU accessible part of VRAM in radeon_ttm_placement_from_domain()
300 /* A BO shared as a dma-buf cannot be sensibly migrated to VRAM */ in radeon_bo_pin_restricted()
388 /* reserve PAT memory space to WC for VRAM */ in radeon_bo_init()
392 /* Add an MTRR for the VRAM */ in radeon_bo_init()
397 DRM_INFO("Detected VRAM RAM=%lluM, BAR=%lluM\n", in radeon_bo_init()
421 /* This function is based on the current VRAM usage. in radeon_bo_get_threshold_for_moves()
423 * - If all of VRAM is free, allow relocating the number of bytes that in radeon_bo_get_threshold_for_moves()
424 * is equal to 1/4 of the size of VRAM for this IB. in radeon_bo_get_threshold_for_moves()
426 * - If more than one half of VRAM is occupied, only allow relocating in radeon_bo_get_threshold_for_moves()
429 * - From 0 to one half of used VRAM, the threshold decreases in radeon_bo_get_threshold_for_moves()
[all …]
/linux/drivers/gpu/drm/xe/
H A Dxe_tile_types.h27 * an SGunit, 1-2 GTs, and (for discrete platforms) VRAM.
69 * @mem.kernel_vram: kernel-dedicated VRAM info for tile.
71 * Although VRAM is associated with a specific tile, it can
77 * @mem.vram: general purpose VRAM info for tile.
79 * Although VRAM is associated with a specific tile, it can
82 struct xe_vram_region *vram; member
126 /** @migrate: Migration helper for vram blits and clearing */
H A Dxe_bo_evict.c57 * pinned VRAM objects which need to be saved.
86 * pinned VRAM objects which have been restored.
108 * xe_bo_evict_all_user - evict all non-pinned user BOs from VRAM
113 * Evict == move VRAM BOs to temporary (typically system) memory.
148 * xe_bo_evict_all - evict all BOs from VRAM
155 * Evict == move VRAM BOs to temporary (typically system) memory.
158 * where the VRAM loses power.
216 * xe_bo_restore_early - restore early phase kernel BOs to VRAM
220 * Move kernel BOs from temporary (typically system) memory to VRAM via CPU. All
239 * (typically system) memory to VRAM. All moves done via TTM calls.
[all …]
H A Dxe_gt_sriov_pf_migration.c519 struct xe_bo *vram, u64 vram_offset, in __pf_save_restore_vram() argument
529 err = drm_exec_lock_obj(&exec, &vram->ttm.base); in __pf_save_restore_vram()
544 ret = xe_migrate_vram_copy_chunk(vram, vram_offset, sysmem, sysmem_offset, size, in __pf_save_restore_vram()
587 pf_dump_mig_data(gt, vfid, data, "VRAM data save"); in pf_save_vram_chunk()
605 struct xe_bo *vram; in pf_save_vf_vram_mig_data() local
609 vram = xe_gt_sriov_pf_config_get_lmem_obj(gt, vfid); in pf_save_vf_vram_mig_data()
610 if (!vram) in pf_save_vf_vram_mig_data()
613 vram_size = xe_bo_size(vram); in pf_save_vf_vram_mig_data()
619 ret = pf_save_vram_chunk(gt, vfid, vram, *offset, chunk_size); in pf_save_vf_vram_mig_data()
625 xe_bo_put(vram); in pf_save_vf_vram_mig_data()
[all …]
H A Dxe_bo.c215 * For eviction / restore on suspend / resume objects pinned in VRAM in force_contiguous()
240 return xe->tiles[tile_id].mem.vram->placement; in bo_vram_flags_to_vram_placement()
250 struct xe_vram_region *vram; in add_vram() local
255 vram = container_of(vram_mgr, struct xe_vram_region, ttm); in add_vram()
256 xe_assert(xe, vram && vram->usable_size); in add_vram()
257 io_size = vram->io_size; in add_vram()
262 if (io_size < vram->usable_size) { in add_vram()
611 * xe_bo_is_visible_vram - check if BO is placed entirely in visible VRAM.
638 struct xe_vram_region *vram = res_to_mem_region(mem); in xe_ttm_io_mem_reserve() local
645 if (vram->mapping && in xe_ttm_io_mem_reserve()
[all …]
H A Dxe_migrate.c137 (xe->mem.vram), SZ_1G); in xe_migrate_vram_ofs()
139 addr -= xe_vram_region_dpa_base(xe->mem.vram); in xe_migrate_vram_ofs()
146 struct xe_vram_region *vram = xe->mem.vram; in xe_migrate_program_identity() local
147 resource_size_t dpa_base = xe_vram_region_dpa_base(vram); in xe_migrate_program_identity()
151 u64 vram_limit = xe_vram_region_actual_physical_size(vram) + dpa_base; in xe_migrate_program_identity()
158 xe_assert(xe, IS_ALIGNED(xe_vram_region_usable_size(vram), SZ_2M)); in xe_migrate_program_identity()
326 /* Identity map the entire vram at 256GiB offset */ in xe_migrate_prepare_vm()
329 resource_size_t actual_phy_size = xe_vram_region_actual_physical_size(xe->mem.vram); in xe_migrate_prepare_vm()
336 * Identity map the entire vram for compressed pat_index for xe2+ in xe_migrate_prepare_vm()
363 * [PT27 = PDE 0] [PT28 = PDE 1] [PT29 = PDE 2] [PT30 & PT31 = 2M vram identity map] in xe_migrate_suballoc_manager_init()
[all …]
/linux/drivers/video/fbdev/
H A Dsh7760fb.c377 unsigned long vram; in sh7760fb_alloc_mem() local
390 /* min VRAM: xres_min = 16, yres_min = 1, bpp = 1: 2byte -> 1 page in sh7760fb_alloc_mem()
391 max VRAM: xres_max = 1024, yres_max = 1024, bpp = 16: 2MB */ in sh7760fb_alloc_mem()
393 vram = info->var.xres * info->var.yres; in sh7760fb_alloc_mem()
396 vram >>= 3; in sh7760fb_alloc_mem()
398 vram >>= 2; in sh7760fb_alloc_mem()
400 vram >>= 1; in sh7760fb_alloc_mem()
402 vram *= 2; in sh7760fb_alloc_mem()
403 if ((vram < 1) || (vram > 1024 * 2048)) { in sh7760fb_alloc_mem()
404 fb_dbg(info, "too much VRAM required. Check settings\n"); in sh7760fb_alloc_mem()
[all …]
H A Dcontrolfb.c277 /* Work out which banks of VRAM we have installed. */
278 /* danj: I guess the card just ignores writes to nonexistant VRAM... */
285 * Set VRAM in 2MB (bank 1) mode in find_vram_size()
286 * VRAM Bank 2 will be accessible through offset 0x600000 if present in find_vram_size()
287 * and VRAM Bank 1 will not respond at that offset even if present in find_vram_size()
299 * Set VRAM in 2MB (bank 2) mode in find_vram_size()
300 * VRAM Bank 1 will be accessible through offset 0x000000 if present in find_vram_size()
301 * and VRAM Bank 2 will not respond at that offset even if present in find_vram_size()
315 * vram bank 2 only in find_vram_size()
323 * 4 MB vram in find_vram_size()
[all …]
/linux/drivers/gpu/drm/nouveau/
H A Dnouveau_chan.c39 MODULE_PARM_DESC(vram_pushbuf, "Create DMA push buffers in VRAM");
102 nvif_object_dtor(&chan->vram); in nouveau_channel_del()
208 /* nv04 vram pushbuf hack, retarget to its location in in nouveau_channel_prep()
209 * the framebuffer bar rather than direct vram access.. in nouveau_channel_prep()
354 nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart) in nouveau_channel_init() argument
387 /* allocate dma objects to cover all allowed vram, and gart */ in nouveau_channel_init()
401 ret = nvif_object_ctor(&chan->user, "abi16ChanVramCtxDma", vram, in nouveau_channel_init()
403 &chan->vram); in nouveau_channel_init()
495 bool priv, u64 runm, u32 vram, u32 gart, struct nouveau_channel **pchan) in nouveau_channel_new() argument
505 ret = nouveau_channel_init(*pchan, vram, gart); in nouveau_channel_new()
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_gmc.c50 * amdgpu_gmc_pdb0_alloc - allocate vram for pdb0
205 * amdgpu_gmc_vram_location - try to find VRAM location
209 * @base: base address at which to put VRAM
211 * Function will try to place VRAM at base address provided
235 dev_info(adev->dev, "VRAM: %lluM 0x%016llX - 0x%016llX (%lluM used)\n", in amdgpu_gmc_vram_location()
240 /** amdgpu_gmc_sysvm_location - place vram and gart in sysvm aperture
246 * case, we use sysvm aperture (vmid0 page tables) for both vram
254 * address 0. So vram start at address 0 and gart is right after vram.
276 dev_info(adev->dev, "VRAM: %lluM 0x%016llX - 0x%016llX (%lluM used)\n", in amdgpu_gmc_sysvm_location()
288 * @gart_placement: GART placement policy with respect to VRAM
[all …]
H A Damdgpu_gart.c115 * dedicated VRAM.
227 * have dedicated VRAM.
254 * amdgpu_gart_table_vram_alloc - allocate vram for gart page table
281 * amdgpu_gart_table_vram_free - free gart page table vram
378 * amdgpu_gart_map_vram_range - map VRAM pages into the GART page table
387 * Binds a BO that is allocated in VRAM to the GART page table
390 * Useful when a kernel BO is located in VRAM but
400 /* The SYSTEM flag indicates the pages aren't in VRAM. */ in amdgpu_gart_map_vram_range()
H A Damdgpu_gmc.h232 * about vram size near mc fb location */
266 * which the first part is vram and the second part is gart (covering
271 /* FB region , it's same as local vram region in single GPU, in XGMI
274 * GPU0's vram starts at offset (0 * segment size) ,
387 * amdgpu_gmc_vram_full_visible - Check if full VRAM is visible through the BAR
392 * True if full VRAM is visible through the BAR
/linux/drivers/gpu/drm/xe/regs/
H A Dxe_bars.h9 #define LMEM_BAR 2 /* VRAM */
10 #define VF_LMEM_BAR 9 /* VF VRAM */
/linux/drivers/gpu/drm/loongson/
H A Dlsdc_drv.c156 * device contains the base address and size of the VRAM, both the GPU and
157 * the DC could access the on-board VRAM.
175 drm_err(ddev, "No GPU device, then no VRAM\n"); in lsdc_get_dedicated_vram()
186 drm_info(ddev, "Dedicated vram start: 0x%llx, size: %uMiB\n", in lsdc_get_dedicated_vram()
214 drm_err(ddev, "Init VRAM failed: %d\n", ret); in lsdc_create_device()
343 /* unpin all of buffers in the VRAM */ in lsdc_drm_freeze()
/linux/drivers/gpu/drm/xe/display/
H A Dxe_panic.c55 struct xe_vram_region *vram = xe_bo_device(bo)->mem.vram; in xe_panic_page_set_pixel() local
64 vram->mapping + panic->res.start); in xe_panic_page_set_pixel()
/linux/Documentation/fb/
H A Dtgafb.rst9 - ZLxP-E1 (8bpp, 2 MB VRAM)
10 - ZLxP-E2 (32bpp, 8 MB VRAM)
11 - ZLxP-E3 (32bpp, 16 MB VRAM, Zbuffer)
/linux/drivers/gpu/drm/mgag200/
H A DKconfig17 bool "Disable Write Combine mapping of VRAM"
20 The VRAM of the G200 is mapped with Write-Combine to improve
/linux/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_overlay.c214 * Move a buffer to vram or gmr if @pin is set, else unpin the buffer.
217 * used with GMRs instead of being locked to vram.
236 * but left in vram. This allows for instance mode_set to evict it
288 * -ENOMEM if buffer doesn't fit in vram.
325 * Might return -ENOMEM if it can't fit the buffer in vram. in vmw_overlay_update_stream()
353 * Used by the kms code after moving a new scanout buffer to vram.
387 * Used by the kms code when moving a new scanout buffer to vram.
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
H A Dshadowramin.c80 /* check that the window is enabled and in vram, particularly in pramin_init()
81 * important as we don't want to be touching vram on an in pramin_init()
93 nvkm_debug(subdev, "... not in vram\n"); in pramin_init()

12345678910