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 v8 05/12] media: dt-bindings: add bindings for i.MX7 media driver

2018-11-21 Thread Sakari Ailus
Hi Rui, On Wed, Nov 21, 2018 at 11:15:51AM +, Rui Miguel Silva wrote: > Add bindings documentation for i.MX7 media drivers. > The imx7 MIPI CSI2 and imx7 CMOS Sensor Interface. > > Signed-off-by: Rui Miguel Silva > Reviewed-by: Rob Herring > Acked-by: Sakari Ailus >

Re: [PATCH v8 03/12] media: staging/imx7: add imx7 CSI subdev driver

2018-11-21 Thread Sakari Ailus
struct v4l2_async_subdev *asd) > +{ > + return fwnode_device_is_available(asd->match.fwnode) ? 0 : -EINVAL; > +} > + > +static int imx7_csi_parse_dt(struct imx7_csi *csi) > +{ > + struct device *dev = csi->dev; > + > + csi->clk_disp_axi = devm_clk_get

Re: [PATCH v9 04/13] media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7

2018-12-03 Thread Sakari Ailus
t; + state->pads); > + if (ret < 0) > + goto unregister_subdev; > + > + memcpy(state->events, mipi_csis_events, sizeof(state->events)); > + > + pm_runtime_enable(dev); > + if (!pm_runtime_enabled(dev)) { > + ret = mipi_csis_pm_resume(dev, true); > + if (ret < 0) > + goto unregister_all; > + } > + > + dev_info(&pdev->dev, "lanes: %d, hs_settle: %d, wclk: %d, freq: %u\n", > + state->bus.num_data_lanes, state->hs_settle, > + state->wrap_clk ? 1 : 0, state->clk_frequency); > + return 0; > + > +unregister_all: > + media_entity_cleanup(&state->mipi_sd.entity); > +unregister_subdev: > + v4l2_async_unregister_subdev(&state->mipi_sd); > +disable_clock: > + mipi_csis_clk_disable(state); > + > + return ret; > +} > + > +static int mipi_csis_pm_suspend(struct device *dev, bool runtime) > +{ > + struct platform_device *pdev = to_platform_device(dev); > + struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev); > + struct csi_state *state = mipi_sd_to_csis_state(mipi_sd); > + int ret = 0; > + > + mutex_lock(&state->lock); > + if (state->flags & ST_POWERED) { > + mipi_csis_stop_stream(state); > + ret = regulator_disable(state->mipi_phy_regulator); > + if (ret) > + goto unlock; > + mipi_csis_clk_disable(state); > + state->flags &= ~ST_POWERED; > + if (!runtime) > + state->flags |= ST_SUSPENDED; > + } > + > + unlock: > + mutex_unlock(&state->lock); > + > + return ret ? -EAGAIN : 0; > +} > + > +static int mipi_csis_pm_resume(struct device *dev, bool runtime) > +{ > + struct platform_device *pdev = to_platform_device(dev); > + struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev); > + struct csi_state *state = mipi_sd_to_csis_state(mipi_sd); > + int ret = 0; > + > + mutex_lock(&state->lock); > + if (!runtime && !(state->flags & ST_SUSPENDED)) > + goto unlock; > + > + if (!(state->flags & ST_POWERED)) { > + ret = regulator_enable(state->mipi_phy_regulator); > + if (ret) > + goto unlock; > + > + state->flags |= ST_POWERED; > + mipi_csis_clk_enable(state); > + } > + if (state->flags & ST_STREAMING) > + mipi_csis_start_stream(state); > + > + state->flags &= ~ST_SUSPENDED; > + > + unlock: > + mutex_unlock(&state->lock); > + > + return ret ? -EAGAIN : 0; > +} > + > +static int mipi_csis_suspend(struct device *dev) > +{ > + return mipi_csis_pm_suspend(dev, false); > +} > + > +static int mipi_csis_resume(struct device *dev) > +{ > + return mipi_csis_pm_resume(dev, false); > +} > + > +static int mipi_csis_runtime_suspend(struct device *dev) > +{ > + return mipi_csis_pm_suspend(dev, true); > +} > + > +static int mipi_csis_runtime_resume(struct device *dev) > +{ > + return mipi_csis_pm_resume(dev, true); > +} > + > +static int mipi_csis_remove(struct platform_device *pdev) > +{ > + struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev); > + struct csi_state *state = mipi_sd_to_csis_state(mipi_sd); > + > + v4l2_async_unregister_subdev(&state->mipi_sd); > + v4l2_async_notifier_unregister(&state->subdev_notifier); > + > + pm_runtime_disable(&pdev->dev); > + mipi_csis_pm_suspend(&pdev->dev, true); > + mipi_csis_clk_disable(state); > + media_entity_cleanup(&state->mipi_sd.entity); > + pm_runtime_set_suspended(&pdev->dev); > + > + return 0; > +} > + > +static const struct dev_pm_ops mipi_csis_pm_ops = { > + SET_RUNTIME_PM_OPS(mipi_csis_runtime_suspend, mipi_csis_runtime_resume, > +NULL) > + SET_SYSTEM_SLEEP_PM_OPS(mipi_csis_suspend, mipi_csis_resume) > +}; > + > +static const struct of_device_id mipi_csis_of_match[] = { > + { .compatible = "fsl,imx7-mipi-csi2", }, > + { /* sentinel */ }, > +}; > +MODULE_DEVICE_TABLE(of, mipi_csis_of_match); > + > +static struct platform_driver mipi_csis_driver = { > + .probe = mipi_csis_probe, > + .remove = mipi_csis_remove, > + .driver = { > + .of_match_table = mipi_csis_of_match, > + .name = CSIS_DRIVER_NAME, > + .pm = &mipi_csis_pm_ops, > + }, > +}; > + > +module_platform_driver(mipi_csis_driver); > + > +MODULE_DESCRIPTION("i.MX7 MIPI CSI-2 Receiver driver"); > +MODULE_LICENSE("GPL"); > +MODULE_ALIAS("platform:imx7-mipi-csi2"); -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: media: atomisp: pci: reposition braces as per coding style

2021-04-30 Thread Sakari Ailus
odd_line_bytes; > } > > @@ -393,7 +389,8 @@ static bool buffers_needed(struct ia_css_pipe *pipe) > > int > allocate_mipi_frames(struct ia_css_pipe *pipe, > - struct ia_css_stream_info *info) { > + struct ia_css_stream_info *info)

Re: [PATCH] staging: media: atomisp: pci: reposition braces as per coding style

2021-04-30 Thread Sakari Ailus
Hi Deepak, On Fri, Apr 30, 2021 at 10:34:37PM +0530, Deepak R Varma wrote: > On Fri, Apr 30, 2021 at 07:33:27PM +0300, Sakari Ailus wrote: > > Hi Deepak, > > > > If you're touching all these lines, I might do a little more. Please see > > the comments bel

Re: [PATCH v5 00/16] Allwinner MIPI CSI-2 support for A31/V3s/A83T

