Back to home page

OSCL-LXR

 
 

    


0001 ==========================
0002 I915 Small BAR RFC Section
0003 ==========================
0004 Starting from DG2 we will have resizable BAR support for device local-memory(i.e
0005 I915_MEMORY_CLASS_DEVICE), but in some cases the final BAR size might still be
0006 smaller than the total probed_size. In such cases, only some subset of
0007 I915_MEMORY_CLASS_DEVICE will be CPU accessible(for example the first 256M),
0008 while the remainder is only accessible via the GPU.
0009 
0010 I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS flag
0011 ----------------------------------------------
0012 New gem_create_ext flag to tell the kernel that a BO will require CPU access.
0013 This becomes important when placing an object in I915_MEMORY_CLASS_DEVICE, where
0014 underneath the device has a small BAR, meaning only some portion of it is CPU
0015 accessible. Without this flag the kernel will assume that CPU access is not
0016 required, and prioritize using the non-CPU visible portion of
0017 I915_MEMORY_CLASS_DEVICE.
0018 
0019 .. kernel-doc:: Documentation/gpu/rfc/i915_small_bar.h
0020    :functions: __drm_i915_gem_create_ext
0021 
0022 probed_cpu_visible_size attribute
0023 ---------------------------------
0024 New struct__drm_i915_memory_region attribute which returns the total size of the
0025 CPU accessible portion, for the particular region. This should only be
0026 applicable for I915_MEMORY_CLASS_DEVICE. We also report the
0027 unallocated_cpu_visible_size, alongside the unallocated_size.
0028 
0029 Vulkan will need this as part of creating a separate VkMemoryHeap with the
0030 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT set, to represent the CPU visible portion,
0031 where the total size of the heap needs to be known. It also wants to be able to
0032 give a rough estimate of how memory can potentially be allocated.
0033 
0034 .. kernel-doc:: Documentation/gpu/rfc/i915_small_bar.h
0035    :functions: __drm_i915_memory_region_info
0036 
0037 Error Capture restrictions
0038 --------------------------
0039 With error capture we have two new restrictions:
0040 
0041     1) Error capture is best effort on small BAR systems; if the pages are not
0042     CPU accessible, at the time of capture, then the kernel is free to skip
0043     trying to capture them.
0044 
0045     2) On discrete and newer integrated platforms we now reject error capture
0046     on recoverable contexts. In the future the kernel may want to blit during
0047     error capture, when for example something is not currently CPU accessible.