XenevaOS
Loading...
Searching...
No Matches
Public Attributes | List of all members
drm_i915_memory_region_info Struct Reference

#include <i915_drm.h>

Collaboration diagram for drm_i915_memory_region_info:
Collaboration graph
[legend]

Public Attributes

struct drm_i915_gem_memory_class_instance region
 
__u32 rsvd0
 
__u64 probed_size
 
__u64 unallocated_size
 
union { 
 
   __u64   rsvd1 [8] 
 
   struct { 
 
      __u64   probed_cpu_visible_size 
 
      __u64   unallocated_cpu_visible_size 
 
   }  
 
};  
 

Detailed Description

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.

Member Data Documentation

◆ [union]

◆ probed_cpu_visible_size

__u64 drm_i915_memory_region_info::probed_cpu_visible_size

@probed_cpu_visible_size: Memory probed by the driver that is CPU accessible.

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.

◆ probed_size

__u64 drm_i915_memory_region_info::probed_size

@probed_size: Memory probed by the driver

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.

◆ region

struct drm_i915_gem_memory_class_instance drm_i915_memory_region_info::region

@region: The class:instance pair encoding

◆ rsvd0

__u32 drm_i915_memory_region_info::rsvd0

@rsvd0: MBZ

◆ rsvd1

__u64 drm_i915_memory_region_info::rsvd1[8]

@rsvd1: MBZ

◆ unallocated_cpu_visible_size

__u64 drm_i915_memory_region_info::unallocated_cpu_visible_size

@unallocated_cpu_visible_size: Estimate of CPU visible memory remaining.

Note this is only tracked for I915_MEMORY_CLASS_DEVICE regions (for other types the value here will always equal the @probed_cpu_visible_size).

Requires CAP_PERFMON or CAP_SYS_ADMIN to get reliable accounting. Without this the value here will always equal the @probed_cpu_visible_size. Note this is only currently tracked for I915_MEMORY_CLASS_DEVICE regions (for other types the value here will also always equal the @probed_cpu_visible_size).

If this is an older kernel the value here will be zero, see also @probed_cpu_visible_size.

◆ unallocated_size

__u64 drm_i915_memory_region_info::unallocated_size

@unallocated_size: Estimate of memory remaining

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).


The documentation for this struct was generated from the following file: