diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-11-22 19:08:18 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-04-14 00:57:24 +0300 |
commit | b911605dcce9f7ebfea2e8f8833fb73782f55c22 (patch) | |
tree | 81c8d53f55fdf364e49392029e7a113cd84ceef4 /drivers | |
parent | c6c8efb656ff213a4d32776c12454b9c9f0c14e4 (diff) | |
download | linux-b911605dcce9f7ebfea2e8f8833fb73782f55c22.tar.xz |
[media] v4l: vsp1: Use __vsp1_video_try_format to initialize format at init time
Reuse the runtime logic to initialize the default format instead of
open-coding it. This ensures coherency between intialization and
runtime.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_video.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c index a3f1145c8a79..4dcc892977df 100644 --- a/drivers/media/platform/vsp1/vsp1_video.c +++ b/drivers/media/platform/vsp1/vsp1_video.c @@ -958,17 +958,10 @@ struct vsp1_video *vsp1_video_create(struct vsp1_device *vsp1, return ERR_PTR(ret); /* ... and the format ... */ - rwpf->fmtinfo = vsp1_get_format_info(VSP1_VIDEO_DEF_FORMAT); - rwpf->format.pixelformat = rwpf->fmtinfo->fourcc; - rwpf->format.colorspace = V4L2_COLORSPACE_SRGB; - rwpf->format.field = V4L2_FIELD_NONE; + rwpf->format.pixelformat = VSP1_VIDEO_DEF_FORMAT; rwpf->format.width = VSP1_VIDEO_DEF_WIDTH; rwpf->format.height = VSP1_VIDEO_DEF_HEIGHT; - rwpf->format.num_planes = 1; - rwpf->format.plane_fmt[0].bytesperline = - rwpf->format.width * rwpf->fmtinfo->bpp[0] / 8; - rwpf->format.plane_fmt[0].sizeimage = - rwpf->format.plane_fmt[0].bytesperline * rwpf->format.height; + __vsp1_video_try_format(video, &rwpf->format, &rwpf->fmtinfo); /* ... and the video node... */ video->video.v4l2_dev = &video->vsp1->v4l2_dev; |