[GIT PULL for 4.21] Sensor and CSI driver patches

2018-11-20 Thread Sakari Ailus
ioctl and event interface media: ov772x: support log_status ioctl and event interface Chen, JasonX Z (1): media: imx258: remove test pattern map from driver Nathan Chancellor (1): media: imx214: Remove unnecessary self assignment in for loop Sakari Ailus (1): v4l: uAPI doc

Re: [PATCH] videodev2.h: add V4L2_BUF_CAP_SUPPORTS_PREPARE_BUF/CREATE_BUFS

2018-11-20 Thread Sakari Ailus
On Tue, Nov 20, 2018 at 10:41:42AM +0100, Hans Verkuil wrote: > On 11/20/2018 10:27 AM, Sakari Ailus wrote: > > Hi Hans, > > > > On Tue, Nov 20, 2018 at 09:58:43AM +0100, Hans Verkuil wrote: > >> Add new buffer capability flags to indicate if the VIDIOC_PREPARE_

Re: [PATCH] videodev2.h: add V4L2_BUF_CAP_SUPPORTS_PREPARE_BUF/CREATE_BUFS

2018-11-20 Thread Sakari Ailus
_SUPPORTS_DMABUF (1 << 2) > #define V4L2_BUF_CAP_SUPPORTS_REQUESTS (1 << 3) Could you align the previous lines to match the ones below? > +#define V4L2_BUF_CAP_SUPPORTS_PREPARE_BUF(1 << 4) > +#define V4L2_BUF_CAP_SUPPORTS_CREATE_BUFS(1 << 5) > > /** > * struct v4l2_plane - plane info for multi-planar buffers -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v4 4/4] media: i2c: Add RDACM20 driver

2018-11-20 Thread Sakari Ailus
> +#else > + /* Perform a software reset. */ > + ret = ov10635_write(dev, OV10635_SOFTWARE_RESET, 1); > + if (ret < 0) { > + dev_err(&dev->client->dev, "OV10635 reset failed (%d)\n", ret); &g

Re: [PATCH v2 8/9] phy: Add Cadence D-PHY support

2018-11-19 Thread Sakari Ailus
if (!dphy->ops) > + return -EINVAL; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + dphy->regs = devm_ioremap_resource(&pdev->dev, res); > + if (IS_ERR(dphy->regs)) > + return PTR_ERR(dphy->regs); > + > + dphy->psm_clk = devm_clk_get(&pdev->dev, "psm"); > + if (IS_ERR(dphy->psm_clk)) > + return PTR_ERR(dphy->psm_clk); > + > + dphy->pll_ref_clk = devm_clk_get(&pdev->dev, "pll_ref"); > + if (IS_ERR(dphy->pll_ref_clk)) > + return PTR_ERR(dphy->pll_ref_clk); > + > + if (dphy->ops->probe) { You could declare ret here. Entirely up to you. > + ret = dphy->ops->probe(dphy); > + if (ret) > + return ret; > + } > + > + dphy->phy = devm_phy_create(&pdev->dev, NULL, &cdns_dphy_ops); > + if (IS_ERR(dphy->phy)) { > + dev_err(&pdev->dev, "failed to create PHY\n"); > + return PTR_ERR(dphy->phy); Would it be appropriate to call the remove callback here? > + } > + > + phy_set_drvdata(dphy->phy, dphy); > + phy_provider = devm_of_phy_provider_register(&pdev->dev, > of_phy_simple_xlate); > + > + return PTR_ERR_OR_ZERO(phy_provider); > +} > + > +static int cdns_dphy_remove(struct platform_device *pdev) > +{ > + struct cdns_dphy *dphy = dev_get_drvdata(&pdev->dev); > + > + if (dphy->ops->remove) > + dphy->ops->remove(dphy); > + > + return 0; > +} > + > +static const struct of_device_id cdns_dphy_of_match[] = { > + { .compatible = "cdns,dphy", .data = &ref_dphy_ops }, > + { /* sentinel */ }, > +}; > +MODULE_DEVICE_TABLE(of, cdns_dphy_of_match); > + > +static struct platform_driver cdns_dphy_platform_driver = { > + .probe = cdns_dphy_probe, > + .remove = cdns_dphy_remove, > + .driver = { > + .name = "cdns-mipi-dphy", > + .of_match_table = cdns_dphy_of_match, > + }, > +}; > +module_platform_driver(cdns_dphy_platform_driver); > + > +MODULE_AUTHOR("Maxime Ripard "); bootlin.com ? > +MODULE_DESCRIPTION("Cadence MIPI D-PHY Driver"); > +MODULE_LICENSE("GPL"); -- Regards, Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCH v2 6/9] phy: Move Allwinner A31 D-PHY driver to drivers/phy/

2018-11-19 Thread Sakari Ailus
/allwinner/phy-sun6i-mipi-dphy.c | 318 +- > 6 files changed, 332 insertions(+), 328 deletions(-) > delete mode 100644 drivers/gpu/drm/sun4i/sun6i_mipi_dphy.c > create mode 100644 drivers/phy/allwinner/phy-sun6i-mipi-dphy.c Could you use git format-patch -M option on

Re: [PATCH v2 for v4.4 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-19 Thread Sakari Ailus
Hi Greg, On Mon, Nov 19, 2018 at 04:14:00PM +0100, Greg Kroah-Hartman wrote: > On Wed, Nov 14, 2018 at 11:37:46AM +0200, Sakari Ailus wrote: > > [ upstream commit 92539d3eda2c090b382699bbb896d4b54e9bdece ] > > There is no such git commit id in Linus's tree :( Right. At th

Re: [PATCH v2 3/9] phy: Add MIPI D-PHY configuration options

2018-11-19 Thread Sakari Ailus
ed char lanes; This is related to the data_lanes DT property. I assume this is intended to be the number of active lanes. And presumably the first "lanes" number of lanes would be used in that case? > +}; > + > +#endif /* __PHY_MIPI_DPHY_H_ */ > diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h > index 89cf8b685546..d7ea2dc4e2be 100644 > --- a/include/linux/phy/phy.h > +++ b/include/linux/phy/phy.h > @@ -20,6 +20,8 @@ > #include > #include > > +#include > + > struct phy; > > enum phy_mode { > @@ -47,8 +49,12 @@ enum phy_mode { > > /** > * union phy_configure_opts - Opaque generic phy configuration > + * > + * @mipi_dphy: Configuration set applicable for phys supporting > + * the MIPI_DPHY phy mode. > */ > union phy_configure_opts { > + struct phy_configure_opts_mipi_dphy mipi_dphy; > }; > > /** -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCH v2 4/9] phy: dphy: Add configuration helpers

2018-11-19 Thread Sakari Ailus
>ta_get != 5 * cfg->lpx) > + return -EINVAL; > + > + if (cfg->ta_go != 4 * cfg->lpx) > + return -EINVAL; > + > + if (cfg->ta_sure < cfg->lpx || cfg->ta_sure > 2 * cfg->lpx) > + return -EINVAL; > + > + if (cfg->wakeup < 100) > + return -EINVAL; > + > + return 0; > +} > +EXPORT_SYMBOL(phy_mipi_dphy_config_validate); > diff --git a/include/linux/phy/phy-mipi-dphy.h > b/include/linux/phy/phy-mipi-dphy.h > index 0b05932916af..5e3673778afa 100644 > --- a/include/linux/phy/phy-mipi-dphy.h > +++ b/include/linux/phy/phy-mipi-dphy.h > @@ -229,4 +229,10 @@ struct phy_configure_opts_mipi_dphy { > unsigned char lanes; > }; > > +int phy_mipi_dphy_get_default_config(unsigned long pixel_clock, > + unsigned int bpp, > + unsigned int lanes, > + struct phy_configure_opts_mipi_dphy *cfg); > +int phy_mipi_dphy_config_validate(struct phy_configure_opts_mipi_dphy *cfg); > + > #endif /* __PHY_MIPI_DPHY_H_ */ -- Regards, Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCHv2 2/4] vivid: use per-queue mutexes instead of one global mutex.

2018-11-19 Thread Sakari Ailus
rab_controls(dev, false); > - mutex_unlock(&dev->mutex); > kthread_stop(dev->kthread_vid_out); > dev->kthread_vid_out = NULL; > - mutex_lock(&dev->mutex); > } > diff --git a/drivers/media/platform/vivid/vivid-sdr-cap.c > b/drivers/media/platform/vivid/vivid-sdr-cap.c > index dcdc80e272c2..5dfb598af742 100644 > --- a/drivers/media/platform/vivid/vivid-sdr-cap.c > +++ b/drivers/media/platform/vivid/vivid-sdr-cap.c > @@ -305,10 +305,8 @@ static void sdr_cap_stop_streaming(struct vb2_queue *vq) > } > > /* shutdown control thread */ > - mutex_unlock(&dev->mutex); > kthread_stop(dev->kthread_sdr_cap); > dev->kthread_sdr_cap = NULL; > - mutex_lock(&dev->mutex); > } > > static void sdr_cap_buf_request_complete(struct vb2_buffer *vb) > -- > 2.19.1 > -- Sakari Ailus sakari.ai...@linux.intel.com

[ANN] Edinburgh Media Summit 2018 meeting report

2018-11-17 Thread Sakari Ailus
Ricardo Ribalda Sakari Ailus Sean Young Seung-Woo Kim Stefan Klug Vinod Koul CEC status - Hans Verkuil - Hans prensented an update on CEC status. Besides the slides, noteworthy information is maintained here: https://hverkuil.home.

Re: [PATCH v2 3/6] media: mt9m111: add support to select formats and fps for {Q,SXGA}

2018-11-16 Thread Sakari Ailus
Hi Hans, On Fri, Nov 16, 2018 at 02:31:01PM +0100, Hans Verkuil wrote: > On 11/16/2018 02:26 PM, Sakari Ailus wrote: > > Hi Marco, Michael, > > > > On Mon, Oct 29, 2018 at 07:24:07PM +0100, Marco Felsch wrote: > >> From: Michael Grzeschik > >> > >&g

Re: [PATCH v2 4/6] media: mt9m111: allow to setup pixclk polarity

2018-11-16 Thread Sakari Ailus
atic int mt9m111_probe(struct i2c_client *client, > /* Default HIGHPOWER context */ > mt9m111->ctx = &context_b; > > + ret = mt9m111_probe_fw(client, mt9m111); > + if (ret) > + return ret; Can you do this before v4l2_clk_get()? That'll go anyway, but for now, you'd need extra error handling for it. > + > v4l2_i2c_subdev_init(&mt9m111->subdev, client, &mt9m111_subdev_ops); > mt9m111->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; > Please also put this patch after the DT binding changes. -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCH v2 3/6] media: mt9m111: add support to select formats and fps for {Q,SXGA}