2021-05-26 Thread Sakari Ailus
> > you mentioned this might need to change as well. > > > > Was there a reason why I haven't looked at this before? It's quite an old > > series, > > usually I don't wait for so long. If it was because I was really slow, then > > I > > apologize and please kick me sooner if you see a review like this take so > > long. > > I'm not sure, but Sakari definitely went over previous interations and made > various comments,so the series definitely hasn't gone unreviewed! My acks seem to be missing. Let me go through it. As for Hans: please ping if you don't get reviews. -- Kind regards, Sakari Ailus ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [RFC PATCH] Add bridge driver to connect sensors to CIO2 device via software nodes on ACPI platforms

2020-09-17 Thread Sakari Ailus
ret = connect_supported_devices(); > + > + if ((ret < 0) || (bridge.n_sensors <= 0)) { > + pr_err("cio2_bridge: Failed to connect any devices\n"); > + goto out; > + } else { > + pr_info("Found %d supported devices\n", bridge.n_sensors); > + } > + > + bridge.cio2 = pci_get_device(PCI_VENDOR_ID_INTEL, CIO2_PCI_ID, NULL); > + if (!bridge.cio2) { > + ret = -ENODEV; > + goto out; > + } > + > + fwnode = software_node_fwnode(&cio2_hid_node); > + if (!fwnode) { > + pr_err("Error getting fwnode from cio2 software_node\n"); > + ret = -ENODEV; > + goto out; > + } > + > + /* > + * We store the pci_dev's existing fwnode, beccause in the event we > + * want to reload (I.E. rmmod and insmod) this module we need to give > + * the device its original fwnode back to prevent problems down the > + * line > + */ > + > + bridge.cio2_fwnode = fwnode_handle_get(bridge.cio2->dev.fwnode); > + > + fwnode->secondary = ERR_PTR(-ENODEV); > + bridge.cio2->dev.fwnode = fwnode; > + > + return 0; > +out: > + cio2_bridge_exit(); > + return ret; > +} > + > +static int cio2_bridge_unregister_sensors(void) > +{ > + int i, j; > + struct sensor *sensor; > + > + for (i = 0; i < bridge.n_sensors; i++) { > + sensor = &bridge.sensors[i]; > + > + /* give the sensor its original fwnode back */ > + sensor->dev->fwnode = sensor->fwnode; > + fwnode_handle_put(sensor->fwnode); > + put_device(sensor->dev); > + > + for (j = 4; j >= 0; j--) > + software_node_unregister(&sensor->swnodes[j]); > + } > + > + return 0; > +} > + > +static void cio2_bridge_exit(void) > +{ > + int ret; > + > + /* Give the pci_dev its original fwnode back */ > + if (bridge.cio2) { > + bridge.cio2->dev.fwnode = bridge.cio2_fwnode; > + fwnode_handle_put(bridge.cio2_fwnode); > + pci_dev_put(bridge.cio2); > + } > + > + ret = cio2_bridge_unregister_sensors(); > + > + if (ret) > + pr_err("An error occurred unregistering the sensors\n"); > + > + software_node_unregister(&cio2_hid_node); > +} > + > +module_init(cio2_bridge_init); > +module_exit(cio2_bridge_exit); > + > +MODULE_DESCRIPTION("A bridge driver to connect sensors to CIO2 > infrastructure."); > +MODULE_LICENSE("GPL v2"); > +MODULE_ALIAS("acpi*:INT343E:*"); -- Kind regards, Sakari Ailus ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [RFC PATCH] Add bridge driver to connect sensors to CIO2 device via software nodes on ACPI platforms

2020-09-17 Thread Sakari Ailus
Hi Dan, On Thu, Sep 17, 2020 at 01:49:41PM +0300, Dan Carpenter wrote: > On Thu, Sep 17, 2020 at 01:33:43PM +0300, Sakari Ailus wrote: > > > +static int connect_supported_devices(void) > > > +{ > > > + struct acpi_device *adev; > > > + struct device *de

Re: [RFC PATCH] Add bridge driver to connect sensors to CIO2 device via software nodes on ACPI platforms

2020-09-18 Thread Sakari Ailus
Hi Andy, On Thu, Sep 17, 2020 at 03:45:14PM +0300, Andy Shevchenko wrote: > On Thu, Sep 17, 2020 at 11:52:28AM +0100, Dan Scally wrote: > > On 17/09/2020 11:33, Sakari Ailus wrote: > > > a module and not enlarge everyone's kernel, and the initialisation would > >

Re: [PATCH v3 15/56] media: fix kernel-doc markups

2020-10-23 Thread Sakari Ailus
markups should use this format: > identifier - description > > Signed-off-by: Mauro Carvalho Chehab On IPU3 and V4L2 bits: Acked-by: Sakari Ailus -- Regards, Sakari Ailus ___ devel mailing list de...@lin

Re: [PATCH 07/14] dt-bindings: media: i2c: Add A31 MIPI CSI-2 bindings documentation

2020-10-30 Thread Sakari Ailus
#address-cells = <1>; > +#size-cells = <0>; > + > +mipi_csi2_in: port@0 { > +reg = <0>; > + > +mipi_csi2_in_ov5648: endpoint { > +bus-type = <4>; /* MIPI CSI-2 D-PHY */ >

Re: [PATCH 08/14] media: sunxi: Add support for the A31 MIPI CSI-2 controller

2020-11-05 Thread Sakari Ailus
BIT(27) > +#define SUN6I_MIPI_CSI2_CH_INT_EN_ECC_ERRBIT(26) > +#define SUN6I_MIPI_CSI2_CH_INT_EN_LINE_SYNC_ERR BIT(25) > +#define SUN6I_MIPI_CSI2_CH_INT_EN_FRAME_SYNC_ERR BIT(24) > +#define SUN6I_MIPI_CSI2_CH_INT_EN_EMB_DATA BIT(18) > +#define SUN6I_MIPI_CSI2_CH_INT_EN_PF BIT(17) > +#define SUN6I_MIPI_CSI2_CH_INT_EN_PH_UPDATE BIT(16) > +#define SUN6I_MIPI_CSI2_CH_INT_EN_LINE_START_SYNCBIT(11) > +#define SUN6I_MIPI_CSI2_CH_INT_EN_LINE_END_SYNC BIT(10) > +#define SUN6I_MIPI_CSI2_CH_INT_EN_FRAME_START_SYNC BIT(9) > +#define SUN6I_MIPI_CSI2_CH_INT_EN_FRAME_END_SYNC BIT(8) > +#define SUN6I_MIPI_CSI2_CH_INT_EN_FIFO_OVER BIT(0) > + > +#define SUN6I_MIPI_CSI2_CH_INT_PD_REG0x58 > +#define SUN6I_MIPI_CSI2_CH_INT_PD_EOT_ERRBIT(29) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_CHKSUM_ERR BIT(28) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_ECC_WRNBIT(27) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_ECC_ERRBIT(26) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_LINE_SYNC_ERR BIT(25) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_FRAME_SYNC_ERR BIT(24) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_EMB_DATA BIT(18) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_PF BIT(17) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_PH_UPDATE BIT(16) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_LINE_START_SYNCBIT(11) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_LINE_END_SYNC BIT(10) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_FRAME_START_SYNC BIT(9) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_FRAME_END_SYNC BIT(8) > +#define SUN6I_MIPI_CSI2_CH_INT_PD_FIFO_OVER BIT(0) > + > +#define SUN6I_MIPI_CSI2_CH_DT_TRIGGER_REG0x60 > +#define SUN6I_MIPI_CSI2_CH_CUR_PH_REG0x70 > +#define SUN6I_MIPI_CSI2_CH_ECC_REG 0x74 > +#define SUN6I_MIPI_CSI2_CH_CKS_REG 0x78 > +#define SUN6I_MIPI_CSI2_CH_FRAME_NUM_REG 0x7c > +#define SUN6I_MIPI_CSI2_CH_LINE_NUM_REG 0x80 > + > +#define SUN6I_MIPI_CSI2_CH_REG(reg, ch) \ > + (SUN6I_MIPI_CSI2_CH_BASE + SUN6I_MIPI_CSI2_CH_OFFSET * (ch) + (reg)) > + > +enum mipi_csi2_data_type { > + MIPI_CSI2_DATA_TYPE_RAW8= 0x2a, > + MIPI_CSI2_DATA_TYPE_RAW10 = 0x2b, > + MIPI_CSI2_DATA_TYPE_RAW12 = 0x2c, > +}; > + > +struct sun6i_mipi_csi2_video { > + struct v4l2_fwnode_endpoint endpoint; > + struct v4l2_subdev subdev; > + struct media_pad pads[2]; > + > + struct v4l2_async_subdev subdev_async; > + struct v4l2_async_notifier notifier; > + > + struct v4l2_subdev *remote_subdev; > + u32 remote_pad_index; > + u32 mbus_code; > +}; > + > +struct sun6i_mipi_csi2_dev { > + struct device *dev; > + > + struct regmap *regmap; > + struct clk *clk_mod; > + struct reset_control *reset; > + struct phy *dphy; > + > + struct sun6i_mipi_csi2_video video; > +}; > + > +#define sun6i_mipi_csi2_subdev_video(subdev) \ > + container_of(subdev, struct sun6i_mipi_csi2_video, subdev) > + > +#define sun6i_mipi_csi2_video_dev(video) \ > + container_of(video, struct sun6i_mipi_csi2_dev, video) > + > +#endif /* __SUN6I_MIPI_CSI2_H__ */ -- Regards, Sakari Ailus ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 11/14] dt-bindings: media: i2c: Add A83T MIPI CSI-2 bindings documentation

2020-11-05 Thread Sakari Ailus
s = <0>; > + > +mipi_csi2_in: port@0 { > +reg = <0>; > + > +mipi_csi2_in_ov8865: endpoint { > +bus-type = <4>; /* MIPI CSI-2 D-PHY */ > +clock-lanes = <0>; > +

Re: [PATCH -next] media: staging/intel-ipu3: Fix err handle of ipu3_css_find_binary

2019-01-07 Thread Sakari Ailus
's patch with equivalent content; it was there first. Thanks! -- Sakari Ailus sakari.ai...@linux.intel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v10 01/13] media: staging/imx: refactor imx media device probe

2019-01-24 Thread Sakari Ailus
..b7f11c36461b 100644 > --- a/drivers/staging/media/imx/imx-media.h > +++ b/drivers/staging/media/imx/imx-media.h > @@ -226,6 +226,19 @@ int imx_media_add_async_subdev(struct imx_media_dev > *imxmd, > struct fwnode_handle *fwnode, > struct platform_device *pdev); > > +int imx_media_subdev_bound(struct v4l2_async_notifier *notifier, > +struct v4l2_subdev *sd, > +struct v4l2_async_subdev *asd); > +int imx_media_link_notify(struct media_link *link, u32 flags, > + unsigned int notification); > +int imx_media_probe_complete(struct v4l2_async_notifier *notifier); > + > +struct imx_media_dev *imx_media_dev_init(struct device *dev); > +int imx_media_dev_notifier_register(struct imx_media_dev *imxmd); > + > +void imx_media_dev_cleanup(struct imx_media_dev *imxmd); > +void imx_media_dev_notifier_unregister(struct imx_media_dev *imxmd); > + > /* imx-media-fim.c */ > struct imx_media_fim; > void imx_media_fim_eof_monitor(struct imx_media_fim *fim, ktime_t timestamp); > @@ -249,6 +262,8 @@ int imx_media_create_of_links(struct imx_media_dev *imxmd, > struct v4l2_subdev *sd); > int imx_media_create_csi_of_links(struct imx_media_dev *imxmd, > struct v4l2_subdev *csi); > +int imx_media_of_add_csi(struct imx_media_dev *imxmd, > + struct device_node *csi_np); > > /* imx-media-capture.c */ > struct imx_media_video_dev * -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] media: staging/intel-ipu3: Implement lock for stream on/off operations

2019-01-30 Thread Sakari Ailus
> } > > static int __maybe_unused imgu_suspend(struct device *dev) > diff --git a/drivers/staging/media/ipu3/ipu3.h > b/drivers/staging/media/ipu3/ipu3.h > index 04fc99f47ebb..f732315f0701 100644 > --- a/drivers/staging/media/ipu3/ipu3.h > +++ b/drivers/staging/med

Re: [PATCH v11 03/13] media: staging/imx7: add imx7 CSI subdev driver

2019-01-30 Thread Sakari Ailus
;clks), > + GFP_KERNEL); > + > + if (!csi->clks) > + return -ENOMEM; > + > + for (i = 0; i < csi->num_clks; i++) > + csi->clks[i].id = imx7_csi_clk_id[i]; > + > + return devm_clk_bulk_get(dev, csi->num_clks, csi->clks); > +} >

Re: [PATCH v11 00/13] media: staging/imx7: add i.MX7 media driver

2019-01-30 Thread Sakari Ailus
> The csi and mipi-csi entities pass all compliance tests. For patches 1, 4 and 10--13: Acked-by: Sakari Ailus -- Sakari Ailus sakari.ai...@linux.intel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v11 05/13] media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7

2019-01-30 Thread Sakari Ailus
events, mipi_csis_events, sizeof(state->events)); > + > + mipi_csis_debugfs_init(state); > + pm_runtime_enable(dev); > + if (!pm_runtime_enabled(dev)) { > + ret = mipi_csis_pm_resume(dev, true); > + if (ret < 0) > + goto unregister_all; > + } > + > + dev_info(&pdev->dev, "lanes: %d, hs_settle: %d, wclk: %d, freq: %u\n", > + state->bus.num_data_lanes, state->hs_settle, > + state->wrap_clk ? 1 : 0, state->clk_frequency); > + > + return 0; > + > +unregister_all: > + mipi_csis_debugfs_exit(state); > + media_entity_cleanup(&state->mipi_sd.entity); > +unregister_subdev: > + v4l2_async_unregister_subdev(&state->mipi_sd); > +disable_clock: > + mipi_csis_clk_disable(state); > + mutex_destroy(&state->lock); > + > + return ret; > +} > + > +static int mipi_csis_pm_suspend(struct device *dev, bool runtime) > +{ > + struct platform_device *pdev = to_platform_device(dev); > + struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev); > + struct csi_state *state = mipi_sd_to_csis_state(mipi_sd); > + int ret = 0; > + > + mutex_lock(&state->lock); > + if (state->flags & ST_POWERED) { > + mipi_csis_stop_stream(state); > + ret = regulator_disable(state->mipi_phy_regulator); > + if (ret) > + goto unlock; > + mipi_csis_clk_disable(state); > + state->flags &= ~ST_POWERED; > + if (!runtime) > + state->flags |= ST_SUSPENDED; > + } > + > + unlock: Extra space here. > + mutex_unlock(&state->lock); > + > + return ret ? -EAGAIN : 0; > +} > + > +static int mipi_csis_pm_resume(struct device *dev, bool runtime) > +{ > + struct platform_device *pdev = to_platform_device(dev); > + struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev); > + struct csi_state *state = mipi_sd_to_csis_state(mipi_sd); > + int ret = 0; > + > + mutex_lock(&state->lock); > + if (!runtime && !(state->flags & ST_SUSPENDED)) > + goto unlock; > + > + if (!(state->flags & ST_POWERED)) { > + ret = regulator_enable(state->mipi_phy_regulator); > + if (ret) > + goto unlock; > + > + state->flags |= ST_POWERED; > + mipi_csis_clk_enable(state); > + } > + if (state->flags & ST_STREAMING) > + mipi_csis_start_stream(state); > + > + state->flags &= ~ST_SUSPENDED; > + > + unlock: Ditto. > + mutex_unlock(&state->lock); > + > + return ret ? -EAGAIN : 0; > +} > + > +static int mipi_csis_suspend(struct device *dev) > +{ > + return mipi_csis_pm_suspend(dev, false); > +} > + > +static int mipi_csis_resume(struct device *dev) > +{ > + return mipi_csis_pm_resume(dev, false); > +} > + > +static int mipi_csis_runtime_suspend(struct device *dev) > +{ > + return mipi_csis_pm_suspend(dev, true); > +} > + > +static int mipi_csis_runtime_resume(struct device *dev) __maybe_unused for these four? > +{ > + return mipi_csis_pm_resume(dev, true); > +} > + > +static int mipi_csis_remove(struct platform_device *pdev) > +{ > + struct v4l2_subdev *mipi_sd = platform_get_drvdata(pdev); > + struct csi_state *state = mipi_sd_to_csis_state(mipi_sd); > + > + mipi_csis_debugfs_exit(state); > + v4l2_async_unregister_subdev(&state->mipi_sd); > + v4l2_async_notifier_unregister(&state->subdev_notifier); > + > + pm_runtime_disable(&pdev->dev); > + mipi_csis_pm_suspend(&pdev->dev, true); > + mipi_csis_clk_disable(state); > + media_entity_cleanup(&state->mipi_sd.entity); > + mutex_destroy(&state->lock); > + pm_runtime_set_suspended(&pdev->dev); > + > + return 0; > +} > + > +static const struct dev_pm_ops mipi_csis_pm_ops = { > + SET_RUNTIME_PM_OPS(mipi_csis_runtime_suspend, mipi_csis_runtime_resume, > +NULL) > + SET_SYSTEM_SLEEP_PM_OPS(mipi_csis_suspend, mipi_csis_resume) > +}; > + > +static const struct of_device_id mipi_csis_of_match[] = { > + { .compatible = "fsl,imx7-mipi-csi2", }, > + { /* sentinel */ }, > +}; > +MODULE_DEVICE_TABLE(of, mipi_csis_of_match); > + > +static struct platform_driver mipi_csis_driver = { > + .probe = mipi_csis_probe, > + .remove = mipi_csis_remove, > + .driver = { > + .of_match_table = mipi_csis_of_match, > + .name = CSIS_DRIVER_NAME, > + .pm = &mipi_csis_pm_ops, > + }, > +}; > + > +module_platform_driver(mipi_csis_driver); > + > +MODULE_DESCRIPTION("i.MX7 MIPI CSI-2 Receiver driver"); > +MODULE_LICENSE("GPL"); "GPL" or "GPL v2"? > +MODULE_ALIAS("platform:imx7-mipi-csi2"); -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] media: staging/intel-ipu3: Implement lock for stream on/off operations

2019-01-31 Thread Sakari Ailus
Hi Raj, On Wed, Jan 30, 2019 at 05:17:15PM +, Mani, Rajmohan wrote: > Hi Sakari, > > > -Original Message- > > From: Sakari Ailus [mailto:sakari.ai...@linux.intel.com] > > Sent: Wednesday, January 30, 2019 12:59 AM > > To: Mani, Rajmohan > > Cc

Re: [PATCH 3/3] Staging: media: ipu3: fixed max charecter style issue

2019-02-01 Thread Sakari Ailus
->queue[b->queue].bufs); > @@ -2071,7 +2078,8 @@ struct ipu3_css_buffer *ipu3_css_buf_dequeue(struct > ipu3_css *css) > return ERR_PTR(-EIO); > } > > - dev_dbg(css->dev, "buffer 0x%8x done from pipe %d\n", daddr, &

Re: [PATCH] media: staging/intel-ipu3: Implement lock for stream on/off operations

2019-02-01 Thread Sakari Ailus
Hi Raj, On Wed, Jan 30, 2019 at 05:17:15PM +, Mani, Rajmohan wrote: > Hi Sakari, > > > -Original Message- > > From: Sakari Ailus [mailto:sakari.ai...@linux.intel.com] > > Sent: Wednesday, January 30, 2019 12:59 AM > > To: Mani, Rajmohan > > Cc

Re: [PATCH][next] media: staging: intel-ipu3: fix unsigned comparison with < 0

2019-02-04 Thread Sakari Ailus
r); > > + if (ret < 0) { > > dev_err(css->dev, "failed to find suitable binary\n"); > > return -EINVAL; > > } > > + css->pipes[pipe].bindex = ret; > > > > dev_dbg(css->dev, "Binary index %d for pipe %d found.", > > css->pipes[pipe].bindex, pipe); > > > -- Sakari Ailus sakari.ai...@linux.intel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v12 00/13] media: staging/imx7: add i.MX7 media driver

2019-02-05 Thread Sakari Ailus
ce unregister before ctrl_handler_free > - GPL => GPL v2 > - Fix squash of CSI patches, issue on v11 > - add Acked-by: Sakari Ailus 10--13 > - mipi_s_stream check for ret < 0 and call pm_runtime_put_noidle > - use __maybe_unused in pm function

Re: [PATCH 1/2] media: ipu3: shut up warnings produced with W=1

2019-02-19 Thread Sakari Ailus
g, type-limits) > +ccflags-y += $(call cc-disable-warning, unused-const-variable) I'm preparing patches to address these. Could you wait a little bit more, please? Thanks. -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com ___ d

Re: [PATCH 2/2] ipu3-mmu: fix some kernel-doc macros

2019-02-19 Thread Sakari Ailus
On Tue, Feb 19, 2019 at 09:00:30AM -0500, Mauro Carvalho Chehab wrote: > Some kernel-doc markups are wrong. fix them. > > Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus -- Sakari Ailus sakari.ai...@linux.intel.com ___ deve

Re: [PATCH] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-04 Thread Sakari Ailus
resolution adjustment failed\n"); > > - return -EINVAL; > > + ret = -EINVAL; > > + goto out; > > } > > *fmts[i] = q[i].fmt.mpix; > >

Re: [PATCH] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-05 Thread Sakari Ailus
On Tue, Mar 05, 2019 at 09:40:24AM +0100, Arnd Bergmann wrote: > On Tue, Mar 5, 2019 at 8:53 AM Sakari Ailus > wrote: > > On Tue, Mar 05, 2019 at 12:25:18AM +, Cao, Bingbu wrote: > > > > > struct v4l2_pix_format_mplane *const in = > > > >

Re: [PATCH] [v2] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-05 Thread Sakari Ailus
quot;media: staging/intel-ipu3: Add css pipeline > programming") > Signed-off-by: Arnd Bergmann > --- > v2: restructure to use 'return -ENOMEM' instead of goto for failed > allocation. Thanks, Arnd! All three applied. -- Sakari Ailus sakari.ai...@linux.i

Re: [PATCH v3 11/41] media/v4l2-core/mm: convert put_page() to put_user_page*()

2019-08-07 Thread Sakari Ailus
s is part a tree-wide conversion, as described in commit fc1d8e7cca2d > ("mm: introduce put_user_page*(), placeholder versions"). > > Cc: Mauro Carvalho Chehab > Cc: Kees Cook > Cc: Hans Verkuil > Cc: Sakari Ailus > Cc: Jan Kara > Cc: Robin Murphy >

Re: [PATCH v3 1/3] ARM: dts: imx6ul: Add csi node

2019-08-14 Thread Sakari Ailus
;clks IMX6UL_CLK_CSI>; > + clock-names = "mclk"; > + status = "disabled"; > + }; > + > lcdif: lcdif@21c8000 { > compatible = "fsl,imx6ul-lcdif", > "fsl,imx28

Re: [PATCH 01/15] [media] Move mediabus format definition to a more standard place

2014-11-05 Thread Sakari Ailus
d or not. There is for enums, too, but it results in a compilation error... -- Regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverprojec

Re: [PATCH 02/15] [media] v4l: Update subdev-formats doc with new MEDIA_BUS_FMT values

2014-11-05 Thread Sakari Ailus
MEDIA_BUS_TO_V4L2_MBUS(RGB565_1X16), Shouldn't this to go to a separate patch? > > MEDIA_BUS_TO_V4L2_MBUS(Y8_1X8), > MEDIA_BUS_TO_V4L2_MBUS(UV8_1X8), -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk __

Re: [PATCH 11/15] [media] Deprecate v4l2_mbus_pixelcode

2014-11-05 Thread Sakari Ailus
+++ > include/uapi/linux/v4l2-mediabus.h | 26 -- I would keep the original file name, even if the compatibility definitions are there. I don't see any harm in having them around as well. -- Sakari Ailus

Re: [PATCH 03/15] [media] Make use of the new media_bus_format definitions

2014-11-05 Thread Sakari Ailus
On Tue, Nov 04, 2014 at 10:54:58AM +0100, Boris Brezillon wrote: > Replace references to the v4l2_mbus_pixelcode enum with the new > media_bus_format enum in all common headers. > > Signed-off-by: Boris Brezillon Acked-by: Sakari Ailus -- Sakari Ailus e-mail: sakari.ai...@iki

Re: [PATCH 11/15] [media] Deprecate v4l2_mbus_pixelcode

2014-11-05 Thread Sakari Ailus
Hi Boris, On Wed, Nov 05, 2014 at 04:15:38PM +0100, Boris Brezillon wrote: > On Wed, 5 Nov 2014 17:08:15 +0200 > Sakari Ailus wrote: > > I would keep the original file name, even if the compatibility definitions > > are there. I don't see any harm in having them around as

Re: [PATCH v2 01/10] [media] Move mediabus format definition to a more standard place

2014-11-07 Thread Sakari Ailus
b, > - V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8 = 0x300c, > - V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8 = 0x3009, > - V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8 = 0x300d, > - V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE = 0x3003, > - V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE = 0x3004, > - V4L2_

Re: [PATCH v3 01/10] [media] Move mediabus format definition to a more standard place

2014-11-07 Thread Sakari Ailus
V4L2_MBUS_FROM_MEDIA_BUS_FMT(SRGGB10_ALAW8_1X8), > + V4L2_MBUS_FROM_MEDIA_BUS_FMT(SBGGR10_DPCM8_1X8), > + V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGBRG10_DPCM8_1X8), > + V4L2_MBUS_FROM_MEDIA_BUS_FMT(SGRBG10_DPCM8_1X8), > + V4L2_MBUS_FROM_MEDIA_BUS_FMT

Re: [PATCH v4 10/10] [media] v4l: Forbid usage of V4L2_MBUS_FMT definitions inside the kernel

2014-11-07 Thread Sakari Ailus
this way, or did I miss something? I'd put this to beginning of the file, as Hans suggested. With this matter sorted out, for the set: Acked-by: Sakari Ailus -- Kind regards, Sakari Ailus sakari.ai...@iki.fi ___ devel mailing list de..

Re: [PATCH] staging: media: use help instead of ---help--- in Kconfig

2019-04-22 Thread Sakari Ailus
On Sat, Apr 20, 2019 at 11:04:07AM +, MosesChristopher wrote: > From: Moses Christopher > > - Resolve the following warning from the Kconfig, > "WARNING: prefer 'help' over '---help---' for new help texts" > > Signed-off-by: Moses Chri

Re: [PATCH] media: schedule removal for legacy staging drivers

2019-06-25 Thread Sakari Ailus
m > and do give them a rejuvenation shower in order to address the > isues pointed on their TODO lists, be our guest! > > Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus -- Sakari Ailus sakari.ai...@linux.intel.com _

Re: [PATCH v2] staging: media: sunxi: Add bool cast to value

2019-07-22 Thread Sakari Ailus
to do the same replacement that I'd done in other > staging drivers, I thought I would do something about the type mismatch > first, especially since find_format doesn't appear to be used anywhere else. > However, now I won't remove check_format and replace it with find_format as > I'd originally planned, since you've said that isn't necessary here. That > leaves the return type issue. > > > > So in the end, I think we should keep the !! and drop the (bool) cast if > > there's > > no particular warning about it. > > Should I send a version 3 that does this? bool was introduced in C99. Converting a non-zero value to boolean will yield true as a result. Please keep the code as-is; it's much easier to read that way. -- Kind regards, Sakari Ailus ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] media: staging: ipu3: Enable IOVA API only when IOMMU support is enabled

