brintos

brintos / linux-shallow public Read only

0
0
Text · 2.2 KiB · d6c03ce Raw
48 lines · plain
1==========================2I915 Small BAR RFC Section3==========================4Starting from DG2 we will have resizable BAR support for device local-memory(i.e5I915_MEMORY_CLASS_DEVICE), but in some cases the final BAR size might still be6smaller than the total probed_size. In such cases, only some subset of7I915_MEMORY_CLASS_DEVICE will be CPU accessible(for example the first 256M),8while the remainder is only accessible via the GPU.9 10I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS flag11----------------------------------------------12New gem_create_ext flag to tell the kernel that a BO will require CPU access.13This becomes important when placing an object in I915_MEMORY_CLASS_DEVICE, where14underneath the device has a small BAR, meaning only some portion of it is CPU15accessible. Without this flag the kernel will assume that CPU access is not16required, and prioritize using the non-CPU visible portion of17I915_MEMORY_CLASS_DEVICE.18 19.. kernel-doc:: Documentation/gpu/rfc/i915_small_bar.h20   :functions: __drm_i915_gem_create_ext21 22probed_cpu_visible_size attribute23---------------------------------24New struct__drm_i915_memory_region attribute which returns the total size of the25CPU accessible portion, for the particular region. This should only be26applicable for I915_MEMORY_CLASS_DEVICE. We also report the27unallocated_cpu_visible_size, alongside the unallocated_size.28 29Vulkan will need this as part of creating a separate VkMemoryHeap with the30VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT set, to represent the CPU visible portion,31where the total size of the heap needs to be known. It also wants to be able to32give a rough estimate of how memory can potentially be allocated.33 34.. kernel-doc:: Documentation/gpu/rfc/i915_small_bar.h35   :functions: __drm_i915_memory_region_info36 37Error Capture restrictions38--------------------------39With error capture we have two new restrictions:40 41    1) Error capture is best effort on small BAR systems; if the pages are not42    CPU accessible, at the time of capture, then the kernel is free to skip43    trying to capture them.44 45    2) On discrete and newer integrated platforms we now reject error capture46    on recoverable contexts. In the future the kernel may want to blit during47    error capture, when for example something is not currently CPU accessible.48