2018-11-16 Thread Sakari Ailus
l2_subdev_mbus_code_enum *code) > @@ -905,6 +1062,8 @@ static int mt9m111_g_mbus_config(struct v4l2_subdev *sd, > static const struct v4l2_subdev_video_ops mt9m111_subdev_video_ops = { > .g_mbus_config = mt9m111_g_mbus_config, > .s_stream = mt9m111_s_stream, > + .g_frame_interval = mt9m111_g_frame_interval, > + .s_frame_interval = mt9m111_s_frame_interval, > }; > > static const struct v4l2_subdev_pad_ops mt9m111_subdev_pad_ops = { > @@ -1021,6 +1180,10 @@ static int mt9m111_probe(struct i2c_client *client, > goto out_hdlfree; > #endif > > + mt9m111->current_mode = &mt9m111_mode_data[MT9M111_MODE_SXGA_15FPS]; > + mt9m111->frame_interval.numerator = 1; > + mt9m111->frame_interval.denominator = mt9m111->current_mode->max_fps; > + > /* Second stage probe - when a capture adapter is there */ > mt9m111->rect.left = MT9M111_MIN_DARK_COLS; > mt9m111->rect.top = MT9M111_MIN_DARK_ROWS; -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCH 4/4] media: ov5640: Add additional media bus formats

2018-11-16 Thread Sakari Ailus
YV8_1X16: > /* YUV422, YUYV */ > val = 0x30; > break; -- Regards, Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: media: ov8856: Add support for OV8856 sensor

2018-11-16 Thread Sakari Ailus
st the diff is fine, I'll then squash it to the patch. Thanks. -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v3] media: vb2: Allow reqbufs(0) with "in use" MMAP buffers

2018-11-15 Thread Sakari Ailus
ind missing munmap() in userspace. This patch thus has the > > potential > > of causing memory leaks in userspace. Is there a way we could assist > > application developers with this ? > > Should we just keep the debug message? (rephrased of course) > > That way you can enable debugging and see that this happens. > > It sounds reasonable to me. Makes sense IMO. -- Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCH] dt-bindings: media: i2c: Fix external clock frequency for OV5645

2018-11-14 Thread Sakari Ailus
clock-names = "xclk"; > - clock-frequency = <2388>; > + clock-frequency = <24000000>; > > vdddo-supply = <&camera_dovdd_1v8>; > vdda-supply = <&camera_avdd_2v8>; > -- > 2.17.1 > -- Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCH v12 0/2] Initial Allwinner V3s CSI Support

2018-11-14 Thread Sakari Ailus
ding > documentation for it. Applied with this diff from Maxime: http://code.bulix.org/vf7b6g-504515?raw> The MAINTAINERS entry was also moved to the first patch. Thanks! -- Sakari Ailus e-mail: sakari.ai...@iki.fi

[PATCH v2 for v4.9 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-14 Thread Sakari Ailus
nt: Prevent freeing event subscriptions while accessed") Reported-by: Dave Stevenson Signed-off-by: Sakari Ailus Tested-by: Dave Stevenson Reviewed-by: Hans Verkuil Tested-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab [Sakari Ailus: Backported to v4.9 stable] Signed-off-by: Sakari Ailus

[PATCH v2 for v4.4 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-14 Thread Sakari Ailus
nt: Prevent freeing event subscriptions while accessed") Reported-by: Dave Stevenson Signed-off-by: Sakari Ailus Tested-by: Dave Stevenson Reviewed-by: Hans Verkuil Tested-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab [Sakari Ailus: Backported to v4.4 stable] Signed-off-by: Sakari Ailus

Re: [PATCH v4.9 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-14 Thread Sakari Ailus
Hi Sasha, On Thu, Nov 08, 2018 at 12:28:53PM -0500, Sasha Levin wrote: > On Thu, Nov 08, 2018 at 01:46:06PM +0200, Sakari Ailus wrote: > > [ upstream commit 92539d3eda2c090b382699bbb896d4b54e9bdece ] > > > > Patch ad608fbcf166 changed how events were subscribed to address a

Re: [PATCH v7 00/16] Intel IPU3 ImgU patchset

2018-11-13 Thread Sakari Ailus
anks for pointing this out. I've uploaded the entire set here: https://git.linuxtv.org/sailus/media_tree.git/log/?h=ipu3-v7> including the 10th patch: https://git.linuxtv.org/sailus/media_tree.git/commit/?h=ipu3-v7&id=41e2f0d114dbc195efed079202d22748ddedbe83> It's too big to get through the list server. :-( Luckily, it's mostly tables so there's not much to review there. Default settings, effectively. -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH 4/4] SoC camera: Tidy the header

2018-11-13 Thread Sakari Ailus
Hi Hans, Mauro, On Wed, Oct 31, 2018 at 07:54:21AM -0300, Mauro Carvalho Chehab wrote: > Em Wed, 31 Oct 2018 11:00:22 +0100 > Hans Verkuil escreveu: > > > On 10/31/2018 10:40 AM, Mauro Carvalho Chehab wrote: > > > Em Wed, 31 Oct 2018 11:29:45 +0200 >

Re: [PATCH] media: vb2: Allow reqbufs(0) with "in use" MMAP buffers

2018-11-13 Thread Sakari Ailus
queue_cancel out of the mmap_lock > and added V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS] > Signed-off-by: Philipp Zabel This lets the user to allocate lots of mmap'ed buffers that are pinned in physical memory. Considering that we don't really have a proper mechanism to limit that anyw

Re: [PATCH v7 00/16] Intel IPU3 ImgU patchset

2018-11-13 Thread Sakari Ailus
On Tue, Nov 13, 2018 at 07:04:01PM +0800, Bing Bu Cao wrote: > > > On 11/13/2018 06:31 PM, Sakari Ailus wrote: > > Hi Bing Bu, > > > > On Mon, Nov 12, 2018 at 12:31:16PM +0800, Bing Bu Cao wrote: > >> > >> On 11/09/2018 06:09 PM, Sakari Ailus wrote:

Re: [PATCH 3/7] media: ov2640: add V4L2_CID_TEST_PATTERN control

2018-11-13 Thread Sakari Ailus
On Tue, Nov 13, 2018 at 10:55:46PM +0900, Akinobu Mita wrote: > 2018年11月13日(火) 19:37 Sakari Ailus : > > > > On Tue, Nov 13, 2018 at 01:00:50AM +0900, Akinobu Mita wrote: > > > The ov2640 has the test pattern generator features. This makes use of > > > it thro

Re: [PATCH 3/7] media: ov2640: add V4L2_CID_TEST_PATTERN control

2018-11-13 Thread Sakari Ailus
On Tue, Nov 13, 2018 at 01:00:50AM +0900, Akinobu Mita wrote: > The ov2640 has the test pattern generator features. This makes use of > it through V4L2_CID_TEST_PATTERN control. > > Cc: Sakari Ailus > Cc: Mauro Carvalho Chehab > Signed-off-by: Akinobu Mita > --- > dr

Re: [PATCH 1/5] dt-bindings: media: Add Allwinner A10 CSI binding

2018-11-13 Thread Sakari Ailus
ntroller. If not present, the default > +will be 1. Is this virtual channels or something else btw.? -- Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v7 00/16] Intel IPU3 ImgU patchset

2018-11-13 Thread Sakari Ailus
Hi Bing Bu, On Mon, Nov 12, 2018 at 12:31:16PM +0800, Bing Bu Cao wrote: > > > On 11/09/2018 06:09 PM, Sakari Ailus wrote: > > Hi Bing Bu, > > > > On Wed, Nov 07, 2018 at 12:16:47PM +0800, Bing Bu Cao wrote: > >> On 11/01/2018 08:03 PM, Sakari Ailus wrote: &

Re: [PATCH 1/3] i2c: adv748x: store number of CSI-2 lanes described in device tree

2018-11-13 Thread Sakari Ailus
Hi Dave, Apologies for the delay. On Fri, Sep 21, 2018 at 02:46:23PM +0100, Dave Stevenson wrote: > Hi Sakari > > On Fri, 21 Sep 2018 at 13:03, Sakari Ailus wrote: > > > > Hi Laurent, > > > > On Fri, Sep 21, 2018 at 01:01:09PM +0300, Laurent Pinchart wrote:

Re: [PATCH 3/5] media: sunxi: Add A10 CSI driver

2018-11-13 Thread Sakari Ailus
t / vsub; > + memset(pix->plane_fmt[i].reserved, 0, > +sizeof(pix->plane_fmt[i].reserved)); > + } > + > + if (fmt) > + *fmt = _fmt; > + > + return 0; > +} > + > +static int csi_try_fmt_vid_cap(struct file *file, void *priv, > +struct v4l2_format *f) > +{ > + struct sun4i_csi *csi = video_drvdata(file); > + > + if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) > + return -EINVAL; > + > + return _csi_try_fmt(csi, &f->fmt.pix_mp, NULL); > +} > + > +static int csi_s_fmt_vid_cap(struct file *file, void *priv, > + struct v4l2_format *f) > +{ > + const struct sun4i_csi_format *fmt; > + struct sun4i_csi *csi = video_drvdata(file); > + int ret; > + > + if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) > + return -EINVAL; > + > + ret = _csi_try_fmt(csi, &f->fmt.pix_mp, &fmt); > + if (ret) > + return ret; > + > + csi->v_fmt = f->fmt.pix_mp; > + csi->p_fmt = fmt; > + > + return 0; > +} > + > +static int csi_g_fmt_vid_cap(struct file *file, void *priv, > + struct v4l2_format *f) > +{ > + struct sun4i_csi *csi = video_drvdata(file); > + > + if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) > + return -EINVAL; > + > + f->fmt.pix_mp = csi->v_fmt; > + > + return 0; > +} > + > +static int csi_enum_fmt_vid_cap(struct file *file, void *priv, > + struct v4l2_fmtdesc *f) > +{ > + if (f->index >= ARRAY_SIZE(csi_formats)) > + return -EINVAL; > + > + f->pixelformat = csi_formats[f->index].fourcc; > + > + return 0; > +} > + > +static const struct v4l2_ioctl_ops csi_ioctl_ops = { > + .vidioc_querycap= csi_querycap, > + > + .vidioc_enum_fmt_vid_cap_mplane = csi_enum_fmt_vid_cap, > + .vidioc_g_fmt_vid_cap_mplane= csi_g_fmt_vid_cap, > + .vidioc_s_fmt_vid_cap_mplane= csi_s_fmt_vid_cap, > + .vidioc_try_fmt_vid_cap_mplane = csi_try_fmt_vid_cap, > + > + .vidioc_enum_input = csi_enum_input, > + .vidioc_g_input = csi_g_input, > + .vidioc_s_input = csi_s_input, > + > + .vidioc_reqbufs = vb2_ioctl_reqbufs, > + .vidioc_create_bufs = vb2_ioctl_create_bufs, > + .vidioc_querybuf= vb2_ioctl_querybuf, > + .vidioc_qbuf= vb2_ioctl_qbuf, > + .vidioc_dqbuf = vb2_ioctl_dqbuf, > + .vidioc_expbuf = vb2_ioctl_expbuf, > + .vidioc_prepare_buf = vb2_ioctl_prepare_buf, > + .vidioc_streamon= vb2_ioctl_streamon, > + .vidioc_streamoff = vb2_ioctl_streamoff, > +}; > + > +static int csi_open(struct file *file) > +{ > + struct sun4i_csi *csi = video_drvdata(file); > + int ret; > + > + pm_runtime_get_sync(csi->dev); > + > + ret = v4l2_subdev_call(csi->src_subdev, core, s_power, 1); > + if (ret < 0 && ret != -ENOIOCTLCMD) > + return ret; > + > + return v4l2_fh_open(file); Do pm_runtime_put() if v4l2_fh_open() fails. Also v4l2_subdev_call(..., s_power, 0). > +} > + > +static int csi_release(struct file *file) > +{ > + struct sun4i_csi *csi = video_drvdata(file); > + > + pm_runtime_put(csi->dev); > + > + return vb2_fop_release(file); > +} > + > +static const struct v4l2_file_operations csi_fops = { > + .owner = THIS_MODULE, > + .open = csi_open, > + .release= csi_release, > + .unlocked_ioctl = video_ioctl2, > + .read = vb2_fop_read, > + .write = vb2_fop_write, > + .poll = vb2_fop_poll, > + .mmap = vb2_fop_mmap, > +}; > + > +int csi_v4l2_register(struct sun4i_csi *csi) Ditto. > +{ > + struct video_device *vdev = &csi->vdev; > + int ret; > + > + vdev->v4l2_dev = &csi->v4l; > + vdev->queue = &csi->queue; > + strlcpy(vdev->name, KBUILD_MODNAME, sizeof(vdev->name)); > + vdev->release = video_device_release_empty; > + vdev->lock = &csi->lock; > + > + /* Set a default format */ > + csi->v_fmt.pixelformat = CSI_DEFAULT_FORMAT; > + csi->v_fmt.width = CSI_DEFAULT_WIDTH; > + csi->v_fmt.height = CSI_DEFAULT_HEIGHT; > + _csi_try_fmt(csi, &csi->v_fmt, NULL); > + > + vdev->fops = &csi_fops; > + vdev->ioctl_ops = &csi_ioctl_ops; > + video_set_drvdata(vdev, csi); > + > + ret = video_register_device(&csi->vdev, VFL_TYPE_GRABBER, -1); > + if (ret) > + return ret; > + > + dev_info(csi->dev, "Device registered as %s\n", > + video_device_node_name(vdev)); > + > + return 0; > +} > + -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH 1/5] dt-bindings: media: Add Allwinner A10 CSI binding