2019-07-24 Thread Sakari Ailus
epend on IOMMU_SUPPORT but that's not declared in its Kconfig entry. I wonder if adding that would be the right way to fix this. Cc'ing the IOMMU list. > select VIDEOBUF2_DMA_SG > help > This is the Video4Linux2 driver for Intel IPU3 image processing unit

Re: [PATCH] staging: atomisp: add a driver for ov5648 camera sensor

2017-09-11 Thread Sakari Ailus
Hi Devid, Please see my comments below. Andy: please look for "INT5648". On Sun, Sep 10, 2017 at 02:23:07PM +0200, Devid Antonio Floni wrote: > The ov5680 5-megapixel camera sensor from OmniVision supports up to 2592x1944 > resolution and MIPI CSI-2 interface. Output format is raw sRGB/Bayer wit

Re: [PATCH] Staging: atomisp: fix alloc_cast.cocci warnings

2017-09-11 Thread Sakari Ailus
ia_css_state_memory_offsets); > > - char *parambuf = (char *)kmalloc(paramstruct_size + > configstruct_size + statestruct_size, > + char *parambuf = kmalloc(paramstruct_size + configstruct_size + > statestruct_size, >

Re: [PATCH] Staging: media: atomisp: Merge assignment with return

2017-09-18 Thread Sakari Ailus
ubject line) at least. This case is a bit special because the other driver is also specific to the atomisp staging driver. Thanks. -- Sakari Ailus e-mail: sakari.ai...@iki.fi ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] [media] staging: atomisp: use clock framework for camera clocks

2017-09-21 Thread Sakari Ailus
applied the patch with small changes, there were other patches changing the deleted files. The tree is here: https://git.linuxtv.org/sailus/media_tree.git/log/?h=atomisp> -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi ___ d

Re: [PATCH v2 13/17] media: v4l2-async: simplify v4l2_async_subdev structure

2017-09-28 Thread Sakari Ailus
interface with that name, fwnode property API is just an API. -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [RESEND PATCH v2 13/17] media: v4l2-async: simplify v4l2_async_subdev structure

2017-09-28 Thread Sakari Ailus
interface with that name, fwnode property API is just an API. -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [RESEND PATCH v2 13/17] media: v4l2-async: simplify v4l2_async_subdev structure

2017-09-28 Thread Sakari Ailus
interface with that name, fwnode property API is just an API. -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 13/17] media: v4l2-async: simplify v4l2_async_subdev structure

2017-09-29 Thread Sakari Ailus
Hi Mauro, (Removing the non-list recipients.) On Fri, Sep 29, 2017 at 06:27:13AM -0300, Mauro Carvalho Chehab wrote: > Em Thu, 28 Sep 2017 15:09:21 +0300 > Sakari Ailus escreveu: > > > Hi Mauro, > > > > On Wed, Sep 27, 2017 at 06:46:56PM -0300, Mauro Carva

Re: [PATCH v4] staging: atomisp: add a driver for ov5648 camera sensor

2017-10-06 Thread Sakari Ailus
;m tempted to postpone applying this patch at least until the other drivers are available. Andy, Alan; any opinion? -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v4] staging: atomisp: add a driver for ov5648 camera sensor

2017-10-10 Thread Sakari Ailus
either V4L2 framework or sensor driver changes to support atomisp, which currently is a staging driver. -- Sakari Ailus sakari.ai...@linux.intel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 0/2] staginng: atomisp: memory allocation cleanups

2017-10-13 Thread Sakari Ailus
gt; -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging/atomisp: Convert timers to use timer_setup()

2017-10-17 Thread Sakari Ailus
hab > Cc: Greg Kroah-Hartman > Cc: Alan Cox > Cc: Daeseok Youn > Cc: Arnd Bergmann > Cc: linux-me...@vger.kernel.org > Cc: de...@driverdev.osuosl.org > Signed-off-by: Kees Cook This appears to be the same as the patch I've applied previously. --

Re: [PATCH] stagin: atomisp: Fix oops by unbalanced clk enable/disable call

2017-10-17 Thread Sakari Ailus
> > + > > if (on) { > > ret = clk_set_rate(gs->pmc_clk, gs->clock_src); > > Which tree [and branch] are you working off please? In the staging-next > branch of Greg's staging > tree this function does not appear as it is in this pat

Re: [PATCH v2 0/2] staging: atomisp: memory allocation cleanups

2017-10-17 Thread Sakari Ailus
est for the branch. Could you rebase your patches on this branch, please? https://git.linuxtv.org/sailus/media_tree.git/log/?h=atomisp-next> Normally it'll be "atomisp". -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi _

Re: [PATCH] staging/atomisp: Convert timers to use timer_setup()

2017-10-17 Thread Sakari Ailus
On Tue, Oct 17, 2017 at 08:16:03AM -0700, Kees Cook wrote: > On Tue, Oct 17, 2017 at 1:23 AM, Sakari Ailus wrote: > > On Mon, Oct 16, 2017 at 04:24:56PM -0700, Kees Cook wrote: > >> In preparation for unconditionally passing the struct timer_list pointer to > >> all

Re: [PATCH V3 22/29] [media] atomisp: deprecate pci_get_bus_and_slot()

2017-11-29 Thread Sakari Ailus
pplying the rest of the patch. Please use the media tree as the base in the future. Thanks. -- Sakari Ailus e-mail: sakari.ai...@iki.fi ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 3/3] media: staging: atomisp: prefer s16 to int16_t.

2017-11-29 Thread Sakari Ailus
On Mon, Nov 27, 2017 at 11:30:54AM +, Jeremy Sowden wrote: > Signed-off-by: Jeremy Sowden I'd just leave it as-is, int16_t is a standard type. The commit message would be needed, too. -- Sakari Ailus e-mail: sakari.ai...@iki.fi ___ devel

Re: [PATCH v2 0/3] Sparse fixes for the Atom ISP Staging Driver

2017-11-29 Thread Sakari Ailus
ngs. > > .../isp/kernels/eed1_8/ia_css_eed1_8.host.c| 24 > +++--- > .../isp_param/interface/ia_css_isp_param_types.h | 2 +- > 2 files changed, 13 insertions(+), 13 deletions(-) Thanks, applied! -- Sakari Ailus e-mail: sakari.ai...@iki.fi __

Re: [PATCH 2/3] media: staging: atomisp: defined as static some const arrays which don't need external linkage.

2017-11-29 Thread Sakari Ailus
ia tree. To avoid conflicts, I suggest to avoid merging them via the staging tree. Thanks. -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 2/3] media: staging: atomisp: defined as static some const arrays which don't need external linkage.

2017-11-29 Thread Sakari Ailus
On Wed, Nov 29, 2017 at 10:15:06AM +0100, Greg KH wrote: > On Wed, Nov 29, 2017 at 11:08:17AM +0200, Sakari Ailus wrote: > > Hi Greg, > > > > On Mon, Nov 27, 2017 at 01:21:25PM +0100, Greg KH wrote: > > > On Mon, Nov 27, 2017 at 11:30:53AM +, Jeremy Sowden wrote:

