From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: video4linux-list@redhat.com
Subject: Re: [PATCH 2/2 v3] pxa-camera: pixel format negotiation
Date: Sun, 23 Nov 2008 16:26:25 +0100 [thread overview]
Message-ID: <87wseuihum.fsf@free.fr> (raw)
In-Reply-To: <Pine.LNX.4.64.0811202055210.8290@axis700.grange> (Guennadi Liakhovetski's message of "Thu\, 20 Nov 2008 21\:43\:40 +0100 \(CET\)")
Guennadi Liakhovetski <g.liakhovetski@gmx.de> writes:
> I know this code repeats, and it is not nice. But as I was writing it I
> didn't see another possibility. Or more precisely, I did see it, but I
> couldn't compare the two versions well without having at least one of them
> in code in front of my eyes:-) Now that I see it, I think, yes, there is a
> way to do this only once by using a translation struct similar to what you
> have proposed. Now _this_ would be a possibly important advantage, so it
> is useful not _only_ for debugging:-) But we would have to extend it with
> at least a buswidth. Like
>
> const struct soc_camera_data_format *cam_fmt;
> const struct soc_camera_data_format *host_fmt;
> unsigned char buswidth;
>
> Now this _seems_ to provide the complete information so far... In
> pxa_camera_get_formats() we would
>
> 1. compute camera- and host-formats and buswidth
> 2. call pxa_camera_try_bus_param() to check bus-parameter compatibility
>
> and then in try_fmt() and set_fmt() just traverse the list of translation
> structs and adjust geometry?
Hi Guennadi,
I began the work. I have a pending question here. Do you want to have the
translation structure fully contained into pxa_camera (in host_priv for
example), or do you want to replace the user formats by translation structure
(ie. soc_camera_init_user_formats() would generate a list of
soc_camera_format_translate instead of a list of soc_camera_data format) ?
I'm asking because in pxa_camera, there is no easy way to "guess" the size of
the array of translations. And as vmalloc() is done in
soc_camera_init_user_formats(), and allocates only soc_camera_data_format
structures, I see no easy way to generate the list of translations in
pxa_camera.c.
I thought I would modify soc_camera.c in this way :
static int soc_camera_init_user_formats(struct soc_camera_device *icd)
{
<snip>
- icd->user_formats = vmalloc(sizeof(struct soc_camera_data_format *) *
- fmts);
+ icd->user_formats =
+ vmalloc(sizeof(struct soc_camera_format_translate *) * fmts);
<snip>
Is that what you had in mind ? If not, how do you allocate the
soc_camera_format_translate array in pxa_camera.c ?
--
Robert
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-11-23 15:27 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-18 19:25 [PATCH 0/2 v3] soc-camera: pixel format negotiation Guennadi Liakhovetski
2008-11-18 19:25 ` [PATCH 1/2 v3] soc-camera: pixel format negotiation - core support Guennadi Liakhovetski
2008-11-19 20:47 ` Robert Jarzmik
2008-11-20 19:53 ` Guennadi Liakhovetski
2008-11-18 19:25 ` [PATCH 2/2 v3] pxa-camera: pixel format negotiation Guennadi Liakhovetski
2008-11-19 21:29 ` Robert Jarzmik
2008-11-20 20:43 ` Guennadi Liakhovetski
2008-11-21 19:22 ` Robert Jarzmik
2008-11-21 20:03 ` Guennadi Liakhovetski
2008-11-21 20:53 ` Robert Jarzmik
2008-11-21 22:16 ` Guennadi Liakhovetski
2008-11-23 10:46 ` Robert Jarzmik
2008-11-23 15:26 ` Robert Jarzmik [this message]
2008-11-23 16:32 ` Guennadi Liakhovetski
2008-11-24 19:28 ` [PATCH 1/2] soc_camera: add format translation structure Robert Jarzmik
2008-11-24 19:28 ` [PATCH 2/2] pxa_camera: use the new " Robert Jarzmik
2008-11-27 23:00 ` Guennadi Liakhovetski
2008-11-28 23:27 ` Guennadi Liakhovetski
2008-11-29 12:30 ` Robert Jarzmik
2008-11-25 18:21 ` [PATCH 1/2] soc_camera: add format " Guennadi Liakhovetski
2008-11-27 21:27 ` Robert Jarzmik
2008-11-27 23:13 ` Guennadi Liakhovetski
2008-11-29 17:31 ` [PATCH v4 1/2] soc-camera: pixel format negotiation - core support Guennadi Liakhovetski
2008-11-30 17:33 ` Robert Jarzmik
2008-11-29 14:17 ` Robert Jarzmik
2008-11-29 14:17 ` [PATCH v4 2/2] pxa-camera: pixel format negotiation Robert Jarzmik
2008-11-29 15:49 ` 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=87wseuihum.fsf@free.fr \
--to=robert.jarzmik@free.fr \
--cc=g.liakhovetski@gmx.de \
--cc=video4linux-list@redhat.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 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.