2018-11-13 Thread Sakari Ailus
llwinner,csi-channels = <4>; > + allwinner,has-isp; > + > + port { > + csi_from_ov5640: endpoint { > +remote-endpoint = <&ov5640_to_csi>; > +bus-width = <8>; > +data-shift = <2>; data-shift needs to be documented above if it's relevant for the device. > +hsync-active = <1>; /* Active high */ > +vsync-active = <0>; /* Active low */ > +pclk-sample = <1>; /* Rising */ > +}; > + }; > +}; -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v7 08/16] intel-ipu3: css: Add dma buff pool utility functions

2018-11-12 Thread Sakari Ailus
Hi Yong, On Fri, Nov 09, 2018 at 11:16:44PM +, Zhi, Yong wrote: > Hi, Sakari, > > > -Original Message- > > From: Sakari Ailus [mailto:sakari.ai...@linux.intel.com] > > Sent: Thursday, November 8, 2018 9:36 AM > > To: Zhi, Yong > > Cc: linux-media

Re: [PATCH v7 15/16] intel-ipu3: Add imgu top level pci device driver

2018-11-09 Thread Sakari Ailus
truct imgu_video_device { > + const char *name; > + bool output;/* Frames to the driver? */ > + bool immutable; /* Can not be enabled/disabled */ > + bool enabled; > + int queued; /* Buffers already queued */ The queued field is unused. > + struct v4l2_format vdev_fmt;/* Currently set format */ > + > + /* Private fields */ > + struct video_device vdev; > + struct media_pad vdev_pad; > + struct v4l2_mbus_framefmt pad_fmt; > + struct vb2_queue vbq; > + struct list_head buffers; > + /* Protect vb2_queue and vdev structs*/ > + struct mutex lock; > + atomic_t sequence; > +}; > + -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v7 14/16] intel-ipu3: Add v4l2 driver based on media framework

2018-11-09 Thread Sakari Ailus
gu->nodes[i].lock); > + } > +fail_subdevs: > + v4l2_device_unregister_subdev(&imgu->subdev); > +fail_subdev: > + media_entity_cleanup(&imgu->subdev.entity); > +fail_media_entity: > + kfree(imgu->subdev_pads); > +fail_subdev_pads: > + v4l2_device_unregister(&imgu->v4l2_dev); > +fail_v4l2_dev: > + media_device_cleanup(&imgu->media_dev); > + > + return r; > +} > +EXPORT_SYMBOL_GPL(ipu3_v4l2_register); > + > +int ipu3_v4l2_unregister(struct imgu_device *imgu) > +{ > + unsigned int i; > + > + media_device_unregister(&imgu->media_dev); > + media_device_cleanup(&imgu->media_dev); media_device_cleanup() should take place after unregistering the sub-devices. > + > + for (i = 0; i < IMGU_NODE_NUM; i++) { > + video_unregister_device(&imgu->nodes[i].vdev); > + media_entity_cleanup(&imgu->nodes[i].vdev.entity); > + mutex_destroy(&imgu->nodes[i].lock); > + } > + > + v4l2_device_unregister_subdev(&imgu->subdev); > + media_entity_cleanup(&imgu->subdev.entity); > + kfree(imgu->subdev_pads); > + v4l2_device_unregister(&imgu->v4l2_dev); > + > + return 0; > +} > +EXPORT_SYMBOL_GPL(ipu3_v4l2_unregister); > + > +void ipu3_v4l2_buffer_done(struct vb2_buffer *vb, > +enum vb2_buffer_state state) > +{ > + struct ipu3_vb2_buffer *b = > + container_of(vb, struct ipu3_vb2_buffer, vbb.vb2_buf); > + > + list_del(&b->list); > + vb2_buffer_done(&b->vbb.vb2_buf, state); > +} > +EXPORT_SYMBOL_GPL(ipu3_v4l2_buffer_done); -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v7 12/16] intel-ipu3: css: Initialize css hardware

2018-11-09 Thread Sakari Ailus
u3_css { > + struct device *dev; > + void __iomem *base; > + const struct firmware *fw; > + struct imgu_fw_header *fwp; > + int iomem_length; u32? The same for the length parameter in ccs_init(). -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v7 00/16] Intel IPU3 ImgU patchset

