* [PATCH] mmp-camera: specify XO-1.75 clock speed
@ 2012-05-15 19:43 Daniel Drake
2012-05-16 21:12 ` Jonathan Corbet
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Drake @ 2012-05-15 19:43 UTC (permalink / raw)
To: mchehab, corbet; +Cc: linux-media
For the ov7670 camera to return images at the requested frame rate,
it needs to make calculations based on the clock speed, which is
a completely external factor (depends on the wiring of the system).
On the XO-1.75, which is the only known mmp-camera user, the camera
is clocked at 48MHz.
Pass this information to the ov7670 driver, to fix an issue where
a framerate faster than the requested amount was being provided.
Signed-off-by: Daniel Drake <dsd@laptop.org>
---
drivers/media/video/marvell-ccic/mmp-driver.c | 7 +++++++
1 file changed, 7 insertions(+)
Jon, is it OK to assume that XO-1.75 is the only mmp-camera user?
diff --git a/drivers/media/video/marvell-ccic/mmp-driver.c b/drivers/media/video/marvell-ccic/mmp-driver.c
index c4c17fe..0ba49c7 100644
--- a/drivers/media/video/marvell-ccic/mmp-driver.c
+++ b/drivers/media/video/marvell-ccic/mmp-driver.c
@@ -188,6 +188,13 @@ static int mmpcam_probe(struct platform_device *pdev)
mcam->chip_id = V4L2_IDENT_ARMADA610;
mcam->buffer_mode = B_DMA_sg;
spin_lock_init(&mcam->dev_lock);
+
+ /*
+ * Set the clock speed for the XO-1.75; I don't believe this
+ * driver has ever run anywhere else.
+ */
+ mcam->clock_speed = 48;
+
/*
* Get our I/O memory.
*/
--
1.7.10.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mmp-camera: specify XO-1.75 clock speed
2012-05-15 19:43 [PATCH] mmp-camera: specify XO-1.75 clock speed Daniel Drake
@ 2012-05-16 21:12 ` Jonathan Corbet
2012-05-16 21:15 ` Daniel Drake
0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Corbet @ 2012-05-16 21:12 UTC (permalink / raw)
To: Daniel Drake; +Cc: mchehab, linux-media
On Tue, 15 May 2012 20:43:31 +0100 (BST)
Daniel Drake <dsd@laptop.org> wrote:
> Jon, is it OK to assume that XO-1.75 is the only mmp-camera user?
It's the only one I know of at the moment, certainly.
Even so, I think it would be a lot better to put this parameter into the
mmp_camera_platform_data structure instead of wiring it into the driver
source; it could then be set in olpc-xo-1-75.c with the other relevant
parameters. I won't oppose the inclusion of this patch, but...any chance
it could be done that way?
Thanks,
jon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmp-camera: specify XO-1.75 clock speed
2012-05-16 21:12 ` Jonathan Corbet
@ 2012-05-16 21:15 ` Daniel Drake
2012-05-20 15:18 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Drake @ 2012-05-16 21:15 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: mchehab, linux-media
On Wed, May 16, 2012 at 3:12 PM, Jonathan Corbet <corbet@lwn.net> wrote:
> On Tue, 15 May 2012 20:43:31 +0100 (BST)
> Daniel Drake <dsd@laptop.org> wrote:
>
>> Jon, is it OK to assume that XO-1.75 is the only mmp-camera user?
>
> It's the only one I know of at the moment, certainly.
>
> Even so, I think it would be a lot better to put this parameter into the
> mmp_camera_platform_data structure instead of wiring it into the driver
> source; it could then be set in olpc-xo-1-75.c with the other relevant
> parameters. I won't oppose the inclusion of this patch, but...any chance
> it could be done that way?
I'll look into it. Please put this patch on pause for now.
Thanks
Daniel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mmp-camera: specify XO-1.75 clock speed
2012-05-16 21:15 ` Daniel Drake
@ 2012-05-20 15:18 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2012-05-20 15:18 UTC (permalink / raw)
To: Daniel Drake; +Cc: Jonathan Corbet, mchehab, linux-media
Em 16-05-2012 18:15, Daniel Drake escreveu:
> On Wed, May 16, 2012 at 3:12 PM, Jonathan Corbet <corbet@lwn.net> wrote:
>> On Tue, 15 May 2012 20:43:31 +0100 (BST)
>> Daniel Drake <dsd@laptop.org> wrote:
>>
>>> Jon, is it OK to assume that XO-1.75 is the only mmp-camera user?
>>
>> It's the only one I know of at the moment, certainly.
>>
>> Even so, I think it would be a lot better to put this parameter into the
>> mmp_camera_platform_data structure instead of wiring it into the driver
>> source; it could then be set in olpc-xo-1-75.c with the other relevant
>> parameters. I won't oppose the inclusion of this patch, but...any chance
>> it could be done that way?
>
> I'll look into it. Please put this patch on pause for now.
I've marked this patch as "changes requested" at patchwork:
http://patchwork.linuxtv.org/patch/11270/
I agree with Jon: adding such config stuff at platform data is better.
Regards,
Mauro
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-20 15:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-15 19:43 [PATCH] mmp-camera: specify XO-1.75 clock speed Daniel Drake
2012-05-16 21:12 ` Jonathan Corbet
2012-05-16 21:15 ` Daniel Drake
2012-05-20 15:18 ` Mauro Carvalho Chehab
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.