Struct vfio_bindings::bindings::vfio::vfio_device_gfx_plane_info[][src]

#[repr(C)]
pub struct vfio_device_gfx_plane_info {
Show 14 fields pub argsz: __u32, pub flags: __u32, pub drm_plane_type: __u32, pub drm_format: __u32, pub drm_format_mod: __u64, pub width: __u32, pub height: __u32, pub stride: __u32, pub size: __u32, pub x_pos: __u32, pub y_pos: __u32, pub x_hot: __u32, pub y_hot: __u32, pub __bindgen_anon_1: vfio_device_gfx_plane_info__bindgen_ty_1,
}
Expand description

VFIO_DEVICE_QUERY_GFX_PLANE - _IOW(VFIO_TYPE, VFIO_BASE + 14, struct vfio_device_query_gfx_plane)

Set the drm_plane_type and flags, then retrieve the gfx plane info.

flags supported:

  • VFIO_GFX_PLANE_TYPE_PROBE and VFIO_GFX_PLANE_TYPE_DMABUF are set to ask if the mdev supports dma-buf. 0 on support, -EINVAL on no support for dma-buf.
  • VFIO_GFX_PLANE_TYPE_PROBE and VFIO_GFX_PLANE_TYPE_REGION are set to ask if the mdev supports region. 0 on support, -EINVAL on no support for region.
  • VFIO_GFX_PLANE_TYPE_DMABUF or VFIO_GFX_PLANE_TYPE_REGION is set with each call to query the plane info.
  • Others are invalid and return -EINVAL.

Note:

  1. Plane could be disabled by guest. In that case, success will be returned with zero-initialized drm_format, size, width and height fields.
  2. x_hot/y_hot is set to 0xFFFFFFFF if no hotspot information available

Return: 0 on success, -errno on other failure.

Fields

argsz: __u32flags: __u32drm_plane_type: __u32drm_format: __u32drm_format_mod: __u64width: __u32height: __u32stride: __u32size: __u32x_pos: __u32y_pos: __u32x_hot: __u32y_hot: __u32__bindgen_anon_1: vfio_device_gfx_plane_info__bindgen_ty_1

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.