2018-11-09 Thread Sakari Ailus
om: Bing Bu Cao [mailto:bingbu@linux.intel.com] > > Sent: Tuesday, November 6, 2018 10:17 PM > > To: Sakari Ailus ; Zhi, Yong > > > > Cc: linux-media@vger.kernel.org; tf...@chromium.org; > > mche...@kernel.org; hans.verk...@cisco.com; > > laurent.pinch...@ideasonboard.com

Re: [PATCH v7 00/16] Intel IPU3 ImgU patchset

2018-11-09 Thread Sakari Ailus
Hi Bing Bu, On Wed, Nov 07, 2018 at 12:16:47PM +0800, Bing Bu Cao wrote: > > On 11/01/2018 08:03 PM, Sakari Ailus wrote: > > Hi Yong, > > > > Thanks for the update! > > > > On Mon, Oct 29, 2018 at 03:22:54PM -0700, Yong Zhi wrote: > >> Hi, > >

Re: [PATCH v7 08/16] intel-ipu3: css: Add dma buff pool utility functions

2018-11-08 Thread Sakari Ailus
o IPU3_CSS_POOL_SIZE. > + */ > +struct ipu3_css_pool { > + struct { > + struct ipu3_css_map param; > + long framenum; > + } entry[IPU3_CSS_POOL_SIZE]; > + unsigned int last; /* Latest entry */ > +}; > + > +int ipu3_css_dma_buffer_resize(struct imgu_device *imgu, > +struct ipu3_css_map *map, size_t size); > +void ipu3_css_pool_cleanup(struct imgu_device *imgu, > +struct ipu3_css_pool *pool); > +int ipu3_css_pool_init(struct imgu_device *imgu, struct ipu3_css_pool *pool, > +size_t size); > +int ipu3_css_pool_get(struct ipu3_css_pool *pool, long framenum); > +void ipu3_css_pool_put(struct ipu3_css_pool *pool); > +const struct ipu3_css_map *ipu3_css_pool_last(struct ipu3_css_pool *pool, > + unsigned int last); > + > +#endif -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

[PATCH v3.16 0/2] V4L2 event subscription fixes

2018-11-08 Thread Sakari Ailus
v.org/media_tree.git/commit/?id=92539d3eda2c090b382699bbb896d4b54e9bdece> Sakari Ailus (2): v4l: event: Prevent freeing event subscriptions while accessed v4l: event: Add subscription to list before calling "add" operation drivers/media/v4l2-core

[PATCH v3.16 1/2] v4l: event: Prevent freeing event subscriptions while accessed

2018-11-08 Thread Sakari Ailus
This change also results in making the elems field less special: subscriptions are only added to the event list once they are fully initialised. Signed-off-by: Sakari Ailus Reviewed-by: Hans Verkuil Reviewed-by: Laurent Pinchart Cc: sta...@vger.kernel.org # for 4.14 and up Fixes: c3b5b0241f62 (&qu

[PATCH v3.16 2/2] v4l: event: Add subscription to list before calling "add" operation

2018-11-08 Thread Sakari Ailus
nt: Prevent freeing event subscriptions while accessed") Reported-by: Dave Stevenson Signed-off-by: Sakari Ailus Tested-by: Dave Stevenson Reviewed-by: Hans Verkuil Tested-by: Hans Verkuil Cc: sta...@vger.kernel.org (for 4.14 and up) Signed-off-by: Mauro Carvalho Chehab --- drivers/med

[PATCH v4.4 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-08 Thread Sakari Ailus
nt: Prevent freeing event subscriptions while accessed") Reported-by: Dave Stevenson Signed-off-by: Sakari Ailus Tested-by: Dave Stevenson Reviewed-by: Hans Verkuil Tested-by: Hans Verkuil Cc: sta...@vger.kernel.org (for 4.14 and up) Signed-off-by: Mauro Carvalho Chehab --- drivers/med

[PATCH v4.9 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-08 Thread Sakari Ailus
nt: Prevent freeing event subscriptions while accessed") Reported-by: Dave Stevenson Signed-off-by: Sakari Ailus Tested-by: Dave Stevenson Reviewed-by: Hans Verkuil Tested-by: Hans Verkuil Cc: sta...@vger.kernel.org (for 4.14 and up) Signed-off-by: Mauro Carvalho Chehab --- Hi Greg, This is a

[PATCH 1/1] v4l: uAPI doc: Simplify NATIVE_SIZE selection target documentation

2018-11-07 Thread Sakari Ailus
The NATIVE_SIZE target is documented for mem2mem devices but no driver has ever apparently used it. It may be never needed; remove it for now. Suggested-by: Hans Verkuil Signed-off-by: Sakari Ailus --- Documentation/media/uapi/v4l/v4l2-selection-targets.rst | 7 +-- 1 file changed, 1

Re: [PATCH v2 1/9] phy: Add MIPI D-PHY mode

2018-11-07 Thread Sakari Ailus
On Tue, Nov 06, 2018 at 03:54:13PM +0100, Maxime Ripard wrote: > MIPI D-PHY is a MIPI standard meant mostly for display and cameras in > embedded systems. Add a mode for it. > > Reviewed-by: Laurent Pinchart > Signed-off-by: Maxime Ripard Reviewed-by: Sakari Ailus -- Saka

Re: [PATCH v4l-utils] keytable: fix compilation warning

2018-11-07 Thread Sakari Ailus
On Wed, Nov 07, 2018 at 12:02:14PM +, Sean Young wrote: > keytable.c: In function ‘parse_opt’: > keytable.c:835:7: warning: ‘param’ may be used uninitialized in this function > [-Wuninitialized] > > Signed-off-by: Sean Young Acked-by: Sakari Ailus -- Sakari Ailus e-

Re: [PATCH 1/3] media: imx: add capture compose rectangle

2018-11-07 Thread Sakari Ailus
Hi Philipp, On Tue, Nov 06, 2018 at 03:44:07PM +0100, Philipp Zabel wrote: > Hi Sakari, > > On Tue, 2018-11-06 at 16:01 +0200, Sakari Ailus wrote: > [...] > > @@ -290,6 +294,35 @@ static int capture_s_std(struct file *file, void *fh, > > v4l2_std_id std) > > &g

Re: [PATCH v7 05/12] media: dt-bindings: add bindings for i.MX7 media driver

2018-11-07 Thread Sakari Ailus
On Fri, Aug 10, 2018 at 03:20:38PM +0100, Rui Miguel Silva wrote: > Add bindings documentation for i.MX7 media drivers. > The imx7 MIPI CSI2 and imx7 CMOS Sensor Interface. > > Reviewed-by: Rob Herring > Signed-off-by: Rui Miguel Silva Acked-by: Sakari Ailus - -- Sakari

Re: [PATCH] media: imx258: remove test pattern map from driver

2018-11-07 Thread Sakari Ailus
imx258_internal_ops = { > .open = imx258_open, > }; > @@ -1250,6 +1237,7 @@ static int imx258_probe(struct i2c_client *client) > > /* Initialize subdev */ > imx258->sd.internal_ops = &imx258_internal_ops; > + imx258->sd.entity.ops = &imx258_subdev_entity_ops; Ditto. > imx258->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; > imx258->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; > -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH] [v4l-utils] libv4l2subdev: Add MEDIA_BUS_FMT_FIXED to mbus_formats[]

2018-11-07 Thread Sakari Ailus
, + { "Y8", MEDIA_BUS_FMT_Y8_1X8 }, { "Y10", MEDIA_BUS_FMT_Y10_1X10 }, { "Y12", MEDIA_BUS_FMT_Y12_1X12 }, { "YUYV", MEDIA_BUS_FMT_YUYV8_1X16 }, @@ -968,7 +968,6 @@ static struct { { "bt2020", V4L2_COLORSPACE_BT2020 }, { "raw", V4L2_COLORSPACE_RAW }, { "dcip3", V4L2_COLORSPACE_DCI_P3 }, - }; const char *v4l2_subdev_colorspace_to_string(enum v4l2_colorspace colorspace) -- Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCH] [v4l-utils] libv4l2subdev: Add MEDIA_BUS_FMT_FIXED to mbus_formats[]

