Home
last modified time | relevance | path

Searched full:vram (Results 1 – 25 of 250) 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/
H A Ddrm_gem_vram_helper.c30 * This library provides &struct drm_gem_vram_object (GEM VRAM), a GEM
31 * buffer object that is backed by video RAM (VRAM). It can be used for
36 * VRAM buffer objects are either placed in the video memory or remain evicted
43 * contains dedicated video memory, the DRM driver can use the VRAM helper
47 * left in VRAM, inactive GEM objects can be moved to system memory.
49 * To initialize the VRAM helper library call drmm_vram_helper_init().
74 * // setup device, vram base and size
86 * manages an area of video RAM with VRAM MM and provides GEM VRAM objects
89 * You don't have to clean up the instance of VRAM MM.
166 * drm_gem_vram_create() - Creates a VRAM-backed GEM object
[all …]
/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 …]
H A Dradeon_device.c527 * radeon_vram_location - try to find VRAM location
530 * @base: base address at which to put VRAM
532 * Function will try to place VRAM at base address provided
536 * If there is not enough space to fit the unvisible VRAM in the 32bits
537 * address space then we limit the VRAM size to the aperture.
540 * room for all the VRAM than we restrict the VRAM to the PCI aperture
543 * This function will never fails, worst case are limiting VRAM.
548 * Note 1: We don't explicitly enforce VRAM start to be aligned on VRAM size,
554 * cover the whole aperture even if VRAM size is inferior to aperture size
557 * Note 3: when limiting vram it's safe to overwrite real_vram_size because
[all …]
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_vram_mgr.c96 * The amdgpu driver provides a sysfs API for reporting current total VRAM
99 * amount of VRAM in bytes
114 * visible VRAM available on the device
116 * amount of visible VRAM in bytes
130 * The amdgpu driver provides a sysfs API for reporting current total VRAM
133 * amount of currently used VRAM in bytes
150 * used visible VRAM
152 * amount of currently used visible VRAM in bytes
169 * installed VRAM
254 * Calculate how many bytes of the DRM BUDDY block are inside visible VRAM
[all …]
H A Damdgpu_ttm.c139 /* Try evicting to the CPU inaccessible part of VRAM in amdgpu_evict_flags()
142 * BOs to be evicted from VRAM in amdgpu_evict_flags()
380 * help move buffers to and from VRAM.
1498 * driver (pages, VRAM, GART space). They point to resources in amdgpu_ttm_bo_eviction_valuable()
1617 * This is used to access VRAM that backs a buffer object via MMIO
1644 /* using MM to access rest vram and handle un-aligned address */ in amdgpu_ttm_access_memory()
1683 * amdgpu_ttm_fw_reserve_vram_fini - free fw reserved vram
1687 * free fw reserved vram if it has been reserved.
1699 * amdgpu_ttm_drv_reserve_vram_fini - free drv reserved vram
1703 * free drv reserved vram if it has been reserved.
[all …]
H A Damdgpu_gart.c115 * dedicated VRAM.
227 * have dedicated VRAM.
254 * amdgpu_gart_table_vram_alloc - allocate vram for gart page table
274 * amdgpu_gart_table_vram_free - free gart page table vram
371 * amdgpu_gart_map_vram_range - map VRAM pages into the GART page table
380 * Binds a BO that is allocated in VRAM to the GART page table
383 * Useful when a kernel BO is located in VRAM but
392 /* The SYSTEM flag indicates the pages aren't in VRAM. */ in amdgpu_gart_map_vram_range()
H A Damdgpu_gmc.c49 * amdgpu_gmc_pdb0_alloc - allocate vram for pdb0
204 * amdgpu_gmc_vram_location - try to find VRAM location
208 * @base: base address at which to put VRAM
210 * Function will try to place VRAM at base address provided
234 dev_info(adev->dev, "VRAM: %lluM 0x%016llX - 0x%016llX (%lluM used)\n", in amdgpu_gmc_vram_location()
239 /** amdgpu_gmc_sysvm_location - place vram and gart in sysvm aperture
245 * case, we use sysvm aperture (vmid0 page tables) for both vram
253 * address 0. So vram start at address 0 and gart is right after vram.
275 dev_info(adev->dev, "VRAM: %lluM 0x%016llX - 0x%016llX (%lluM used)\n", in amdgpu_gmc_sysvm_location()
287 * @gart_placement: GART placement policy with respect to VRAM
[all …]
/linux/drivers/gpu/drm/xe/
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_ttm_vram_mgr.c73 /* bail out quickly if there's likely not enough VRAM for this BO */ in xe_ttm_vram_mgr_new()
341 * xe_ttm_vram_mgr_init - initialize TTM VRAM region
343 * @vram: pointer to xe_vram_region that contains the memory region attributes
345 * Initialize the Xe TTM for given @vram region using the given parameters.
349 int xe_ttm_vram_mgr_init(struct xe_device *xe, struct xe_vram_region *vram) in xe_ttm_vram_mgr_init() argument
351 return __xe_ttm_vram_mgr_init(xe, &vram->ttm, vram->placement, in xe_ttm_vram_mgr_init()
352 xe_vram_region_usable_size(vram), in xe_ttm_vram_mgr_init()
353 xe_vram_region_io_size(vram), in xe_ttm_vram_mgr_init()
402 phys_addr_t phys = cursor.start + xe_vram_region_io_start(tile->mem.vram); in xe_ttm_vram_mgr_alloc_sgt()
H A Dxe_device_types.h142 * an SGunit, 1-2 GTs, and (for discrete platforms) VRAM.
184 * @mem.kernel_vram: kernel-dedicated VRAM info for tile.
186 * Although VRAM is associated with a specific tile, it can
192 * @mem.vram: general purpose VRAM info for tile.
194 * Although VRAM is associated with a specific tile, it can
197 struct xe_vram_region *vram; member
243 /** @migrate: Migration helper for vram blits and clearing */
297 /** @info.vram_flags: Vram flags */
437 /** @mem.vram: VRAM info for device */
438 struct xe_vram_region *vram; member
[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()
613 * xe_bo_is_visible_vram - check if BO is placed entirely in visible VRAM.
640 struct xe_vram_region *vram = res_to_mem_region(mem); in xe_ttm_io_mem_reserve() local
647 if (vram->mapping && in xe_ttm_io_mem_reserve()
[all …]
H A Dxe_migrate.c135 (xe->mem.vram), SZ_1G); in xe_migrate_vram_ofs()
137 addr -= xe_vram_region_dpa_base(xe->mem.vram); in xe_migrate_vram_ofs()
144 struct xe_vram_region *vram = xe->mem.vram; in xe_migrate_program_identity() local
145 resource_size_t dpa_base = xe_vram_region_dpa_base(vram); in xe_migrate_program_identity()
149 u64 vram_limit = xe_vram_region_actual_physical_size(vram) + dpa_base; in xe_migrate_program_identity()
156 xe_assert(xe, IS_ALIGNED(xe_vram_region_usable_size(vram), SZ_2M)); in xe_migrate_program_identity()
314 /* Identity map the entire vram at 256GiB offset */ in xe_migrate_prepare_vm()
317 resource_size_t actual_phy_size = xe_vram_region_actual_physical_size(xe->mem.vram); in xe_migrate_prepare_vm()
324 * Identity map the entire vram for compressed pat_index for xe2+ in xe_migrate_prepare_vm()
345 * [PT27 = PDE 0] [PT28 = PDE 1] [PT29 = PDE 2] [PT30 & PT31 = 2M vram identity map] in xe_migrate_prepare_vm()
[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 …]
/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/xe/regs/
H A Dxe_bars.h9 #define LMEM_BAR 2 /* VRAM */
10 #define VF_LMEM_BAR 9 /* VF VRAM */
/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.

12345678910