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

#include <i915_drm.h>

Public Attributes

__u32 num_items
 
__u32 flags
 
__u64 items_ptr
 

Detailed Description

struct drm_i915_query - Supply an array of struct drm_i915_query_item for the kernel to fill out.

Note that this is generally a two step process for each struct drm_i915_query_item in the array:

  1. Call the DRM_IOCTL_I915_QUERY, giving it our array of struct drm_i915_query_item, with &drm_i915_query_item.length set to zero. The kernel will then fill in the size, in bytes, which tells userspace how memory it needs to allocate for the blob(say for an array of properties).
  2. Next we call DRM_IOCTL_I915_QUERY again, this time with the &drm_i915_query_item.data_ptr equal to our newly allocated blob. Note that the &drm_i915_query_item.length should still be the same as what the kernel previously set. At this point the kernel can fill in the blob.

Note that for some query items it can make sense for userspace to just pass in a buffer/blob equal to or larger than the required size. In this case only a single ioctl call is needed. For some smaller query items this can work quite well.

Member Data Documentation

◆ flags

__u32 drm_i915_query::flags

@flags: Unused for now. Must be cleared to zero.

◆ items_ptr

__u64 drm_i915_query::items_ptr

@items_ptr:

Pointer to an array of struct drm_i915_query_item. The number of array elements is @num_items.

◆ num_items

__u32 drm_i915_query::num_items

@num_items: The number of elements in the @items_ptr array


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