|
XenevaOS
|
#include <pvr_drm.h>
Public Attributes | |
| __u32 | stride |
| __u32 | count |
| __u64 | array |
DOC: PowerVR UAPI
The PowerVR IOCTL argument structs have a few limitations in place, in addition to the standard kernel restrictions:
_padding_[x] members of sufficient size to pad to the next power-of-two alignment, where [x] is the offset into the struct in hexadecimal. Arrays are never used for alignment. Padding fields must be zeroed; this is always checked.In addition to the IOCTL argument structs, the PowerVR UAPI makes use of DEV_QUERY argument structs. These are used to fetch information about the device and runtime. These structs are subject to the same rules set out above. struct drm_pvr_obj_array - Container used to pass arrays of objects
It is not unusual to have to extend objects to pass new parameters, and the DRM ioctl infrastructure is supporting that by padding ioctl arguments with zeros when the data passed by userspace is smaller than the struct defined in the drm_ioctl_desc, thus keeping things backward compatible. This type is just applying the same concepts to indirect objects passed through arrays referenced from the main ioctl arguments structure: the stride basically defines the size of the object passed by userspace, which allows the kernel driver to pad with zeros when it's smaller than the size of the object it expects.
Use DRM_PVR_OBJ_ARRAY() to fill object array fields, unless you have a very good reason not to.
| __u64 drm_pvr_obj_array::array |
@array: User pointer to an array of objects.
| __u32 drm_pvr_obj_array::count |
@count: Number of objects in the array.
| __u32 drm_pvr_obj_array::stride |
@stride: Stride of object struct. Used for versioning.