public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Hans Verkuil <hverkuil@xs4all.nl>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: platform: pxa_camera: convert to vb2
Date: Wed, 03 Aug 2016 19:55:17 +0200	[thread overview]
Message-ID: <87fuqlyby2.fsf@belgarion.home> (raw)
In-Reply-To: <bafc1ef7-8343-c208-3621-02cc95316dbc@xs4all.nl> (Hans Verkuil's message of "Wed, 3 Aug 2016 09:39:12 +0200")

Hans Verkuil <hverkuil@xs4all.nl> writes:

> On 08/02/2016 08:03 PM, Robert Jarzmik wrote:
>> Hans Verkuil <hverkuil@xs4all.nl> writes:
>> [ 1509.773051] pxa27x-camera pxa27x-camera.0: s_fmt_vid_cap(pix=48x32:56595559)
>> [ 1509.777213] pxa27x-camera pxa27x-camera.0: current_fmt->fourcc: 0x56595559
>> 	RJK: Here we switch to 48x32 format
>> 
>> [ 1509.777386] pxa27x-camera pxa27x-camera.0: pxac_vb2_queue_setup(vq=c312f290 nbufs=3 num_planes=0 size=614400)
>
> But this debug line indicates that pcdev->current_pix.sizeimage is still the old value: this
> should have been updated by the S_FMT call. You'd have to debug that a bit more, it looks like
> there is a bug somewhere in the driver.
>
> I suspect this line in pxac_vidioc_try_fmt_vid_cap:
> pix->sizeimage = max_t(u32, pix->sizeimage, ret);
>
> This should just be pix->sizeimage = ret.

Hi Hans and Laurent,

Thanks for pinpointing this one, that's exactly where the problem comes
from. I'm rerunning my capture tests as well as v4l2-compliance -s and
v4l2-compliance -f to be sure.

That leads me to a question for Laurent :
 - in the commit bed8d8033037 ("[media] soc-camera: Honor user-requested
 bytesperline and sizeimage")
 - in the hunk
   @@ -177,22 +178,22 @@ static int soc_camera_try_fmt(struct soc_camera_device *icd,
 - you added this:
   pix->sizeimage = max_t(u32, pix->sizeimage, ret);

As I blindly copied it from soc_camera.c to pxa_camera.c, I didn't pay attention
to it. I'd like to understand what this is for, why using the maximum of the
computed image size and imagesize instead of using directly the computed
imagesize, and if it is applicable to the pxa_camera case.

Thanks in advance.

--
Robert

      reply	other threads:[~2016-08-03 18:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 17:17 [PATCH] media: platform: pxa_camera: convert to vb2 Robert Jarzmik
2016-03-11 12:43 ` Hans Verkuil
2016-03-11 13:41   ` Robert Jarzmik
2016-03-11 14:00     ` Hans Verkuil
2016-03-11 15:40       ` Robert Jarzmik
2016-03-11 16:07         ` Hans Verkuil
2016-08-02 18:03   ` Robert Jarzmik
2016-08-03  7:39     ` Hans Verkuil
2016-08-03 17:55       ` Robert Jarzmik [this message]

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=87fuqlyby2.fsf@belgarion.home \
    --to=robert.jarzmik@free.fr \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.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