mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
media: omap3isp: set initial format
Initialize the v4l2_format to a default. Empty formats are not allowed in V4L2, so this fixes v4l2-compliance issues: fail: v4l2-test-formats.cpp(514): !pix.width || !pix.height test VIDIOC_G_FMT: FAIL Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
This commit is contained in:
parent
2c422fd1a4
commit
7575b8dfa9
|
|
@ -1319,6 +1319,7 @@ static const struct v4l2_ioctl_ops isp_video_ioctl_ops = {
|
|||
static int isp_video_open(struct file *file)
|
||||
{
|
||||
struct isp_video *video = video_drvdata(file);
|
||||
struct v4l2_mbus_framefmt fmt;
|
||||
struct isp_video_fh *handle;
|
||||
struct vb2_queue *queue;
|
||||
int ret = 0;
|
||||
|
|
@ -1361,6 +1362,13 @@ static int isp_video_open(struct file *file)
|
|||
|
||||
memset(&handle->format, 0, sizeof(handle->format));
|
||||
handle->format.type = video->type;
|
||||
handle->format.fmt.pix.width = 720;
|
||||
handle->format.fmt.pix.height = 480;
|
||||
handle->format.fmt.pix.pixelformat = V4L2_PIX_FMT_UYVY;
|
||||
handle->format.fmt.pix.field = V4L2_FIELD_NONE;
|
||||
handle->format.fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;
|
||||
isp_video_pix_to_mbus(&handle->format.fmt.pix, &fmt);
|
||||
isp_video_mbus_to_pix(video, &fmt, &handle->format.fmt.pix);
|
||||
handle->timeperframe.denominator = 1;
|
||||
|
||||
handle->video = video;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user