On 31/07/18 11:31, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx> > > This is the ABI for the two halves of a para-virtualized > camera driver which extends Xen's reach multimedia capabilities even > farther enabling it for video conferencing, In-Vehicle Infotainment, > high definition maps etc. > > The initial goal is to support most needed functionality with the > final idea to make it possible to extend the protocol if need be: > > 1. Provide means for base virtual device configuration: > - pixel formats > - resolutions > - frame rates > 2. Support basic camera controls: > - contrast > - brightness > - hue > - saturation > 3. Support streaming control > 4. Support zero-copying use-cases > > Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx> Some style issues below... > --- > xen/include/public/io/cameraif.h | 981 +++++++++++++++++++++++++++++++ > 1 file changed, 981 insertions(+) > create mode 100644 xen/include/public/io/cameraif.h > > diff --git a/xen/include/public/io/cameraif.h b/xen/include/public/io/cameraif.h > new file mode 100644 > index 000000000000..bdc6a1262fcf > --- /dev/null > +++ b/xen/include/public/io/cameraif.h > +struct xencamera_config { > + uint32_t pixel_format; > + uint32_t width; > + uint32_t height; > + uint32_t frame_rate_nom; > + uint32_t frame_rate_denom; > + uint8_t num_bufs; Add explicit padding? > +}; > +struct xencamera_req { > + uint16_t id; > + uint8_t operation; > + uint8_t reserved[5]; > + union { > + struct xencamera_config config; > + struct xencamera_buf_create_req buf_create; > + struct xencamera_buf_destroy_req buf_destroy; > + struct xencamera_set_ctrl_req set_ctrl; No tabs, please. > + uint8_t reserved[56]; > + } req; > +}; > + > +struct xencamera_resp { > + uint16_t id; > + uint8_t operation; > + uint8_t reserved; > + int32_t status; > + union { > + struct xencamera_config config; > + struct xencamera_buf_details_resp buf_details; > + struct xencamera_get_ctrl_details_resp ctrl_details; Tab again. > + uint8_t reserved1[56]; > + } resp; > +}; Juergen