2018-11-07 Thread Sakari Ailus
ruct { > { "srgb", V4L2_COLORSPACE_SRGB }, > { "oprgb", V4L2_COLORSPACE_OPRGB }, > { "bt2020", V4L2_COLORSPACE_BT2020 }, > + { "raw", V4L2_COLORSPACE_RAW }, > { "dcip3", V4L2_COLORSPACE_DCI_P3 }, > + Extra newlne.

Re: [PATCH 1/3] media: imx: add capture compose rectangle

2018-11-06 Thread Sakari Ailus
struct file *file, void *fh, > +struct v4l2_selection *s) > +{ > + struct capture_priv *priv = video_drvdata(file); > + > + switch (s->target) { > + case V4L2_SEL_TGT_CROP: > + case V4L2_SEL_TGT_CROP_DEFAULT: > + case V4L2_SEL_TGT_CR

[GIT PULL for 4.20] Sensor and ISP driver patches for 4.21

2018-11-06 Thread Sakari Ailus
Sakari Ailus (4): media: docs: Document metadata format in struct v4l2_format omap3isp: Unregister media device as first ipu3-cio2: Unregister device nodes first, then release resources ipu3-cio2: Use cio2_queues_exit .../devicetree/bindings/media/i2c/sony,imx214.txt | 53

Re: [RFC] Create test script(s?) for regression testing

2018-11-06 Thread Sakari Ailus
we can easily test > our patches with this script (I use a VM for that). > > I think maintaining the script (or perhaps scripts) in v4l-utils is best since > that keeps it in sync with the latest kernel and v4l-utils developments. Makes sense --- and that can be always changed later on if there's a need to. -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

[GIT PULL FOR 4.20] Fix first event delivery

2018-11-06 Thread Sakari Ailus
nges up to cbafeff167c91243f336e1703d7f86aa019b973e: v4l: event: Add subscription to list before calling "add" operation (2018-11-06 10:57:34 +0200) fix event subscription -------- Sakari Ailus (

Re: [PATCH v7 05/16] intel-ipu3: abi: Add structs

2018-11-06 Thread Sakari Ailus
Hi Raj, On Mon, Nov 05, 2018 at 07:05:53PM +, Mani, Rajmohan wrote: > Hi Sakari, > > > -Original Message- > > From: Sakari Ailus [mailto:sakari.ai...@linux.intel.com] > > Sent: Monday, November 05, 2018 12:28 AM > > To: Zhi, Yong > >

[PATCH v3 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-06 Thread Sakari Ailus
by: Dave Stevenson Signed-off-by: Sakari Ailus --- since v2: - More accurate commit message. No other changes. drivers/media/v4l2-core/v4l2-event.c | 43 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-event.c

[PATCH v2 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-05 Thread Sakari Ailus
afterwards) to be lost. Fix this by adding the subscription to the list before calling the "add" callback, and clean up afterwards if that fails. Fixes: ad608fbcf166 ("media: v4l: event: Prevent freeing event subscriptions while accessed") Reported-by: Dave Stevenson Signed

[PATCH 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-05 Thread Sakari Ailus
afterwards) to be lost. Fix this by adding the subscription to the list before calling the "add" callback, and clean up afterwards if that fails. Fixes: ad608fbcf166 ("media: v4l: event: Prevent freeing event subscriptions while accessed") Reported-by: Dave Stevenson Signe

Re: VIDIOC_SUBSCRIBE_EVENT for V4L2_EVENT_CTRL regression?

2018-11-05 Thread Sakari Ailus
kvfree(sev); > - goto out_unlock; > } > } > > - spin_lock_irqsave(&fh->vdev->fh_lock, flags); > - list_add(&sev->list, &fh->subscribed); > - spin_unlock_irqrestore(&fh->vdev->fh_lock, flags); > - > out_unlock: > mutex_unlock(&fh->subscribe_lock); > > Is there a need to iterate the sev->events list and free any > potentially pending events there in the ops->add error path? > We still have the subscribe_lock held, so I don't think that it > reintroduces the issue that the patch was fixing of unsubscribing > before subscribed. The events queued during that time need to be removed. Indeed the issue appears to be that the add op is called before the event is added to the list, and therefore the check whether it's subscribed fails. > > This patch has also been merged to stable, so 4.14 is affected as well. Yes, and the earlier stable kernels as well. -- Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v7 06/16] intel-ipu3: mmu: Implement driver

2018-11-05 Thread Sakari Ailus
v); How about: if (!pm_runtime_get_if_in_use(mmu->dev)) return; func(mmu); pm_runtime_put(mmu->dev); > +} -- Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v7 05/16] intel-ipu3: abi: Add structs

2018-11-05 Thread Sakari Ailus
imgu_abi_shd_transfer_luts_set_data > + transfer_data[IMGU_ABI_SHD_MAX_TRANSFERS] > __attribute__((aligned(32))); Could you replace this wth __aligned(32), please? The same for the rest of the header. -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v3 1/4] dt-bindings: media: i2c: Add bindings for Maxim Integrated MAX9286

2018-11-02 Thread Sakari Ailus
en neither your answer :) ? > > > > Thanks > > j > > > >>> > >>> Isn't port 4 included? > >> > >> Hrm ... yes well I guess these are mandatory for port 4. I'll look at > >> the wording here. > > Port 4 doe

Re: [PATCH 21/30] v4l: Add bus type to frame descriptors

2018-11-02 Thread Sakari Ailus
On Fri, Nov 02, 2018 at 01:35:02PM +, Kieran Bingham wrote: > Hi Sakari, Niklas, > > On 02/11/2018 13:15, Sakari Ailus wrote: > > Hi Kieran, > > > > On Fri, Nov 02, 2018 at 12:27:11PM +, Kieran Bingham wrote: > >> Hi Niklas, Sakari > >> >

Re: [PATCH 21/30] v4l: Add bus type to frame descriptors

2018-11-02 Thread Sakari Ailus
Hi Kieran, On Fri, Nov 02, 2018 at 12:27:11PM +, Kieran Bingham wrote: > Hi Niklas, Sakari > > On 23/08/2018 14:25, Niklas Söderlund wrote: > > From: Sakari Ailus > > > > Signed-off-by: Sakari Ailus > > --- > > include/media/v4l2-subdev.h | 9

