All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Jiang <scott.jiang.linux@gmail.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	linux-media@vger.kernel.org,
	uclinux-dist-devel@blackfin.uclinux.org
Subject: Re: [PATCH 4/4 v2][FOR 3.1] v4l2: add blackfin capture bridge driver
Date: Tue, 27 Sep 2011 16:23:35 +0800	[thread overview]
Message-ID: <CAHG8p1BiKzS8sJ+qxWSFw0Uk+0gC0e7ABmJaT8igaSeYttOtLw@mail.gmail.com> (raw)
In-Reply-To: <201109261609.32349.hverkuil@xs4all.nl>

>
>> +             ret = v4l2_subdev_call(bcap_dev->sd, video,
>> +                                     g_mbus_fmt, &mbus_fmt);
>> +             if (ret < 0)
>> +                     return ret;
>> +
>> +             for (i = 0; i < BCAP_MAX_FMTS; i++) {
>> +                     if (mbus_fmt.code != bcap_formats[i].mbus_code)
>> +                             continue;
>> +                     bcap_fmt = &bcap_formats[i];
>> +                     v4l2_fill_pix_format(pixfmt, &mbus_fmt);
>> +                     pixfmt->pixelformat = bcap_fmt->pixelformat;
>> +                     pixfmt->bytesperline = pixfmt->width * bcap_fmt->bpp / 8;
>> +                     pixfmt->sizeimage = pixfmt->bytesperline * pixfmt->height;
>> +                     break;
>> +             }
>> +             if (i == BCAP_MAX_FMTS) {
>> +                     v4l2_err(&bcap_dev->v4l2_dev,
>> +                                     "subdev fmt is not supported by bcap\n");
>> +                     return -EINVAL;
>> +             }
>
> Why do this on first open? Shouldn't it be better to do this after the subdev
> was loaded?
>
Hi Hans, thank you for your comments.
This point I haven't had a good solution. PPI is only a parallel port,
it has no default std or format.
That's why you always found I have no default std and format.
Sylwester Nawrocki recommend me add this code here, but different
input can has different std and format according to v4l2 spec.
That means if app only set input, or set input and std without setting
format, the default format getting here may be invalid.
Do you have any better solution for this?

  reply	other threads:[~2011-09-27  8:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-19 20:59 [PATCH 1/4 v2][FOR 3.1] v4l2: add vb2_get_unmapped_area in vb2 core Scott Jiang
2011-09-19 20:59 ` [PATCH 2/4 v2][FOR 3.1] v4l2: add adv7183 decoder driver Scott Jiang
2011-09-26 13:37   ` Hans Verkuil
2011-09-19 20:59 ` [PATCH 3/4 v2][FOR 3.1] v4l2: add vs6624 sensor driver Scott Jiang
2011-09-26 13:39   ` Hans Verkuil
2011-09-19 20:59 ` [PATCH 4/4 v2][FOR 3.1] v4l2: add blackfin capture bridge driver Scott Jiang
2011-09-26 14:09   ` Hans Verkuil
2011-09-27  8:23     ` Scott Jiang [this message]
2011-09-27  9:42       ` Hans Verkuil
2011-09-27 10:00         ` Scott Jiang
2011-09-27 10:18           ` Hans Verkuil
2011-09-30 15:07   ` Guennadi Liakhovetski

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=CAHG8p1BiKzS8sJ+qxWSFw0Uk+0gC0e7ABmJaT8igaSeYttOtLw@mail.gmail.com \
    --to=scott.jiang.linux@gmail.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.