* [RESEND PATCH] Add pixel clock support to OV5640 camera sensor
@ 2018-03-29 14:54 Manivannan Sadhasivam
2018-03-29 14:55 ` [RESEND PATCH] media: i2c: ov5640: Add pixel clock support Manivannan Sadhasivam
0 siblings, 1 reply; 5+ messages in thread
From: Manivannan Sadhasivam @ 2018-03-29 14:54 UTC (permalink / raw)
To: slongerbeam, mchehab, linux-media, linux-kernel
Cc: todor.tomov, nicolas.dechesne, dragonboard, loic.poulain,
daniel.thompson, Manivannan Sadhasivam
Some of the camera subsystems like camss in Qualcommm MSM chipsets
require pixel clock support in camera sensor drivers for proper functioning.
So, add a default pixel clock rate of 96MHz to OV5640 camera sensor driver.
According to the datasheet, 96MHz can be used as a pixel clock rate for
most of the modes.
This patch has been validated on Dragonboard410c with OV5640 connected
using D3 Camera Mezzanine.
Manivannan Sadhasivam (1):
media: i2c: ov5640: Add pixel clock support
drivers/media/i2c/ov5640.c | 4 ++++
1 file changed, 4 insertions(+)
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [RESEND PATCH] media: i2c: ov5640: Add pixel clock support
2018-03-29 14:54 [RESEND PATCH] Add pixel clock support to OV5640 camera sensor Manivannan Sadhasivam
@ 2018-03-29 14:55 ` Manivannan Sadhasivam
2018-04-24 9:01 ` Loic Poulain
0 siblings, 1 reply; 5+ messages in thread
From: Manivannan Sadhasivam @ 2018-03-29 14:55 UTC (permalink / raw)
To: slongerbeam, mchehab, linux-media, linux-kernel
Cc: todor.tomov, nicolas.dechesne, dragonboard, loic.poulain,
daniel.thompson, Manivannan Sadhasivam
Some of the camera subsystems like camss in Qualcommm MSM chipsets
require pixel clock support in camera sensor drivers. So, this commit
adds a default pixel clock rate of 96MHz to OV5640 camera sensor driver.
According to the datasheet, 96MHz can be used as a pixel clock rate for
most of the modes.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
drivers/media/i2c/ov5640.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index 39a2269..7152c84 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -162,6 +162,7 @@ struct ov5640_ctrls {
struct v4l2_ctrl *auto_gain;
struct v4l2_ctrl *gain;
};
+ struct v4l2_ctrl *pixel_clock;
struct v4l2_ctrl *brightness;
struct v4l2_ctrl *saturation;
struct v4l2_ctrl *contrast;
@@ -2009,6 +2010,9 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
ctrls->gain = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_GAIN,
0, 1023, 1, 0);
+ /* Pixel clock (default of 96MHz) */
+ ctrls->pixel_clock = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_PIXEL_RATE,
+ 1, INT_MAX, 1, 96000000);
ctrls->saturation = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_SATURATION,
0, 255, 1, 64);
ctrls->hue = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_HUE,
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RESEND PATCH] media: i2c: ov5640: Add pixel clock support
2018-03-29 14:55 ` [RESEND PATCH] media: i2c: ov5640: Add pixel clock support Manivannan Sadhasivam
@ 2018-04-24 9:01 ` Loic Poulain
2018-04-24 10:33 ` Sakari Ailus
0 siblings, 1 reply; 5+ messages in thread
From: Loic Poulain @ 2018-04-24 9:01 UTC (permalink / raw)
To: Manivannan Sadhasivam, slongerbeam, mchehab
Cc: linux-media, linux-kernel, Todor Tomov, Nicolas Dechesne,
dragonboard, Daniel Thompson
On 29 March 2018 at 16:55, Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> wrote:
> Some of the camera subsystems like camss in Qualcommm MSM chipsets
> require pixel clock support in camera sensor drivers. So, this commit
> adds a default pixel clock rate of 96MHz to OV5640 camera sensor driver.
>
> According to the datasheet, 96MHz can be used as a pixel clock rate for
> most of the modes.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tested-by: Loic Poulain <loic.poulain@linaro.org>
It works for me on Dragonboard 410c + D3 camera mezzanine (ov5640) .
Any comments on this change?
Regards,
Loic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RESEND PATCH] media: i2c: ov5640: Add pixel clock support
2018-04-24 9:01 ` Loic Poulain
@ 2018-04-24 10:33 ` Sakari Ailus
2018-04-24 11:09 ` Loic Poulain
0 siblings, 1 reply; 5+ messages in thread
From: Sakari Ailus @ 2018-04-24 10:33 UTC (permalink / raw)
To: Loic Poulain
Cc: Manivannan Sadhasivam, slongerbeam, mchehab, linux-media,
linux-kernel, Todor Tomov, Nicolas Dechesne, dragonboard,
Daniel Thompson
On Tue, Apr 24, 2018 at 11:01:18AM +0200, Loic Poulain wrote:
> On 29 March 2018 at 16:55, Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> wrote:
> > Some of the camera subsystems like camss in Qualcommm MSM chipsets
> > require pixel clock support in camera sensor drivers. So, this commit
> > adds a default pixel clock rate of 96MHz to OV5640 camera sensor driver.
> >
> > According to the datasheet, 96MHz can be used as a pixel clock rate for
> > most of the modes.
> >
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>
> Tested-by: Loic Poulain <loic.poulain@linaro.org>
>
> It works for me on Dragonboard 410c + D3 camera mezzanine (ov5640) .
>
> Any comments on this change?
<URL:https://patchwork.linuxtv.org/project/linux-media/list/?submitter=Maxime+Ripard&state=*&q=ov5640>
There's also another set that adds PIXEL_CLOCK (as well as LINK_FREQ)
support to the driver, that seems more complete than this patch but
requires a rebase on Maxime's patches:
<URL:https://patchwork.linuxtv.org/project/linux-media/list/?submitter=7218&state=*&q=ov5640>
--
Sakari Ailus
e-mail: sakari.ailus@iki.fi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RESEND PATCH] media: i2c: ov5640: Add pixel clock support
2018-04-24 10:33 ` Sakari Ailus
@ 2018-04-24 11:09 ` Loic Poulain
0 siblings, 0 replies; 5+ messages in thread
From: Loic Poulain @ 2018-04-24 11:09 UTC (permalink / raw)
To: Sakari Ailus
Cc: Manivannan Sadhasivam, slongerbeam, mchehab, linux-media,
linux-kernel, Todor Tomov, Nicolas Dechesne, dragonboard,
Daniel Thompson
Hi Sakari,
>> Any comments on this change?
>
> <URL:https://patchwork.linuxtv.org/project/linux-media/list/?submitter=Maxime+Ripard&state=*&q=ov5640>
>
> There's also another set that adds PIXEL_CLOCK (as well as LINK_FREQ)
> support to the driver, that seems more complete than this patch but
> requires a rebase on Maxime's patches:
>
> <URL:https://patchwork.linuxtv.org/project/linux-media/list/?submitter=7218&state=*&q=ov5640>
Thanks, I've just see this patch series. Indeed, patch will need a
rework/rebase.
Regards,
Loic
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-04-24 11:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 14:54 [RESEND PATCH] Add pixel clock support to OV5640 camera sensor Manivannan Sadhasivam
2018-03-29 14:55 ` [RESEND PATCH] media: i2c: ov5640: Add pixel clock support Manivannan Sadhasivam
2018-04-24 9:01 ` Loic Poulain
2018-04-24 10:33 ` Sakari Ailus
2018-04-24 11:09 ` Loic Poulain
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).