From: Seung-Woo Kim Date: Thu, 29 Mar 2018 04:39:38 +0000 (+0900) Subject: media: nexell: fix to fill bytesperline & sizeimage for mplane format X-Git-Tag: submit/tizen/20190129.052023~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80195dcefb562920bbace7fa91278ef58d157adc;p=profile%2Fcommon%2Fplatform%2Fkernel%2Flinux-artik7.git media: nexell: fix to fill bytesperline & sizeimage for mplane format For multi planar format, on vidioc_s_fmt_vid_cap_mplane() callback of nexell video driver, stride and sizeimage are not filled and this causes failure of gst v4l2src plugin. Fix to fill bytesperline and sizeimage for multi planar format from callback function, vidioc_s_fmt_vid_cap_mplane(). Change-Id: Ib5871f183e37916c7725539bfd777d883fa96996 Signed-off-by: Seung-Woo Kim --- diff --git a/drivers/media/platform/nexell/nx-video.c b/drivers/media/platform/nexell/nx-video.c index c3648a66f591..4f8a8fe5322b 100644 --- a/drivers/media/platform/nexell/nx-video.c +++ b/drivers/media/platform/nexell/nx-video.c @@ -783,9 +783,10 @@ static int nx_video_set_format(struct file *file, void *fh, if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { struct v4l2_pix_format_mplane *pix = &f->fmt.pix_mp; + set_plane_size_mmap(frame, &pix->plane_fmt[0].sizeimage); for (i = 0; i < format->num_planes; ++i) { - frame->stride[i] = pix->plane_fmt[i].bytesperline; - frame->size[i] = pix->plane_fmt[i].sizeimage; + pix->plane_fmt[i].bytesperline = frame->stride[i]; + pix->plane_fmt[i].sizeimage = frame->size[i]; } }