linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junghak Sung <jh1009.sung@samsung.com>
To: Hans Verkuil <hverkuil@xs4all.nl>,
	linux-media@vger.kernel.org, mchehab@osg.samsung.com,
	laurent.pinchart@ideasonboard.com, sakari.ailus@iki.fi,
	pawel@osciak.com
Cc: inki.dae@samsung.com, sw0312.kim@samsung.com,
	nenggun.kim@samsung.com, sangbae90.lee@samsung.com,
	rany.kwon@samsung.com
Subject: Re: [RFC PATCH v5 5/8] media: videobuf2: Change queue_setup argument
Date: Wed, 23 Sep 2015 09:56:47 +0900	[thread overview]
Message-ID: <5601F8CF.2090407@samsung.com> (raw)
In-Reply-To: <56015B25.4070102@xs4all.nl>



On 09/22/2015 10:44 PM, Hans Verkuil wrote:
> Hi Junghak,
>
> On 22-09-15 15:30, Junghak Sung wrote:
>> Replace struct v4l2_format * with vb2_format * to make queue_setup()
>> for common use.
>>
>> struct vb2_format {
>> 	unsigned int	type;
>> 	unsigned int	pixelformat;
>> 	unsigned int	width;
>> 	unsigned int	height;
>> 	unsigned int	num_planes;
>> 	unsigned int	bytesperline[VIDEO_MAX_PLANES];
>> 	unsigned int	req_sizes[VIDEO_MAX_PLANES];
>> };
>
> Why would you need all the other fields besides req_sizes[]?
>
> Which drivers actually need those other fields? Drivers like exynos4-is/fimc-lite.c
> don't actually use anything but req_sizes if you read the code carefully.
>
> I suspect any driver that uses more than req_sizes is actually buggy or
> written carelessly.
>
> I wish you'd checked with me before making this struct...
>
> Be aware that I'm abroad (vacation/conferences) from tomorrow until October 10,
> so I won't be able to do in-depth reviews during that time (well, I'm able,
> but I don't want to!)
>
> Regards,
>
> 	Hans

Hi Hans,

I added the member of struct vb2_format, if the member is used by any 
device driver.
These are the usecases for each field besides req_sizes[].

[platform/s3c-camif/camif-capture.c] pixelformat
[platform/exynos4-is/fimc-capture.c] pixelformat, width, height
[platform/exynos4-is/fimc-isp-video.c] pixelformat, width, height
[platform/exynos4-is/fimc-lite.c] pixelformat, width, height
[platform/soc_camera/mx3_camera.c] pixelformat, width, bytesperline,
  height
[platform/soc_camera/rcar_vin.c] pixelformat, width, bytesperline,
  height
[platform/soc_camera/sh_mobile_ceu_camera.c] pixelformat, width, 
bytesperline,
  height
[platform/sh_veu.c] type, pixelformat, width, height, byteperline
[platform/vivid/vivid-vid-cap.c] num_planes, pixelformat
[platform/vivid/vivid-vid-out.c] num_planes
[platform/vsp2/vsp1_video.c] width, height, pixelformat, byteperline,
num_planes

And I can not understand that fimc-lite.c do not actually use anything 
but req_sizes[]. In original source code, it seems that fimc_lite.c
should use the other fields - pixelformat, width, height - if a user
set the v4l2_format.
Would you please explain a little bit more?

Thank you for your review.

Best regards,
Junghak


> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2015-09-23  0:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 13:30 [RFC PATCH v5 0/8] Refactoring Videobuf2 for common use Junghak Sung
2015-09-22 13:30 ` [RFC PATCH v5 1/8] media: videobuf2: Replace videobuf2-core with videobuf2-v4l2 Junghak Sung
2015-09-22 13:30 ` [RFC PATCH v5 2/8] media: videobuf2: Restructure vb2_buffer (1/3) Junghak Sung
2015-09-22 13:30 ` [RFC PATCH v5 3/8] media: videobuf2: Restructure vb2_buffer (2/3) Junghak Sung
2015-09-22 13:30 ` [RFC PATCH v5 4/8] media: videobuf2: Restructure vb2_buffer (3/3) Junghak Sung
2015-09-22 13:30 ` [RFC PATCH v5 5/8] media: videobuf2: Change queue_setup argument Junghak Sung
2015-09-22 13:44   ` Hans Verkuil
2015-09-23  0:56     ` Junghak Sung [this message]
2015-09-23  7:18       ` Hans Verkuil
2015-09-22 13:30 ` [RFC PATCH v5 6/8] media: videobuf2: Replace v4l2-specific data with vb2 data Junghak Sung
2015-09-22 14:24   ` Hans Verkuil
2015-09-22 13:30 ` [RFC PATCH v5 7/8] media: videobuf2: Prepare to divide videobuf2 Junghak Sung
2015-09-22 14:48   ` Hans Verkuil
2015-09-23  1:37     ` Junghak Sung
2015-09-23  6:34       ` Hans Verkuil
2015-09-22 13:30 ` [RFC PATCH v5 8/8] media: videobuf2: Move v4l2-specific stuff to videobuf2-v4l2 Junghak Sung
2015-09-22 14:58   ` Hans Verkuil
2015-09-23  2:14     ` Junghak Sung
2015-09-22 15:09 ` [RFC PATCH v5 0/8] Refactoring Videobuf2 for common use Hans Verkuil
2015-09-23  5:08   ` Junghak Sung
2015-09-23  6:53     ` Hans Verkuil
2015-09-23  7:43       ` Junghak Sung

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5601F8CF.2090407@samsung.com \
    --to=jh1009.sung@samsung.com \
    --cc=hverkuil@xs4all.nl \
    --cc=inki.dae@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=nenggun.kim@samsung.com \
    --cc=pawel@osciak.com \
    --cc=rany.kwon@samsung.com \
    --cc=sakari.ailus@iki.fi \
    --cc=sangbae90.lee@samsung.com \
    --cc=sw0312.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).