Re: [Intel-gfx] [PATCH 01/10] drm/doc: add rfc section for small BAR uapi
On 5/25/22 20:43, Matthew Auld wrote: Add an entry for the new uapi needed for small BAR on DG2+. v2: - Some spelling fixes and other small tweaks. (Akeem & Thomas) - Rework error capture interactions, including no longer needing NEEDS_CPU_ACCESS for objects marked for capture. (Thomas) - Add probed_cpu_visible_size. (Lionel) v3: - Drop the vma query for now. - Add unallocated_cpu_visible_size as part of the region query. - Improve the docs some more, including documenting the expected behaviour on older kernels, since this came up in some offline discussion. v4: - Various improvements all over. (Tvrtko) Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lionel Landwerlin Cc: Tvrtko Ursulin Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: Akeem G Abodunrin Cc: mesa-dev@lists.freedesktop.org Acked-by: Tvrtko Ursulin Acked-by: Akeem G Abodunrin --- Documentation/gpu/rfc/i915_small_bar.h | 189 +++ Documentation/gpu/rfc/i915_small_bar.rst | 47 ++ Documentation/gpu/rfc/index.rst | 4 + 3 files changed, 240 insertions(+) create mode 100644 Documentation/gpu/rfc/i915_small_bar.h create mode 100644 Documentation/gpu/rfc/i915_small_bar.rst diff --git a/Documentation/gpu/rfc/i915_small_bar.h b/Documentation/gpu/rfc/i915_small_bar.h new file mode 100644 index ..752bb2ceb399 --- /dev/null +++ b/Documentation/gpu/rfc/i915_small_bar.h @@ -0,0 +1,189 @@ +/** + * struct __drm_i915_memory_region_info - Describes one region as known to the + * driver. + * + * Note this is using both struct drm_i915_query_item and struct drm_i915_query. + * For this new query we are adding the new query id DRM_I915_QUERY_MEMORY_REGIONS + * at &drm_i915_query_item.query_id. + */ +struct __drm_i915_memory_region_info { + /** @region: The class:instance pair encoding */ + struct drm_i915_gem_memory_class_instance region; + + /** @rsvd0: MBZ */ + __u32 rsvd0; + + /** +* @probed_size: Memory probed by the driver (-1 = unknown) +* +* Note that it should not be possible to ever encounter a zero value +* here, also note that no current region type will ever return -1 here. +* Although for future region types, this might be a possibility. The +* same applies to the other size fields. +*/ + __u64 probed_size; + + /** +* @unallocated_size: Estimate of memory remaining (-1 = unknown) +* +* Requires CAP_PERFMON or CAP_SYS_ADMIN to get reliable accounting. +* Without this (or if this is an older kernel) the value here will +* always equal the @probed_size. Note this is only currently tracked +* for I915_MEMORY_CLASS_DEVICE regions (for other types the value here +* will always equal the @probed_size). +*/ + __u64 unallocated_size; + + union { + /** @rsvd1: MBZ */ + __u64 rsvd1[8]; + struct { + /** +* @probed_cpu_visible_size: Memory probed by the driver +* that is CPU accessible. (-1 = unknown). +* +* This will be always be <= @probed_size, and the +* remainder (if there is any) will not be CPU +* accessible. +* +* On systems without small BAR, the @probed_size will +* always equal the @probed_cpu_visible_size, since all +* of it will be CPU accessible. +* +* Note this is only tracked for +* I915_MEMORY_CLASS_DEVICE regions (for other types the +* value here will always equal the @probed_size). +* +* Note that if the value returned here is zero, then +* this must be an old kernel which lacks the relevant +* small-bar uAPI support (including +* I915_GEM_CREATE_EXT_FLAG_NEEDS_CPU_ACCESS), but on +* such systems we should never actually end up with a +* small BAR configuration, assuming we are able to load +* the kernel module. Hence it should be safe to treat +* this the same as when @probed_cpu_visible_size == +* @probed_size. +*/ + __u64 probed_cpu_visible_size; + + /** +* @unallocated_cpu_visible_size: Estimate of CPU +* visible memory remaining (-1 = unknown). +* +* Note this is only tracked for +* I915_MEMORY_CLASS_DEVICE
[ANNOUNCE] mesa 22.1.2
Hi list, I'd like to announce Mesa 22.1.2 is now available, after a short delay to bisect a regression. That's been fixed, and now we have a release! There's a lot of zink here, thanks to Mike for help with manually backporting parts of it! We've als got a bunch of fixes for panfrost, and some for intel, radeon, llvmpip, dzn, broadcom, nir, core gallium, the va state tracker, and freedreno. Cheers, Dylan shortlog Alyssa Rosenzweig (7): panfrost: Fix XML for AFBC header on v9 pan/bi: Fix clper_xor on Mali-G31 pan/mdg: Scalarize with 64-bit sources pan/mdg: Remove uppercase write masks panfrost: Fix inverted indirect dispatch condition panfrost: Inline pan_fbd_has_zs_crc_ext panfrost: Disable CRC at <16x16 tile sizes Boris Brezillon (5): microsoft/spirv_to_dxil: Fix push_constants type declaration microsoft/spirv_to_dxil: Fix the push_constant UBO size calculation nir: Fix flat new_var assignment in create_new_io_vars() vulkan/util: Fill VkPhysicalDeviceIDProperties::deviceNodeMask microsoft/compiler: Images are no longer reprensented by uniform vars Dave Airlie (1): llvmpipe: handle timespec overflow on fence waits. Dylan Baker (9): docs: Add sh256sums for 22.1.1 .pick_status.json: Update to 1c63a0beafefccec599ddbe355ec5a8b61df6438 .pick_status.json: Update to ad5c84999b9eb2522cdf78bb0890939450280cf3 .pick_status.json: Update to 49234585772f49626435d3d9324ad144e27fc453 .pick_status.json: Update to 35dd4ac886283444294238ae0be1a7edcc776c8a .pick_status.json: Update to 2ef6b0aab1c7b99b85f2d88ced44a63f28cfca6b .pick_status.json: Update to ea33e44ce4f95ce45729b75dee34be50df749f09 docs: add release notes for 22.1.2 Bump version to 22.1.2 Emma Anholt (1): nouveau/nv30: Make sure fsat is lowered in the VS. Erik Faye-Lund (6): nir: introduce and use nir_component_mask freedreno: remove stale makefile intel: remove stale makefile ci/windows: add back build-error detection dzn: handle stencil-attachment-optimal layout gallium: remove stale comment Georg Lehmann (1): zink: Use VK_USE_64_BIT_PTR_DEFINES to check for 64bit platforms. Iago Toral Quiroga (1): broadcom/compiler: disable flags optimization for loop conditions Ian Romanick (1): anv: Remove FS executables when applying the null FS optimization Jason Ekstrand (2): nir/builder: Add a nir_trim_vector helper compiler/types: Don't place members in the previous substruct's end padding Jesse Natalie (2): nir: Consider PNTC to be a varying d3d12: Properly set HS input control point count Juan A. Suarez Romero (1): v3d: save only required states in blitter Kenneth Graunke (1): intel/compiler: Fix uncompaction of signed word immediates on Tigerlake Kyle Russell (1): etnaviv: don't halve max_instructions for GC400 Marek Olšák (2): ac/gpu_info: always retile DCC on gfx10 and newer chips gallium/u_threaded: fix buffer busyness tracking Mike Blumenkrantz (31): st/pbo_compute: make compute download conditional in shader slightly more readable st/pbo_compute: fix z coords for compute pbos zink: remove first_frame stalling lavapipe: fix dynamic patchControlPoints zink: force queries to start/end out of renderpass egl/wayland: manually swap backbuffer when using zink egl/wayland: skip buffer creation on zink kopper: use get_drawable_info path for non-x11 drawables zink: fix dmabuf plane layout struct scoping format_utils: properly parenthesize macro params zink: always create descriptor templates zink: fix ntv partial stores zink: fix variable locations in manual xfb emission zink: scalarize when rewriting explicit 64bit io zink: use separate pointer for swapchain presents zink: keep a count of async presents occuring for a given swapchain zink: defer old swapchain destruction zink: fix framebuffer attachment usage asserts for dummy attachments zink: only update layout when doing mixed zs attachment renderpass check zink: add implicit sync workaround for non-mesa drivers zink: unset res->swapchain upon killing a swapchain zink: fix up KILL to a more sensible log message zink: fix generated tcs update path zink: unset generated tcs pointer from tes on deletion zink: fix generated tcs deletion zink: avoid uninit values in renderpass state zink: don't print VK_EXT_shader_atomic_float warning for nir_intrinsic_image_deref_atomic_exchange zink: fix cubemap lowering for array samplers zink: fix cubemap lowering bit size zink: flag optimization pass after inlining uniforms zink: fix 32bit bo rewriting Nagappa Koppad, Basanagouda (1): iris:Duplicate DRM fd internally instead of reuse. Pierre-Eric Pelloux-Prayer (5):