Lines Matching +full:reserved +full:- +full:memory
3 * Copyright (c) 2006-2009 VMware, Inc., Palo Alto, CA., USA
4 * All Rights Reserved.
20 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
28 * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
67 * @is_iomem: is this io memory ?
89 * @mm_node: Memory manager node.
90 * @size: Requested size of memory region.
91 * @num_pages: Actual size of memory region in pages.
119 * but they cannot be accessed from user-space. For kernel-only use.
152 * pinned in physical memory. If this behaviour is not desired, this member
155 * @evicted: Whether the object was evicted without user-space knowing.
160 * @val_seq: Sequence of the validation holding the @reserved lock.
165 * @reserved: Deadlock-free lock used for synchronization state transitions.
171 * depending on the memory type. For SYSTEM type memory, it should be 0.
178 * GPU memory manager contexts, the driver should manage the address space
181 * these objects for even quite elaborate memory management schemes.
208 * Members protected by the bo::reserved lock.
217 * Members protected by the bo::reserved lock only when written to.
238 atomic_t reserved; member
243 * than NULL requires bo::reserved to be held. This allows for
244 * checking NULL while reserved but not holding the mentioned lock.
278 * in various memory types with various caching policies, the
300 * ttm_bo_reference - reference a struct ttm_buffer_object
310 refcount_acquire(&bo->kref); in ttm_bo_reference()
315 * ttm_bo_wait - wait for buffer idle.
325 * Returns -EBUSY if no_wait is true and the buffer is busy.
326 * Returns -ERESTARTSYS if interrupted by a signal.
341 * -EINVAL on invalid proposed placement.
342 * -ENOMEM on out-of-memory condition.
343 * -EBUSY if no_wait is true and buffer busy.
344 * -ERESTARTSYS if interrupted by a signal.
392 * and is usually called just immediately after the bo has been reserved to
422 * command submission that affects the buffer will return -EBUSY
426 * -EBUSY if the buffer is busy and no_wait is true.
427 * -ERESTARTSYS if interrupted by a signal.
469 * pinned in physical memory. If this behaviour is not desired, this member
476 * This function initializes a pre-allocated struct ttm_buffer_object.
479 * enables driver-specific objects derived from a ttm_buffer_object.
483 * illegal and will likely cause memory corruption.
486 * -ENOMEM: Out of memory.
487 * -EINVAL: Invalid placement flags.
488 * -ERESTARTSYS: Interrupted by signal while sleeping waiting for resources.
515 * pinned in physical memory. If this behaviour is not desired, this member
524 * -ENOMEM: Out of memory.
525 * -EINVAL: Invalid placement flags.
526 * -ERESTARTSYS: Interrupted by signal while waiting for resources.
547 * -EINVAL: Intended change is invalid or not allowed.
556 * @mem_type: The memory type.
559 * Initialize a manager for a given memory type.
563 * -EINVAL: invalid size or memory type.
564 * -ENOMEM: Not enough memory.
565 * May also return driver-specified errors.
574 * @mem_type: The memory type.
576 * Take down a manager for a given memory type after first walking
580 * point there shouldn't be any buffers left created by user-space, since
584 * make sure that there are no NO_EVICT buffers present in this memory type
593 * -EINVAL: invalid or uninitialized memory type.
594 * -EBUSY: There are still buffers left in this memory type.
603 * @mem_type: The memory type.
605 * Evicts all buffers on the lru list of the memory type.
607 * out-of-memory-space-due-to-fragmentation handler.
613 * -EINVAL: Invalid or uninitialized memory type.
614 * -ERESTARTSYS: The call was interrupted by a signal while waiting to
625 * virtual map is io memory, 0 if normal memory.
628 * If *is_iomem is 1 on return, the virtual address points to an io memory area,
635 *is_iomem = !!(map->bo_kmap_type & TTM_BO_MAP_IOMEM_MASK); in ttm_kmap_obj_virtual()
636 return map->virtual; in ttm_kmap_obj_virtual()
652 * -ENOMEM: Out of memory.
653 * -EINVAL: Invalid range.
670 * ttm_fbdev_mmap - mmap fbdev memory backed by a ttm buffer object.
685 * ttm_bo_mmap - mmap out of the ttm device address space.
703 * @wbuf: User-space pointer to address of buffer to write. NULL on read.
704 * @rbuf: User-space pointer to address of buffer to read into.
715 * the function may return -ERESTARTSYS if
726 * ttm_bo_is_reserved - return an indication if a ttm buffer object is reserved
730 * This function returns an indication if a bo is reserved or not, and should
736 return atomic_read(&bo->reserved); in ttm_bo_is_reserved()