Re: [PATCH v7 03/16] v4l: Add Intel IPU3 meta data uAPI

2018-11-02 Thread Sakari Ailus
Hi Yong, Thanks for the update! I went through this again... a few comments below but I'd say they're mostly pretty minor issues. On Mon, Oct 29, 2018 at 03:22:57PM -0700, Yong Zhi wrote: > These meta formats are used on Intel IPU3 ImgU video queues > to carry 3A statistics and ISP pipeline param

Re: [PATCH v7 00/16] Intel IPU3 ImgU patchset

2018-11-01 Thread Sakari Ailus
e 2nd in the patch set. > - Makefile: remove Copyright header. (Sakari) > - Internal fix: > optimize shot-to-shot performance. > update default white balance gains defined in ipu3-tables.c > > TODOs: > > - Documentation on ImgU driver programming inter

Re: [PATCH 4/4] SoC camera: Tidy the header

2018-10-31 Thread Sakari Ailus
On Wed, Oct 31, 2018 at 06:40:30AM -0300, Mauro Carvalho Chehab wrote: > Em Wed, 31 Oct 2018 11:29:45 +0200 > Sakari Ailus escreveu: > > > Hi Mauro, > > > > On Tue, Oct 30, 2018 at 09:06:18AM -0300, Mauro Carvalho Chehab wrote: > > > Em Tue, 30 Oct 20

Re: [PATCH 2/4] tw9910: No SoC camera dependency

2018-10-31 Thread Sakari Ailus
On Tue, Oct 30, 2018 at 01:03:18PM +0100, Hans Verkuil wrote: > On 10/30/2018 12:00 AM, Sakari Ailus wrote: > > The tw9910 driver does not depend on SoC camera framework. Don't include > > the header, but instead include media/v4l2-async.h which the driver really > > nee

Re: [PATCH 4/4] SoC camera: Tidy the header

2018-10-31 Thread Sakari Ailus
On Wed, Oct 31, 2018 at 06:40:30AM -0300, Mauro Carvalho Chehab wrote: > Em Wed, 31 Oct 2018 11:29:45 +0200 > Sakari Ailus escreveu: > > > Hi Mauro, > > > > On Tue, Oct 30, 2018 at 09:06:18AM -0300, Mauro Carvalho Chehab wrote: > > > Em Tue, 30 Oct 20

Re: [PATCH 3/4] SoC camera: Remove the framework and the drivers

2018-10-31 Thread Sakari Ailus
the rest the conversion has not taken place yet. > > > > > > > > In order to keep the tree clean and to avoid keep maintaining > > > > non-functional and obsolete code, remove the SoC camera framework as > > > > well > > >

Re: [PATCH 4/4] SoC camera: Tidy the header

2018-10-31 Thread Sakari Ailus
Hi Mauro, On Tue, Oct 30, 2018 at 09:06:18AM -0300, Mauro Carvalho Chehab wrote: > Em Tue, 30 Oct 2018 01:00:29 +0200 > Sakari Ailus escreveu: > > > Clean up the SoC camera framework header. It only exists now to keep board > > code compiling. The header can be remove

[PATCH 3/4] SoC camera: Remove the framework and the drivers

2018-10-29 Thread Sakari Ailus
code, remove the SoC camera framework as well as the drivers that depend on it. Signed-off-by: Sakari Ailus --- Resending, this time with git format-patch -D . MAINTAINERS|8 - drivers/media/i2c/Kconfig |8 - drivers/media

[PATCH 4/4] SoC camera: Tidy the header

2018-10-29 Thread Sakari Ailus
Clean up the SoC camera framework header. It only exists now to keep board code compiling. The header can be removed once the board code dependencies to it has been removed. Signed-off-by: Sakari Ailus --- include/media/soc_camera.h | 335 - 1 file

[PATCH 2/4] tw9910: No SoC camera dependency

2018-10-29 Thread Sakari Ailus
The tw9910 driver does not depend on SoC camera framework. Don't include the header, but instead include media/v4l2-async.h which the driver really needs. Signed-off-by: Sakari Ailus --- drivers/media/i2c/tw9910.c | 1 + include/media/i2c/tw9910.h | 2 -- 2 files changed, 1 insertion(

[PATCH 1/4] tw9910: Unregister async subdev at device unbind

2018-10-29 Thread Sakari Ailus
The async sub-device was added to the async list in probe but it was not removed in the driver's remove function. Fix this. Also unregister the async subdev before powering down the device. Signed-off-by: Sakari Ailus --- drivers/media/i2c/tw9910.c | 3 ++- 1 file changed, 2 insertions(

[PATCH 0/4] SoC camera removal

2018-10-29 Thread Sakari Ailus
I've compile tested them with the patchset for the affected machines. If there's a need to revive old drivers, they can always be found in the git history. There's no need to put them to the staging branch. Sakari Ailus (4): tw9910: Unregister async subdev at device unbind t

Re: [RFC] Informal meeting during ELCE to discuss userspace support for stateless codecs

2018-10-23 Thread Sakari Ailus
ton hotel. I'll be there, too! -- Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCH v7] media: add imx319 camera sensor driver

2018-10-20 Thread Sakari Ailus
Hi Tomasz, On Thu, Oct 18, 2018 at 12:24:31PM +0900, Tomasz Figa wrote: > On Tue, Oct 16, 2018 at 8:50 PM Sakari Ailus > wrote: > > > > Hi Tomasz, > > > > On Fri, Oct 12, 2018 at 05:06:56PM +0900, Tomasz Figa wrote: > > > On Fri, Oct 12, 20

Re: [RFP] Which V4L2 ioctls could be replaced by better versions?

2018-10-20 Thread Sakari Ailus
rate formats, frame > sizes and frame intervals, you end up with three nested loops with lots of > ioctl calls. This makes the code on the userspace side more complex than it > should be, and incurs an overhead. If we rework the enumeration ioctls for > other reasons, I believe we should fix this as wel. Agreed; an interface that can tell you how many entries there are, and then give those to you is more straightforward to use and more efficient. I wouldn't change how things work just the sake of doing that, though; there needs to be something else that needs to be changed and cannot be supported using the existing API as well. -- Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCH v4 1/6] media: video-i2c: avoid accessing released memory area when removing driver

2018-10-20 Thread Sakari Ailus
t; > Fixes: 5cebaac60974 ("media: video-i2c: add video-i2c driver") > Cc: Matt Ranostay > Cc: Sakari Ailus > Cc: Hans Verkuil > Cc: Mauro Carvalho Chehab > Reviewed-by: Matt Ranostay > Signed-off-by: Akinobu Mita Acked-by: Sakari Ailus -- Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCH 4/4] media: mt9m111: allow to setup pixclk polarity

2018-10-19 Thread Sakari Ailus
F)) { > + ret = mt9m111_probe_of(client, mt9m111); > + if (ret) > + return ret; > + } else { > + /* use default chip hardware values */ > + mt9m111->pclk_sample = 1; > + } > + > v4l2_i2c_subdev_init(&mt9m111->subdev, client, &mt9m111_subdev_ops); > mt9m111->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; > -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH] media: rename soc_camera I2C drivers

