mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 22:53:55 +08:00
2ef2d5a336
The header defines the v4l2_mbus_framefmt structure which will be used by the V4L2 subdevs userspace API. Change the type of the v4l2_mbus_framefmt::code field to __u32, as enum sizes can differ between different ABIs on the same architectures. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
37 lines
1002 B
C
37 lines
1002 B
C
/*
|
|
* Media Bus API header
|
|
*
|
|
* Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef V4L2_MEDIABUS_H
|
|
#define V4L2_MEDIABUS_H
|
|
|
|
#include <linux/v4l2-mediabus.h>
|
|
|
|
static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt,
|
|
const struct v4l2_mbus_framefmt *mbus_fmt)
|
|
{
|
|
pix_fmt->width = mbus_fmt->width;
|
|
pix_fmt->height = mbus_fmt->height;
|
|
pix_fmt->field = mbus_fmt->field;
|
|
pix_fmt->colorspace = mbus_fmt->colorspace;
|
|
}
|
|
|
|
static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt,
|
|
const struct v4l2_pix_format *pix_fmt,
|
|
enum v4l2_mbus_pixelcode code)
|
|
{
|
|
mbus_fmt->width = pix_fmt->width;
|
|
mbus_fmt->height = pix_fmt->height;
|
|
mbus_fmt->field = pix_fmt->field;
|
|
mbus_fmt->colorspace = pix_fmt->colorspace;
|
|
mbus_fmt->code = code;
|
|
}
|
|
|
|
#endif
|