Re: [PATCH 1/7] media: atomisp: stop producing hundreds of kernel-doc warnings

2017-11-29 Thread Sakari Ailus
ters. It'd be good to mention how it's been generated. -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/7] media: atomisp: stop producing hundreds of kernel-doc warnings

2017-11-29 Thread Sakari Ailus
On Wed, Nov 29, 2017 at 10:28:26AM -0200, Mauro Carvalho Chehab wrote: > Em Wed, 29 Nov 2017 10:24:57 -0200 > Mauro Carvalho Chehab escreveu: > > > Em Wed, 29 Nov 2017 14:14:54 +0200 > > Sakari Ailus escreveu: > > > > > Hi Mauro, > > > > >

Re: [PATCH 3/8] media: v4l2-async: simplify v4l2_async_subdev structure

2017-12-19 Thread Sakari Ailus
lwester Nawrocki > Signed-off-by: Mauro Carvalho Chehab I'm not sure this is needed but it doesn't break anything either. Feel free to add: Acked-by: Sakari Ailus -- Sakari Ailus e-mail: sakari.ai...@iki.fi ___ devel mailing list de...@

Re: [PATCH v4 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.

2017-12-19 Thread Sakari Ailus
in an assignment expression. > > Signed-off-by: Jeremy Sowden I don't think it's useful to change the struct definition macros only to remove a large number of assigned fields in the next patch. How about merging the two patches? Please also start a new thread when re-posting a set.

Re: [PATCH v4 3/3] media: atomisp: delete empty default struct values.

2017-12-19 Thread Sakari Ailus
On Sat, Dec 02, 2017 at 10:12:01PM +, Jeremy Sowden wrote: > Removing zero-valued struct-members left a number of the default > struct-values empty. These values have now been removed. > > Signed-off-by: Jeremy Sowden This one should be squashed as well. -- Sakari Ailus e-mai

Re: [PATCH v6 07/13] media: dt-bindings: add bindings for i.MX7 media driver

2018-08-02 Thread Sakari Ailus
power-domains = <&pgc_mipi_phy>; > +phy-supply = <®_1p0d>; > +resets = <&src IMX7_RESET_MIPI_PHY_MRST>; > +reset-names = "mrst"; > +fsl,csis-hs-settle = <3>; > + > +port@0 { > +reg = <0>; > + > +mipi_from_sensor: endpoint { > +remote-endpoint = <&ov2680_to_mipi>; > +data-lanes = <1>; > +}; > +}; > + > +port@1 { > +reg = <1>; > + > +mipi_vc0_to_csi_mux: endpoint { > +remote-endpoint = <&csi_mux_from_mipi_vc0>; > +}; > +}; > +}; -- Kind regards, Sakari Ailus sakari.ai...@linux.intel.com ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v4 00/36] i.MX Media Driver

2017-02-17 Thread Sakari Ailus
ransmitter to transfer to LP-11 state? That appears to be the last step which is done in the csi2_s_stream() callback. What the sensor does next is to start streaming, and the first thing it does in that process is to switch to LP-11 state. Have you tried what happe

Re: [PATCH v4 00/36] i.MX Media Driver

2017-02-18 Thread Sakari Ailus
Hi Philipp and Russell, On Fri, Feb 17, 2017 at 04:04:30PM +0100, Philipp Zabel wrote: > On Fri, 2017-02-17 at 14:22 +0200, Sakari Ailus wrote: > > Hi Philipp, Steve and Russell, > > > > On Fri, Feb 17, 2017 at 12:43:38PM +0100, Philipp Zabel wrote: > > > On Thu, 20

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-20 Thread Sakari Ailus
ough the subdev path. Just wondering --- what do you need this for? -- Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-21 Thread Sakari Ailus
Hi Steve, On Mon, Feb 20, 2017 at 02:56:15PM -0800, Steve Longerbeam wrote: > > > On 02/20/2017 02:04 PM, Sakari Ailus wrote: > >Hi Steve, > > > >On Wed, Feb 15, 2017 at 06:19:31PM -0800, Steve Longerbeam wrote: > >>From: Russell King > >> >

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-21 Thread Sakari Ailus
Hi Russell, On Tue, Feb 21, 2017 at 12:13:32AM +, Russell King - ARM Linux wrote: > On Tue, Feb 21, 2017 at 12:04:10AM +0200, Sakari Ailus wrote: > > On Wed, Feb 15, 2017 at 06:19:31PM -0800, Steve Longerbeam wrote: > > > From: Russell King > > > > > >

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-21 Thread Sakari Ailus
Hi Russell, On Tue, Feb 21, 2017 at 01:21:32PM +, Russell King - ARM Linux wrote: > On Tue, Feb 21, 2017 at 02:37:57PM +0200, Sakari Ailus wrote: > > Hi Russell, > > > > On Tue, Feb 21, 2017 at 12:13:32AM +, Russell King - ARM Linux wrote: > > > On Tue, Fe

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-02-21 Thread Sakari Ailus
On Tue, Feb 21, 2017 at 04:03:32PM +, Russell King - ARM Linux wrote: > On Tue, Feb 21, 2017 at 05:38:34PM +0200, Sakari Ailus wrote: > > Hi Russell, > > > > On Tue, Feb 21, 2017 at 01:21:32PM +, Russell King - ARM Linux wrote: > > > On Tue, Feb 21, 2017 at

Re: [PATCH v4 13/36] [media] v4l2: add a frame timeout event