2018-10-19 Thread Sakari Ailus
Hi Jacopo, On Fri, Oct 19, 2018 at 03:13:28PM +0200, jacopo mondi wrote: > Hi Mauro, Hans, Sakari, > > On Fri, Oct 19, 2018 at 03:58:51PM +0300, Sakari Ailus wrote: > > Hi Hans, Mauro, > > > > On Fri, Oct 19, 2018 at 02:39:27PM +0200, Hans Verkuil wrote: > > &g

Re: [PATCH] media: rename soc_camera I2C drivers

2018-10-19 Thread Sakari Ailus
git after all. > > Just kill it rather then polluting the media tree. I remember at least Jacopo has been doing some. There was someone else as well, but I don't remember right now who it was. That said, I'm not sure if there's anything happening to the rest. Is there something that prevents removing these right away? As you said it's not functional and people can always check old versions if they want to port the driver to V4L2 sub-device framework. -- Regards, Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v3 6/6] media: video-i2c: support runtime PM

2018-10-17 Thread Sakari Ailus
On Wed, Oct 17, 2018 at 12:07:50AM +0900, Akinobu Mita wrote: > 2018年10月16日(火) 0:31 Sakari Ailus : > > > > Hi Mita-san, > > > > On Sun, Oct 14, 2018 at 03:02:39AM +0900, Akinobu Mita wrote: > > > AMG88xx has a register for setting operating mode. This adds supp

Re: [PATCH v7] media: add imx319 camera sensor driver

2018-10-16 Thread Sakari Ailus
Hi Tomasz, On Fri, Oct 12, 2018 at 05:06:56PM +0900, Tomasz Figa wrote: > On Fri, Oct 12, 2018 at 4:58 PM Sakari Ailus > wrote: > > > > Hi Tomasz, > > > > On Fri, Oct 12, 2018 at 01:51:10PM +0900, Tomasz Figa wrote: > > > Hi Sakari, > > &g

Re: [PATCH v3 1/4] dt-bindings: media: i2c: Add bindings for Maxim Integrated MAX9286

2018-10-15 Thread Sakari Ailus
mera@53 { > + compatible = "imi,rdacm20"; > + reg = <0x53 0x63>; > + port { > + rdacm20_out2: endpoint { > + remote-endpoint = > <&max9286_in2>; > + }; > + }; > + }; > + }; > + > + i2c@3 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <3>; > + > + camera@54 { > + compatible = "imi,rdacm20"; > + reg = <0x54 0x64>; > + port { > + rdacm20_out3: endpoint { > + remote-endpoint = > <&max9286_in3>; > + }; > + }; > + }; > + }; > + }; -- Regards, Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCH v3 6/6] media: video-i2c: support runtime PM

2018-10-15 Thread Sakari Ailus
specifications. > > https://docid81hrs3j1.cloudfront.net/medialibrary/2017/11/PANA-S-A0002141979-1.pdf > > Cc: Matt Ranostay > Cc: Sakari Ailus > Cc: Hans Verkuil > Cc: Mauro Carvalho Chehab > Reviewed-by: Matt Ranostay > Acked-by: Sakari Ailus > Signed-off-by: Akinob

Re: [PATCH 1/2] ipu3-cio2: Unregister device nodes first, then release resources

2018-10-15 Thread Sakari Ailus
Hi Bingbu, On Mon, Oct 15, 2018 at 03:15:05PM +0800, Bing Bu Cao wrote: > > On 10/10/2018 04:32 PM, Sakari Ailus wrote: > > While there are issues related to object lifetime management, unregister > > the media device first, followed immediately by other device nodes when >

Re: [PATCH] media: intel-ipu3: cio2: Remove redundant definitions

2018-10-13 Thread Sakari Ailus
i at integration. > > Raj and Sakari, I think this change could be bundled into the Trivial patch > > sets, > > what do you think? > > > > > Sounds good to me. > I will leave this up to Sakari. Yes, these are all in my branch for 4.21. -- Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCH 2/2] ipu3-cio2: Use cio2_queues_exit

2018-10-13 Thread Sakari Ailus
On Thu, Oct 11, 2018 at 05:16:30PM +0800, Bing Bu Cao wrote: > Tested-by: Bingbu Cao > Reviewed-by: Bingbu Cao Thanks!! -- Sakari Ailus sakari.ai...@linux.intel.com

Re: [PATCH v7] media: add imx319 camera sensor driver

2018-10-12 Thread Sakari Ailus
tput (via change v/hflip) > > - SRGGB10(default), SGRBG10, SGBRG10, SBGGR10 > > > > Cc: Tomasz Figa > > Cc: Sakari Ailus > > Signed-off-by: Bingbu Cao > > Signed-off-by: Tianshu Qiu > > > > --- > > > > This patch is based on sakari'

[PATCH 1/2] ipu3-cio2: Unregister device nodes first, then release resources

2018-10-10 Thread Sakari Ailus
While there are issues related to object lifetime management, unregister the media device first, followed immediately by other device nodes when the driver is being unbound. Only then the resources needed by the driver may be released. This is slightly safer. Signed-off-by: Sakari Ailus

[PATCH 2/2] ipu3-cio2: Use cio2_queues_exit

2018-10-10 Thread Sakari Ailus
The ipu3-cio2 driver has a function to tear down video devices as well as the associated video buffer queues. Use it. Signed-off-by: Sakari Ailus --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/pci/intel/ipu3/ipu3

[PATCH 0/2] Trivial CIO2 patches

2018-10-10 Thread Sakari Ailus
Hi, Here are two simple cio2 patches. Slightly safer module removal plus a cleanup. Sakari Ailus (2): ipu3-cio2: Unregister device nodes first, then release resources ipu3-cio2: Use cio2_queues_exit drivers/media/pci/intel/ipu3/ipu3-cio2.c | 6 ++ 1 file changed, 2 insertions(+), 4

[PATCH 1/1] omap3isp: Unregister media device as first

2018-10-09 Thread Sakari Ailus
While there are issues related to object lifetime management, unregister the media device first when the driver is being unbound. This is slightly safer. Signed-off-by: Sakari Ailus --- drivers/media/platform/omap3isp/isp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH 1/1] media: docs: Document metadata format in struct v4l2_format

2018-10-09 Thread Sakari Ailus
On Tue, Oct 09, 2018 at 01:32:57PM +0200, Hans Verkuil wrote: > On 10/09/18 13:31, Sakari Ailus wrote: > > The format fields in struct v4l2_format were otherwise reported but the > > meta field was missing. Document it. > > > > Reported-by: Hans Verkuil >

[PATCH 1/1] media: docs: Document metadata format in struct v4l2_format

2018-10-09 Thread Sakari Ailus
The format fields in struct v4l2_format were otherwise reported but the meta field was missing. Document it. Reported-by: Hans Verkuil Signed-off-by: Sakari Ailus --- Documentation/media/uapi/v4l/dev-meta.rst | 2 +- Documentation/media/uapi/v4l/vidioc-g-fmt.rst | 5 + 2 files changed

<    2   3   4   5   6   7   8   9   10   11   >