)
some lens driver patches
Sakari Ailus (2):
dt-bindings: dw9714, dw9807-vcm: Add files to MAINTAINERS, rename files
dw9807-vcm: Remove redundant
rge commit and a few extra patches in your tree; I threw them
out. :-)
I also edited the commit messages slightly (format; no change in content)
--- the patches are as-is. I'll still check they look right before sending
a pull request, likely on Monday.
--
Regards,
Sakari Ailus
sakari.ai...@linux.intel.com
of the driver or the module while omitting the
device's I²C address and bus, leaving the devices with a static name and
effectively limiting the number of such devices in a media device to 1.
Address this by using the name set by the V4L2 framework.
Signed-off-by: Sakari Ailus
Reviewed-by: Akinobu Mita
of the driver or the module while omitting the
device's I²C address and bus, leaving the devices with a static name and
effectively limiting the number of such devices in a media device to 1.
Address this by using the name set by the V4L2 framework.
Signed-off-by: Sakari Ailus
Reviewed-by: Akinobu Mita
664,6 +2065,9 @@ static int tvp5150_probe(struct i2c_client *c,
> err:
Now that you have more error labels, you could rename this one.
> v4l2_ctrl_handler_free(>hdl);
> return res;
Is the above line intended to be kept?
> +err_cleanup_dt:
> + tvp5150_dt_cleanup(core);
> + return res;
> }
>
> static int tvp5150_remove(struct i2c_client *c)
--
Sakari Ailus
sakari.ai...@linux.intel.com
subdev_hostdata(struct v4l2_subdev *sd, void *p)
> -{
> - sd->host_priv = p;
> -}
> -
> -/**
> - * v4l2_get_subdev_hostdata - Gets V4L2 dev private data
> - *
> - * @sd: pointer to v4l2_subdev
> - *
> - * Returns the pointer to the private host data to be stored.
> - */
> -static inline void *v4l2_get_subdev_hostdata(const struct v4l2_subdev *sd)
> -{
> - return sd->host_priv;
> -}
> -
> -#ifdef CONFIG_MEDIA_CONTROLLER
> -
> /**
> * v4l2_subdev_link_validate_default - validates a media link
> *
--
Kind regards,
Sakari Ailus
sakari.ai...@linux.intel.com
0;
> }
> @@ -1616,6 +1626,7 @@ static const struct v4l2_subdev_core_ops
> tvp5150_core_ops = {
> .g_register = tvp5150_g_register,
> .s_register = tvp5150_s_register,
> #endif
> + .s_power = tvp5150_s_power,
> };
>
> static const struct v4l2_subdev_tuner_ops tvp5150_tuner_ops = {
--
Kind regards,
Sakari Ailus
sakari.ai...@linux.intel.com
ted clocks from random
devices for many, many years now.
The PXA camera driver does still depend on v4l2_clk so I guess this is
better to do later on in a different patchset.
--
Regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
0x10
> +#define OV9640_MVFP_H 0x20
> +
> +#define OV9640_COM1_HREF_NOSKIP 0x00
> +#define OV9640_COM1_HREF_2SKIP 0x04
> +#define OV9640_COM1_HREF_3SKIP 0x08
> +#define OV9640_COM1_QQFMT 0x20
> +
> +#define OV9640_COM2_SSM 0x10
> +
> +#define OV9640_COM3_VP 0x04
> +
> +#define OV9640_COM4_QQ_VP 0x80
> +#define OV9640_COM4_RSVD0x40
> +
> +#define OV9640_COM5_SYSCLK 0x80
> +#define OV9640_COM5_LONGEXP 0x01
> +
> +#define OV9640_COM6_OPT_BLC 0x40
> +#define OV9640_COM6_ADBLC_BIAS 0x08
> +#define OV9640_COM6_FMT_RST 0x82
> +#define OV9640_COM6_ADBLC_OPTEN 0x01
> +
> +#define OV9640_COM7_RAW_RGB 0x01
> +#define OV9640_COM7_RGB 0x04
> +#define OV9640_COM7_QCIF0x08
> +#define OV9640_COM7_QVGA0x10
> +#define OV9640_COM7_CIF 0x20
> +#define OV9640_COM7_VGA 0x40
> +#define OV9640_COM7_SCCB_RESET 0x80
> +
> +#define OV9640_TSLB_YVYU_YUYV 0x04
> +#define OV9640_TSLB_YUYV_UYVY 0x08
> +
> +#define OV9640_COM12_YUV_AVG0x04
> +#define OV9640_COM12_RSVD 0x40
> +
> +#define OV9640_COM13_GAMMA_NONE 0x00
> +#define OV9640_COM13_GAMMA_Y0x40
> +#define OV9640_COM13_GAMMA_RAW 0x80
> +#define OV9640_COM13_RGB_AVG0x20
> +#define OV9640_COM13_MATRIX_EN 0x10
> +#define OV9640_COM13_Y_DELAY_EN 0x08
> +#define OV9640_COM13_YUV_DLY(x) ((x) & 0x07)
> +
> +#define OV9640_COM15_OR_00FF0x00
> +#define OV9640_COM15_OR_01FE0x40
> +#define OV9640_COM15_OR_10F00xc0
> +#define OV9640_COM15_RGB_NORM 0x00
> +#define OV9640_COM15_RGB_5650x10
> +#define OV9640_COM15_RGB_5550x30
> +
> +#define OV9640_COM16_RB_AVG 0x01
> +
> +/* IDs */
> +#define OV9640_V2 0x9648
> +#define OV9640_V3 0x9649
> +#define VERSION(pid, ver) (((pid) << 8) | ((ver) & 0xFF))
> +
> +/* supported resolutions */
> +enum {
> + W_QQCIF = 88,
> + W_QQVGA = 160,
> + W_QCIF = 176,
> + W_QVGA = 320,
> + W_CIF = 352,
> + W_VGA = 640,
> + W_SXGA = 1280
> +};
> +#define H_SXGA 960
> +
> +/* Misc. structures */
> +struct ov9640_reg_alt {
> + u8 com7;
> + u8 com12;
> + u8 com13;
> + u8 com15;
> +};
> +
> +struct ov9640_reg {
> + u8 reg;
> + u8 val;
> +};
> +
> +struct ov9640_priv {
> + struct v4l2_subdev subdev;
> + struct v4l2_ctrl_handlerhdl;
> + struct v4l2_clk *clk;
> +
> + int model;
> + int revision;
> +};
> +
> +#endif /* __DRIVERS_MEDIA_VIDEO_OV9640_H__ */
> diff --git a/drivers/media/i2c/soc_camera/Kconfig
> b/drivers/media/i2c/soc_camera/Kconfig
> index 7c2aabc8a3f6..7d7b801ab2ce 100644
> --- a/drivers/media/i2c/soc_camera/Kconfig
> +++ b/drivers/media/i2c/soc_camera/Kconfig
> @@ -42,10 +42,12 @@ config SOC_CAMERA_OV772X
> This is a ov772x camera driver
>
> config SOC_CAMERA_OV9640
> - tristate "ov9640 camera support"
> + tristate "ov9640 camera support (OBSOLETE)"
> + default n
> depends on SOC_CAMERA && I2C
> help
> - This is a ov9640 camera driver
> + This is an obsoleted version of ov9640 camera driver. Please use
> + the v4l2 standalone one (VIDEO_OV9640).
>
> config SOC_CAMERA_OV9740
> tristate "ov9740 camera support"
--
Kind regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
t; create mode 100644 drivers/media/i2c/imx208.c
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index bbd9b9b..896c1df 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -13268,6 +13268,13 @@ S: Maintained
> F: drivers/ssb/
> F: include/linux/ssb/
>
> +SONY
:
subscriptions are only added to the event list once they are fully
initialised.
Signed-off-by: Sakari Ailus
Reviewed-by: Hans Verkuil
---
since v1:
- Call the mutex field subscribe_lock instead.
- Move the field that is now subscribe_lock above the subscribed field the
write access to which
Sakari Ailus (23):
v4l: fwnode: Add debug prints for V4L2 endpoint property parsing
v4l: fwnode: Use fwnode_graph_for_each_endpoint
v4l: fwnode: The CSI-2 clock is continuous if it's not non-continuous
dt-bindings: media
On Thu, Aug 30, 2018 at 01:55:32PM +0300, Sakari Ailus wrote:
> Ping?
I will assume this patch is fine. :-)
>
> On Mon, Jul 23, 2018 at 01:50:38PM +0300, Sakari Ailus wrote:
> > Add the DT binding documentation for dw9714 and dw9807-vcm to the
> > MAINTAINERS file. T
Hi Raj, Mauro,
On Fri, Aug 31, 2018 at 10:40:22PM +, Mani, Rajmohan wrote:
> Hi Sakari, Mauro,
>
> > -Original Message-
> > From: Sakari Ailus [mailto:sakari.ai...@linux.intel.com]
> > Sent: Tuesday, August 28, 2018 2:16 AM
> > To: Tomasz Figa
> &
:
subscriptions are only added to the event list once they are fully
initialised.
Signed-off-by: Sakari Ailus
---
since v1:
- Call the mutex field subscribe_lock instead.
- Move the field that is now subscribe_lock above the subscribed field the
write access to which it serialises.
- Improve
Hi Laurent,
On Wed, Sep 12, 2018 at 02:57:20PM +0300, Laurent Pinchart wrote:
> Hello,
>
> On Wednesday, 12 September 2018 13:00:57 EEST Sakari Ailus wrote:
> > On Wed, Sep 12, 2018 at 11:27:35AM +0200, Hans Verkuil wrote:
> > > On 09/12/18 10:52, Sakari Ailus
Hi Jacopo,
Thanks for the comments.
On Wed, Sep 12, 2018 at 05:15:05PM +0200, jacopo mondi wrote:
> Hi Sakari,
>
> On Mon, Aug 27, 2018 at 12:29:55PM +0300, Sakari Ailus wrote:
> > Use the media bus types instead of the fwnode bus types internally. This
> > is the int
Hi Jacopo,
On Wed, Sep 12, 2018 at 04:51:07PM +0200, jacopo mondi wrote:
> Hi Sakari,
>
> On Mon, Aug 27, 2018 at 12:29:44PM +0300, Sakari Ailus wrote:
> > Instead of allocating the V4L2 fwnode endpoint in
> > v4l2_fwnode_endpoint_alloc_parse, let the caller to do this. Th
Hi Hans,
On Wed, Sep 12, 2018 at 02:32:52PM +0200, Hans Verkuil wrote:
> On 09/12/18 12:00, Sakari Ailus wrote:
> > Hi Hans,
> >
> > Thanks for the quick review.
> >
> > On Wed, Sep 12, 2018 at 11:27:35AM +0200, Hans Verkuil wrote:
> >> On 09/12/18
Hi Hans,
Thanks for the quick review.
On Wed, Sep 12, 2018 at 11:27:35AM +0200, Hans Verkuil wrote:
> On 09/12/18 10:52, Sakari Ailus wrote:
> > The event subscriptions are added to the subscribed event list while
> > holding a spinlock, but that lock is subsequently relea
re.c
> @@ -662,6 +662,7 @@ int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory
> memory,
> unsigned int num_buffers, allocated_buffers, num_planes = 0;
> unsigned plane_sizes[VB2_MAX_PLANES] = { };
> int ret;
> + int i;
unsigned int i;
And ar
:
subscriptions are only added to the event list once they are fully
initialised.
Signed-off-by: Sakari Ailus
---
Hi folks,
I noticed this while working to add support for media events. This seems
like material for the stable trees.
drivers/media/v4l2-core/v4l2-event.c | 35
On Tue, Sep 04, 2018 at 06:43:20PM +0300, Sakari Ailus wrote:
> media_v2_prop, called e.g. payload_length. I also think we should have the
> size (and length) of the property in a specific unit, such as bytes, so the
> parser does not have to know a given property type to determine it
&g
Hi Hans,
On Tue, Sep 04, 2018 at 03:50:33PM +0200, Hans Verkuil wrote:
> On 09/04/18 15:01, Sakari Ailus wrote:
> > Hi Hans,
> >
> > Thanks for the set.
> >
> > On Tue, Aug 07, 2018 at 12:28:45PM +0200, Hans Verkuil wrote:
> >> From: Hans Ve
media_entity_desc)
> #define MEDIA_IOC_ENUM_LINKS _IOWR('|', 0x02, struct media_links_enum)
> #define MEDIA_IOC_SETUP_LINK _IOWR('|', 0x03, struct media_link_desc)
> +/* Old MEDIA_IOC_G_TOPOLOGY ioctl without props support */
> +#define MEDIA_IOC_G_TOPOLOGY_OLD 0xc0487c04
> #define MEDIA_IOC_G_TOPOLOGY _IOWR('|', 0x04, struct media_v2_topology)
>
> #ifndef __KERNEL__
--
Kind regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
rry for inconvenience.
No worries; thanks for the fix!
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
: Fix v4l2-ctrl error handling
drivers/media/i2c/mt9v111.c | 41 +
1 file changed, 13 insertions(+), 28 deletions(-)
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
ver's probe() function; doing the same here seems
redundant. Just checking ret and failing if it's non-zero should suffice:
if (ret)
return ret;
Let me know if you'd like to respin; I can do that as well.
>
> expmin = EXPOS_MIN_MS * info->pdata->clk_rate / (8 * 1000);
&g
> +++ b/drivers/media/rc/pwm-ir-tx.c
> @@ -30,6 +30,7 @@ struct pwm_ir {
> };
>
> static const struct of_device_id pwm_ir_of_match[] = {
> + { .compatible = "nokia,n900-ir" },
Is this change needed as well? I suppose you could add it later if there's
a need to e.g. do so
On Thu, Aug 30, 2018 at 01:51:39PM +0200, Hans Verkuil wrote:
> On 08/30/2018 12:15 PM, Sakari Ailus wrote:
> > Hi Hans,
> >
> > Thanks a lot for working on this!
> >
> > On Tue, Aug 28, 2018 at 03:49:10PM +0200, Hans Verkuil wrote:
> >>
: ov772x: use SCCB regmap
media: ov9650: use SCCB regmap
Alexey Khoroshilov (1):
media: ov772x: Disable clk on error path
Hugues Fruchet (1):
media: ov5640: fix mode change regression
Sakari Ailus (2):
ov5670, ov13858: Use pm_runtime_idle
i2c: Fix
Ping?
On Mon, Jul 23, 2018 at 01:50:38PM +0300, Sakari Ailus wrote:
> Add the DT binding documentation for dw9714 and dw9807-vcm to the
> MAINTAINERS file. The dw9807-vcm binding documentation file is renamed to
> match the dw9807's VCM bit's compatible string.
>
> Signed-off-b
n ERR_PTR(-EPERM);
> + return ERR_PTR(-EACCES);
>
> filp = fget(request_fd);
> if (!filp)
> @@ -405,7 +405,7 @@ int media_request_object_bind(struct media_request *req,
> int ret = -EBUSY;
>
> if (WARN_ON(!ops->release))
> - return -EPERM;
> + return -EACCES;
>
> spin_lock_irqsave(>lock, flags);
>
--
Regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
Hi Steve,
On Tue, Aug 28, 2018 at 05:53:51PM -0700, Steve Longerbeam wrote:
> Hi Sakari,
>
>
> On 08/27/2018 02:29 AM, Sakari Ailus wrote:
> > Hello everyone,
> >
> > I've long thought the V4L2 fwnode framework requires some work (it's buggy
> > and it do
brings no functional change.
Sakari Ailus (3):
v4l: subdev: Add a function to set an I²C sub-device's name
smiapp: Use v4l2_i2c_subdev_set_name
v4l: sr030pc30: Remove redundant setting of sub-device name
drivers/media/i2c/smiapp/smiapp-core.c | 10 --
drivers/media/i2c/sr030pc30.c
v4l2_i2c_subdev_set_name() can be used to assign a name to a sub-device.
This way uniform names can be formed easily without having to resort to
things such as snprintf in drivers.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-common.c | 18 ++
include/media/v4l2
Use v4l2_i2c_subdev_set_name() to set the name of the smiapp driver's
sub-devices. There is no functional change.
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/smiapp/smiapp-core.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/media/i2c/smiapp/smiapp
The sub-device name is set right after in v4l2_i2c_subdev_init(). Remove
the redundant strcpy() call.
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/sr030pc30.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/media/i2c/sr030pc30.c b/drivers/media/i2c/sr030pc30.c
index 2a4882cddc51
> By the way, I wonder if this is the right approach for controlling the
> layout of ABI structs. I don't see many headers using any alignment in
> uapi/ in general. Perhaps explicit padding bytes would be more
> appropriate? They are also less tricky when one structure needs to be
> embedded inside two or more different structures with different
> alignments, which can't be done easily if you specify __aligned() on
> the child struct.
One of the reasons there are not so many are probably what you just
elaborated above. That said, there are a few points to note here:
- the alignment is generally the same here as it's due to DMA word size
AFAIK,
- the device can be only found in an Intel SoC which limits the
architectures where the driver can actually be used to x86, 64- or
32-bit.
Together these should in theory make if fairly safe. Padding in principle
would be more explicit way to force struct memory layout without relying so
much on the compiler doing the right thing but it'll lead to a *lot* of
reserved fields, which I think is likely one of the reasons why it didn't
catch up back then --- I've suggested it earlier.
FWIW, the rest of the uAPI headers appear to be using
__attribute__((aligned(x))).
--
Regards,
Sakari Ailus
sakari.ai...@linux.intel.com
and Bt.656 interfaces but the means to pass that
information to software wasn't there.
Autodetection (value 0) is removed as an option as the property could be
simply omitted in that case.
Signed-off-by: Sakari Ailus
---
Documentation/devicetree/bindings/media/video-interfaces.txt | 4 +++-
1 file
Only assign endpoint configuration if the endpoint is parsed successfully.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 30 ++
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers
Use fwnode_graph_for_each_endpoint iterator for better readability.
Signed-off-by: Sakari Ailus
Reviewed-by: Niklas Söderlund
---
drivers/media/v4l2-core/v4l2-fwnode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media
Make use of the default CSI-2 lane mapping from caller-passed
configuration.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media
Add support for parsing CSI-2 D-PHY, parallel or Bt.656 bus explicitly.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 53 ---
1 file changed, 43 insertions(+), 10 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b
.
Default to Bt.656 if no properties suggesting a bus type are found.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 31 +--
include/media/v4l2-mediabus.h | 2 ++
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/drivers
Print debug info as standard V4L2 endpoint are parsed.
Signed-off-by: Sakari Ailus
Reviewed-by: Niklas Söderlund
---
drivers/media/v4l2-core/v4l2-fwnode.c | 108 ++
1 file changed, 85 insertions(+), 23 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2
The caller may provide default flags for the endpoint. Change the
configuration based on what is available through the fwnode property API.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/drivers
Parsing the graph endpoint is always successful; therefore parse it as
last.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media/v4l2-core/v4l2
Use the media bus types instead of the fwnode bus types internally. This
is the interface to the drivers as well, making the use of the fwnode bus
types more localised to the V4L2 fwnode framework.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 100
Instead of opportunistically trying to gather some information from the
V4L2 endpoint, set the bus type and let the V4L2 fwnode framework figure
out the configuration.
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/smiapp/smiapp-core.c | 6 ++
1 file changed, 6 insertions(+)
diff --git
Most hardware doesn't support re-mapping of the CSI-2 lanes. Especially
sensor drivers have a default number of lanes. Instead of requiring the
caller (the driver) to provide such a unit mapping, provide one if no
mapping is configured.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core
Instead of allocating the V4L2 fwnode endpoint in
v4l2_fwnode_endpoint_alloc_parse, let the caller to do this. This allows
setting default parameters for the endpoint which is a very common need
for drivers.
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/ov2659.c | 14
Print bus type either as set by the driver or as parsed from the bus-type
property, as well as the guessed V4L2 media bus type.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 38 +++
1 file changed, 38 insertions(+)
diff --git a/drivers
Add definitions corresponding to DT bindings to the CSI-2 D-PHY, parallel
and Bt.656 busses.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c
b/drivers/media/v4l2-core/v4l2
In order to prepare for allowing drivers to set the defaults for a given
bus, make zeroing the struct conditional based on detecting the bus.
All callers now set the bus type to zero which allows only zeroing the
remaining bus union.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2
The CSI-2 bus may use either D-PHY or C-PHY. Make this visible in media
bus enum.
Signed-off-by: Sakari Ailus
---
drivers/gpu/ipu-v3/ipu-csi.c | 2 +-
drivers/media/i2c/adv7180.c | 2 +-
drivers/media/i2c/ov5640.c | 4 ++--
drivers
The V4L2 fwnode framework only parsed CSI-2 D-PHY endpoints while C-PHY
support wasn't there. Also parse endpoints for media bus type
V4L2_MBUS_CSI2_CPHY.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff
would
have been troublesome for the existing drivers.
- Set the bus_type field to zero (i.e. guess) for existing callers of
v4l2_fwnode_endpoint_(alloc_)parse.
- Improved documentation for v4l2_fwnode_endpoint_parse and
v4l2_fwnode_endpoint_alloc_parse.
Sakari Ailus (23):
v4l: fwnode: Add
-by: Sakari Ailus
---
drivers/media/i2c/adv7604.c | 2 +-
drivers/media/i2c/mt9v032.c | 2 +-
drivers/media/i2c/ov5647.c| 2 +-
drivers/media/i2c/ov7670.c| 2 +-
drivers/media/i2c/s5c73m3/s5c73m3-core.c | 2 +-
drivers
The semantics of v4l2_fwnode_endpoint_parse() and
v4l2_fwnode_endpoint_alloc_parse() have changed slightly: they now take
the bus type from the user as well as a default configuration for the bus
that shall reflect the DT binding defaults. Document this.
Signed-off-by: Sakari Ailus
---
include
Read the lane inversion independently of whether the "data-lanes" property
exists. This makes sense since the caller may pass the number of lanes as
the default configuration while the lane inversion configuration may still
be available in firmware.
Signed-off-by: Sakari Ailus
---
dri
with what's in DT. Also return -ENXIO if bus type detection failed to
separate this from the rest of the errors.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c | 27 +++
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/drivers/media
The continuous clock flag was only set if there was a clock or data lanes.
This isn't needed as such a configuration is invalid to begin with. Always
set the continuous clock flag if the non-continuous property is not found.
Signed-off-by: Sakari Ailus
---
drivers/media/v4l2-core/v4l2-fwnode.c
On Tue, Aug 14, 2018 at 04:20:36PM +0200, Hans Verkuil wrote:
> From: Hans Verkuil
>
> Make vb2_buffer a request object.
>
> Signed-off-by: Hans Verkuil
Acked-by: Sakari Ailus
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
>
> Signed-off-by: Hans Verkuil
> Reviewed-by: Mauro Carvalho Chehab
Acked-by: Sakari Ailus
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
tor.
>
> If a buffer is stored in a request, but not yet queued to the
> driver, then V4L2_BUF_FLAG_IN_REQUEST is set.
>
> Signed-off-by: Hans Verkuil
> Reviewed-by: Mauro Carvalho Chehab
Acked-by: Sakari Ailus
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
s, as several core developers will be taking
> vacations those days.
I marked the patch obsoleted for now --- the controls available are
dependent on the pipeline and the pipeline may change, leading the handler
pointing to a different device's control handler.
I certainly have no problems in doing this in principle, but it cannot
currently be done safely nor correctly in the kernel in many cases. As the
controls available in the video node, in general case, would comprise of
controls from several different devices, and thus several different control
handlers, there may well be duplicates and in this case the kernel would
have no clue what to do in such a case.
In user space you can have policies that could be applied in such a case;
the kernel just provides an interface to the hardware, effectively.
Regarding this topic --- there's work beginning towards supporting complex
cameras in Linux and this particular matter belongs to the same problem
area.
--
Kind regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
/ out_clock
> * ratio is then approximated with n / m within their respective bounds.
> * For each parameter choice, the preconditions must be rechecked,
> * because integer rounding errors may result in violating some of the
> * preconditions. The parameter set with the least frequency error is
> * returned.
> */
>
> Is this what you are looking for?
>
> Helmut
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
On Tue, Aug 14, 2018 at 04:20:19PM +0200, Hans Verkuil wrote:
> From: Hans Verkuil
>
> Add a simple helper function that tests if the driver supports
> the request API.
>
> Signed-off-by: Hans Verkuil
> Reviewed-by: Mauro Carvalho Chehab
Acked-by: Sakari Ailus
--
ock = pdata->pix_clock;
> + sensor->pix_clock = pll.pix_clock;
>
> ret = mt9m032_write(client, MT9M032_PLL_CONFIG1,
> (pll.m << MT9M032_PLL_CONFIG1_MUL_SHIFT) |
> @@ -711,6 +711,7 @@ static int mt9m032_probe(struct i2c_client *client,
> struct mt9m032_platform_data *pdata = client->dev.platform_data;
> struct i2c_adapter *adapter = client->adapter;
> struct mt9m032 *sensor;
> + struct v4l2_ctrl *pixel_rate_ctrl;
> int chip_version;
> int ret;
>
> @@ -780,9 +781,10 @@ static int mt9m032_probe(struct i2c_client *client,
> V4L2_CID_EXPOSURE, MT9M032_SHUTTER_WIDTH_MIN,
> MT9M032_SHUTTER_WIDTH_MAX, 1,
> MT9M032_SHUTTER_WIDTH_DEF);
> - v4l2_ctrl_new_std(>ctrls, _ctrl_ops,
> - V4L2_CID_PIXEL_RATE, pdata->pix_clock,
> - pdata->pix_clock, 1, pdata->pix_clock);
> + pixel_rate_ctrl = v4l2_ctrl_new_std(>ctrls, _ctrl_ops,
> + V4L2_CID_PIXEL_RATE,
> + pdata->pix_clock, pdata->pix_clock,
> + 1, pdata->pix_clock);
>
> if (sensor->ctrls.error) {
> ret = sensor->ctrls.error;
> @@ -810,6 +812,11 @@ static int mt9m032_probe(struct i2c_client *client,
> goto error_entity;
> usleep_range(1, 11000);
>
> + ret = __v4l2_ctrl_modify_range(pixel_rate_ctrl, sensor->pix_clock,
> +sensor->pix_clock, 1, sensor->pix_clock);
> + if (ret < 0)
> + goto error_entity;
> +
> ret = v4l2_ctrl_handler_setup(>ctrls);
> if (ret < 0)
> goto error_entity;
> --
> 2.11.0
>
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
n.wikipedia.org/wiki/Interval_(mathematics)>
>
> Yet, you're listing from 2^3 to 2^7, and that's confusing. Perhaps
> you want to say, instead, that the valid values are at the 3..7 range?
> If so, please use something like "values at the [3..7] range".
I'd prefer either 3..7 or [3, 7], but the latter is formal. Whether a range
is closed or (partially) open matters less with integers though.
--
Kind regards,
Sakari Ailus
sakari.ai...@linux.intel.com
unsupported control is
> > queried, so if we decided to keep the "cache" functionality after all,
> > perhaps we should stay consistent with it?
> > Reference:
> > https://www.kernel.org/doc/html/latest/media/uapi/v4l/vidioc-g-ext-ctrls.html#return-value
> >
> > My suggestion would be:
> > - EINVAL: the control was not in the request, (if we keep the cache
> > functionality)
> > - EPERM: the value is not ready, (we selected this code for Decoder
> > Interface to mean that CAPTURE format is not ready, which is similar;
> > perhaps that could be consistent?)
> >
> > Note that EINVAL would only apply to writable controls, while EPERM
> > only to volatile controls, since the latter can only change due to
> > request completion (non-volatile controls can only change as an effect
> > of user space action).
> >
>
> I'm inclined to just always return EPERM when calling G_EXT_CTRLS for
> a request. We can always relax this in the future.
>
> So when a request is not yet queued G_EXT_CTRLS returns EPERM, when
> queued but not completed it returns EBUSY and once completed it will
> work as it does today.
It may not be trivial to figure out the state of the request when a control
is being accessed. Besides, it could conceivably change during the IOCTL call.
How about just using EPERM (or EBUSY) in all cases?
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
s that do not know
> about
>this flag will ignore it as well. There is no check against unknown flags.
--
Regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
Hi Rob,
On Thu, Aug 16, 2018 at 07:48:24AM -0600, Rob Herring wrote:
> On Thu, Aug 16, 2018 at 3:17 AM Sakari Ailus
> wrote:
> >
> > Ping?
> >
> > On Wed, Aug 01, 2018 at 02:16:27PM +0300, Sakari Ailus wrote:
> > > Hi Rob,
> > >
> > > Than
Ping?
On Wed, Aug 01, 2018 at 02:16:27PM +0300, Sakari Ailus wrote:
> Hi Rob,
>
> Thanks for the review.
>
> On Tue, Jul 31, 2018 at 03:32:10PM -0600, Rob Herring wrote:
> > On Mon, Jul 23, 2018 at 04:46:50PM +0300, Sakari Ailus wrote:
> > > Allow specifying the
Hi,
On Tue, Aug 14, 2018 at 10:30:14AM +0300, Laurent Pinchart wrote:
> Hi Helmut,
>
> (CC'ing Sakari Ailus who is our current PLL expert after spending so much
> time
> on the SMIA PLL code)
>
> On Tuesday, 14 August 2018 09:35:40 EEST Helmut Grohne wrote:
> >
vice
> *v4l2_dev,
> #endif
> error_module:
> if (!sd->owner_v4l2_dev)
> - module_put(sd->owner);
> + module_put(v4l2_dev->dev->driver->owner);
> sd->v4l2_dev = NULL;
> return err;
> }
> @@ -318,6 +319,6 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
> #endif
> video_unregister_device(sd->devnode);
> if (!sd->owner_v4l2_dev)
> - module_put(sd->owner);
> + module_put(v4l2_dev->dev->driver->owner);
> }
> EXPORT_SYMBOL_GPL(v4l2_device_unregister_subdev);
> --
> 2.18.0
>
--
Sakari Ailus
sakari.ai...@linux.intel.com
Hi Jacopo,
On Fri, Aug 10, 2018 at 12:38:57PM +0200, jacopo mondi wrote:
> Hi Sakari,
>thanks for this nice rework
>
> On Mon, Jul 23, 2018 at 04:46:45PM +0300, Sakari Ailus wrote:
> > Hello everyone,
> >
> > I've long thought the V4L2 fwnode framework
)
Jacopo Mondi (1):
media: i2c: mt9v111: Fix v4l2-ctrl error handling
drivers/media/i2c/mt9v111.c | 41 +
1 file changed, 13 insertions(+), 28 deletions(-)
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
Print more error log during error handling.
> -- Remove mutex_destroy() from imx208_free_controls().
> -- Add more comments.
> since v3:
> -- Set explicit indices to link frequencies.
Could you add support for obtaining the link frequencies from firmware,
please?
--
Kind regards,
Sakari Ailus
sakari.ai...@linux.intel.com
On Fri, Aug 03, 2018 at 03:46:32PM +0200, Philippe De Muyter wrote:
> Hi Sakari,
>
> On Fri, Aug 03, 2018 at 03:43:15PM +0300, Sakari Ailus wrote:
> > Hi Philippe,
> >
> > On Wed, Aug 01, 2018 at 11:20:57PM +0200, Philippe De Muyter wrote:
> > > When v4l2_i2c_
vice (and entity) names? Looking at i2c_dev_set_name(), this will be
different. We can't change the existing entity naming in drivers, this will
break applications that expect them to be named in a certain way.
--
Kind regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
eally trivial to just expose this information, so implement this.
> > >>
> > >> Signed-off-by: Hans Verkuil
> > >> Acked-by: Sakari Ailus
> > >> ---
> > >>
> > >> drivers/media/media-device.c | 1 +
> > >>
-names = "pclk", "wrap", "phy";
> +clock-frequency = <16600>;
> +power-domains = <_mipi_phy>;
> +phy-supply = <_1p0d>;
> +resets = < IMX7_RESET_MIPI_PHY_MRST>;
> +reset-names = "mrst";
> +fsl,csis-hs-settle = <3>;
> +
> +port@0 {
> +reg = <0>;
> +
> +mipi_from_sensor: endpoint {
> +remote-endpoint = <_to_mipi>;
> +data-lanes = <1>;
> +};
> +};
> +
> +port@1 {
> +reg = <1>;
> +
> +mipi_vc0_to_csi_mux: endpoint {
> +remote-endpoint = <_mux_from_mipi_vc0>;
> +};
> +};
> +};
--
Kind regards,
Sakari Ailus
sakari.ai...@linux.intel.com
= imx258_open,
> };
> @@ -1250,6 +1237,7 @@ static int imx258_probe(struct i2c_client *client)
>
> /* Initialize subdev */
> imx258->sd.internal_ops = _internal_ops;
> + imx258->sd.entity.ops = _subdev_entity_ops;
> imx258->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
> imx258->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
>
--
Regards,
Sakari Ailus
sakari.ai...@linux.intel.com
Hi Rob,
Thanks for the review.
On Tue, Jul 31, 2018 at 03:32:10PM -0600, Rob Herring wrote:
> On Mon, Jul 23, 2018 at 04:46:50PM +0300, Sakari Ailus wrote:
> > Allow specifying the bus type explicitly for MIPI D-PHY, parallel and
> > Bt.656 busses. This is useful for devices th
only.
Address this for drivers where this pattern exists.
This patch has been produced using the following command:
$ git grep -l pm_runtime_get_if_in_use -- drivers/media/i2c/ | \
xargs perl -i -pe 's/(pm_runtime_get_if_in_use\(.*\)) \<\= 0/!$1/'
Signed-off-by: Sakari Ailus
---
driv
it a fix for those as well.
I suppose most people use these with runtime PM enabled as this hasn't been
spotted previously.
--
Sakari Ailus
sakari.ai...@linux.intel.com
Signed-off-by: Ping-Chung Chen
Could you add obtaining the valid link frequencies from the firmware, i.e.
use v4l2_fwnode_endpoint_alloc_parse()?
--
Kind regards,
Sakari Ailus
sakari.ai...@linux.intel.com
On Mon, Jul 30, 2018 at 09:51:25AM +0200, jacopo mondi wrote:
> Hi Sakari,
>
> On Mon, Jul 30, 2018 at 10:26:27AM +0300, Sakari Ailus wrote:
> > While this isn't a bug, initialise the variable to quash the warning.
> >
> > Reported-by: Stephen Rothwell
>
While this isn't a bug, initialise the variable to quash the warning.
Reported-by: Stephen Rothwell
Signed-off-by: Sakari Ailus
---
drivers/media/i2c/mt9v111.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
index
):
media: ov2680: dt: Add bindings for OV2680
media: ov2680: Add Omnivision OV2680 sensor driver
Sakari Ailus (1):
dw9807-vcm: Recognise this is just the VCM bit of the device
.../bindings/media/i2c/aptina,mt9v111.txt | 46 +
.../devicetree/bindings/media/i2c/ov2680.txt
Rui,
Could you provide a MAINTAINERS entry patch for the driver as well as the
DT bindings? I'll squash that to the first one.
--
Regards,
Sakari Ailus
e-mail: sakari.ai...@iki.fi
t source relied on media.h
> to include it.
>
> Signed-off-by: Hans Verkuil
Acked-by: Sakari Ailus
--
Sakari Ailus
e-mail: sakari.ai...@iki.fi
this is just the VCM bit of the device (2018-07-25
15:45:08 +0300)
Rui Miguel Silva (2):
media: ov2680: dt: Add bindings for OV2680
media: ov2680: Add Omnivision OV2680 sensor driver
Sakari Ailus (1):
dw9807-vcm
Hi Todor,
On Wed, Jul 25, 2018 at 01:01:31PM +0300, Todor Tomov wrote:
> Hi Sakari,
>
> Thank you for review.
>
> On 24.07.2018 15:49, Sakari Ailus wrote:
> > Hi Todor,
> >
> > On Mon, Jul 23, 2018 at 02:02:35PM +0300, Todor Tomov wrote:
> >> There i
Hi Yong,
On Wed, Jul 25, 2018 at 06:42:24PM +0800, Yong wrote:
> Hi Sakari,
>
> On Wed, 18 Jul 2018 12:55:14 +0300
> Sakari Ailus wrote:
>
> > Hi Yong,
> >
> > On Thu, Jul 05, 201
On Tue, Jul 24, 2018 at 11:05:47PM -0700, Matt Ranostay wrote:
> On Mon, Jul 23, 2018 at 4:35 AM, Sakari Ailus wrote:
> > Hi Matt,
> >
> > On Sun, Jul 15, 2018 at 11:05:42PM -0700, Matt Ranostay wrote:
> >> Hello et all,
> >>
> >> So curre
are
> Tested-by: Philipp Zabel
> on i.MX6 with Toshiba TC358743 connected via MIPI CSI-2.
>
> History:
>
> v6:
> - Export v4l2_async_notifier_init(), which must be called by all
> drivers before the first call to v4l2_async_notifier_add_subdev().
> Suggested by
Print debug info as standard V4L2 endpoint are parsed.
Signed-off-by: Sakari Ailus
Reviewed-by: Niklas Söderlund
---
drivers/media/v4l2-core/v4l2-fwnode.c | 108 ++
1 file changed, 85 insertions(+), 23 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2
201 - 300 of 5981 matches
Mail list logo