2017-03-02 Thread Sakari Ailus
struct v4l2_streamparm { > #define V4L2_EVENT_FRAME_SYNC4 > #define V4L2_EVENT_SOURCE_CHANGE 5 > #define V4L2_EVENT_MOTION_DET6 > +#define V4L2_EVENT_FRAME_TIMEOUT 7 > #define V4L2_EVENT_PRIVATE_

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-02 Thread Sakari Ailus
@@ static inline int v4l_vb2q_enable_media_source(struct > vb2_queue *q) > return 0; > } > > +static inline int __v4l2_pipeline_inherit_controls( > + struct video_device *vfd, > + struct media_entity *start_entity) > +{ > +

Re: [PATCH v4 13/36] [media] v4l2: add a frame timeout event

2017-03-03 Thread Sakari Ailus
On Thu, Mar 02, 2017 at 03:07:21PM -0800, Steve Longerbeam wrote: > > > On 03/02/2017 07:53 AM, Sakari Ailus wrote: > >Hi Steve, > > > >On Wed, Feb 15, 2017 at 06:19:15PM -0800, Steve Longerbeam wrote: > >>Add a new FRAME_TIMEOUT event to signal that a vi

Re: [PATCH 1/7] staging: media: Remove unnecessary typecast of c90 int constant

2017-03-03 Thread Sakari Ailus
Hi Simran, On Fri, Mar 03, 2017 at 01:21:56AM +0530, simran singhal wrote: > This patch removes unnecessary typecast of c90 int constant. > > WARNING: Unnecessary typecast of c90 int constant > > Signed-off-by: simran singhal Which tree are these patches based on? -- Regards

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-03 Thread Sakari Ailus
Hi Steve, On Thu, Mar 02, 2017 at 06:12:43PM -0800, Steve Longerbeam wrote: > > > On 03/02/2017 03:48 PM, Steve Longerbeam wrote: > > > > > >On 03/02/2017 08:02 AM, Sakari Ailus wrote: > >>Hi Steve, > >> > >>On Wed, Fe

Re: [PATCH v4 13/36] [media] v4l2: add a frame timeout event

2017-03-04 Thread Sakari Ailus
Hi Steve, On Fri, Mar 03, 2017 at 02:43:51PM -0800, Steve Longerbeam wrote: > > > On 03/03/2017 03:45 AM, Sakari Ailus wrote: > >On Thu, Mar 02, 2017 at 03:07:21PM -0800, Steve Longerbeam wrote: > >> > >> > >>On 03/02/2017 07:53 AM, Sakari Ailus wrote

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-04 Thread Sakari Ailus
Hi Russell, On Fri, Mar 03, 2017 at 11:06:45PM +, Russell King - ARM Linux wrote: > On Thu, Mar 02, 2017 at 06:02:57PM +0200, Sakari Ailus wrote: > > Hi Steve, > > > > On Wed, Feb 15, 2017 at 06:19:16PM -0800, Steve Longerbeam wrote: > > > v4l2_pipeline_inheri

Re: [PATCH v4 13/36] [media] v4l2: add a frame timeout event

2017-03-05 Thread Sakari Ailus
On Sat, Mar 04, 2017 at 04:37:43PM -0800, Steve Longerbeam wrote: > > > On 03/04/2017 02:56 AM, Sakari Ailus wrote: > >Hi Steve, > > > >On Fri, Mar 03, 2017 at 02:43:51PM -0800, Steve Longerbeam wrote: > >> > >> > >>On 03/03/2017 03:45 AM,

Re: [PATCH 11/29] drivers, media: convert cx88_core.refcount from atomic_t to refcount_t

2017-03-07 Thread Sakari Ailus
> situations. > > Signed-off-by: Elena Reshetova > Signed-off-by: Hans Liljestrand > Signed-off-by: Kees Cook > Signed-off-by: David Windsor Acked-by: Sakari Ailus -- Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk

Re: [PATCH 12/29] drivers, media: convert s2255_dev.num_channels from atomic_t to refcount_t

2017-03-07 Thread Sakari Ailus
dev->v4l2_dev, "V4L2 device registered as %s\n", > video_device_node_name(&vc->vdev)); > -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 13/29] drivers, media: convert vb2_vmarea_handler.refcount from atomic_t to refcount_t

2017-03-07 Thread Sakari Ailus
guess it would still compile and work as separate patches but you'd sure get warnings at least. How about merging this and the three following patches that change the memop refcount types? > void(*put)(void *arg); > void*arg; > }; -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-10 Thread Sakari Ailus
That's not true, for example, for the UVC driver. There, MC > is optional, as it should be. UVC is different. The device simply provides additional information through MC to the user but MC (or V4L2 sub-device interface) is not used for controlling the device. -- Kind regards, Sakari Ailus e-ma

Re: [PATCH v5 18/39] [media] v4l: subdev: Add function to validate frame interval

2017-03-11 Thread Sakari Ailus
interface through which it the frame rate configured, I think it is overkill to change the link validation to expect otherwise. -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk ___ devel mailing list de...@l

Re: [PATCH v5 21/39] UAPI: Add media UAPI Kbuild file

2017-03-11 Thread Sakari Ailus
't really object doing this but it should have been done in 2002 or so when the first V4L2 header was added. Now the benefit is questionable. -- Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk ___ devel m

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-11 Thread Sakari Ailus
gt; > > This way, if the subdev API is disabled, the driver will be > > > functional for V4L2-based applications that don't support neither > > > MC or subdev APIs. > > > > I'm not sure if it makes sense for the i.MX driver to behave differently > >

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-13 Thread Sakari Ailus
Hi Mauro, On Sat, Mar 11, 2017 at 08:25:49AM -0300, Mauro Carvalho Chehab wrote: > Em Sat, 11 Mar 2017 00:37:14 +0200 > Sakari Ailus escreveu: > > > Hi Mauro (and others), > > > > On Fri, Mar 10, 2017 at 12:53:42PM -0300, Mauro Carvalho Chehab wrote: > > >

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-03-13 Thread Sakari Ailus
ng to link validation either: link validation should only include static properties of the link that are required for correct hardware operation. Frame rate is not such property: hardware that supports the MC interface generally does not recognise such concept

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-03-13 Thread Sakari Ailus
Hi Russell, On Mon, Mar 13, 2017 at 01:27:02PM +, Russell King - ARM Linux wrote: > On Mon, Mar 13, 2017 at 03:16:48PM +0200, Sakari Ailus wrote: > > The vast majority of existing drivers do not implement them nor the user > > space expects having to set them. Making that

Re: [PATCH v4 29/36] media: imx: mipi-csi2: enable setting and getting of frame rates

2017-03-13 Thread Sakari Ailus
Hi Steve, On Mon, Mar 13, 2017 at 11:06:22AM -0700, Steve Longerbeam wrote: > > > On 03/13/2017 06:55 AM, Philipp Zabel wrote: > >On Mon, 2017-03-13 at 13:27 +, Russell King - ARM Linux wrote: > >>On Mon, Mar 13, 2017 at 03:16:48PM +0200, Sakari Ailus wrote: &

Re: [PATCH v5 15/39] [media] v4l2: add a frame interval error event

2017-03-16 Thread Sakari Ailus
frame intervals > is the only solution available, until FSL/NXP issues a new silicon rev. > > > > Can't the driver derive a clock from some irq and calculate for > >each frame if the timing was correct ? > > That's what is

Re: [PATCH v5 18/39] [media] v4l: subdev: Add function to validate frame interval

2017-03-16 Thread Sakari Ailus
On Sat, Mar 11, 2017 at 12:31:24PM -0800, Steve Longerbeam wrote: > > > On 03/11/2017 05:41 AM, Sakari Ailus wrote: > >Hi Steve, > > > >On Thu, Mar 09, 2017 at 08:52:58PM -0800, Steve Longerbeam wrote: > >>If the pads on both sides of a link specify a

Re: [PATCH v4 14/36] [media] v4l2-mc: add a function to inherit controls from a pipeline

2017-03-17 Thread Sakari Ailus
r the same hardware. That said, I'm not trying to provide an excuse for not having libraries available to help the user to configure and control the device more or less automatically even in terms of best effort. It's something that does require attention, a lot more of it

Re: [PATCH 02/18] media: staging: atomisp: do some coding style improvements

2018-04-04 Thread Sakari Ailus
On Mon, Mar 26, 2018 at 05:10:35PM -0400, Mauro Carvalho Chehab wrote: > Use make coccicheck in patch mode to do some coding style > improvements. Adjust the results manually. > > Signed-off-by: Mauro Carvalho Chehab Hi Mauro, For patches 2--18, please add: Acked-by: Sakari Ailus

  1   2   >