diff mbox series

[v2,3/3] media: ivsc: ace: probe ace device after init IPU bridge

Message ID 1692847262-31790-3-git-send-email-wentong.wu@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/3] media: ivsc: csi: remove name identifier | expand

Commit Message

Wu, Wentong Aug. 24, 2023, 3:21 a.m. UTC
Probe ivsc ace device after IPU bridge has been initialized.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
---
v2:
 - call put_device() if IPU bridge hasn't been initialized

 drivers/media/pci/intel/ivsc/mei_ace.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Sakari Ailus Aug. 24, 2023, 6:52 a.m. UTC | #1
Hi Wentong,

Thanks for the patch.

On Thu, Aug 24, 2023 at 11:21:02AM +0800, Wentong Wu wrote:
> Probe ivsc ace device after IPU bridge has been initialized.

This doesn't really match what the patch does: it puts csi_dev device if
the device doesn't have a fwnode. Could you provide a better commit
message please?

> 
> Signed-off-by: Wentong Wu <wentong.wu@intel.com>
> ---
> v2:
>  - call put_device() if IPU bridge hasn't been initialized
> 
>  drivers/media/pci/intel/ivsc/mei_ace.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/pci/intel/ivsc/mei_ace.c b/drivers/media/pci/intel/ivsc/mei_ace.c
> index 7879f1f..627ec40 100644
> --- a/drivers/media/pci/intel/ivsc/mei_ace.c
> +++ b/drivers/media/pci/intel/ivsc/mei_ace.c
> @@ -406,6 +406,9 @@ static int mei_ace_setup_dev_link(struct mei_ace *ace)
>  	if (!csi_dev) {
>  		ret = -EPROBE_DEFER;
>  		goto err;
> +	} else if (!dev_fwnode(csi_dev)) {
> +		ret = -EPROBE_DEFER;
> +		goto err_put;
>  	}
>  
>  	/* setup link between mei_ace and mei_csi */
> -- 
> 2.7.4
>
Wu, Wentong Aug. 24, 2023, 8:06 a.m. UTC | #2
Hi Sakari, 

Thanks for you review.

> -----Original Message-----
> From: Sakari Ailus <sakari.ailus@linux.intel.com>
> Sent: Thursday, August 24, 2023 2:52 PM
> To: Wu, Wentong <wentong.wu@intel.com>
> Cc: linux-media@vger.kernel.org
> Subject: Re: [PATCH v2 3/3] media: ivsc: ace: probe ace device after init IPU
> bridge
> 
> Hi Wentong,
> 
> Thanks for the patch.
> 
> On Thu, Aug 24, 2023 at 11:21:02AM +0800, Wentong Wu wrote:
> > Probe ivsc ace device after IPU bridge has been initialized.
> 
> This doesn't really match what the patch does: it puts csi_dev device if the
> device doesn't have a fwnode. Could you provide a better commit message
> please?

How about below commit message:

    media: ivsc: ace: probe ace device after IPU bridge is initialized.
    
    When probe ivsc ace device, acpi_dev_clear_dependencies() will clear
    the consumer and supplier relationship between camera sensor device
    and ivsc device. But the IPU bridge will setup the connection swnodes
    for ivsc device and camera sensor device based on this consumer and
    supplier relationship. This patch defers ivsc ace's probe to make
    sure IPU bridge is initialized before this consumer and supplier
    relationship between camera sensor device and IVSC device is cleared.

If acceptable, I will push the v3 patch. Thanks

BR,
Wentong
> 
> >
> > Signed-off-by: Wentong Wu <wentong.wu@intel.com>
> > ---
> > v2:
> >  - call put_device() if IPU bridge hasn't been initialized
> >
> >  drivers/media/pci/intel/ivsc/mei_ace.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/media/pci/intel/ivsc/mei_ace.c
> > b/drivers/media/pci/intel/ivsc/mei_ace.c
> > index 7879f1f..627ec40 100644
> > --- a/drivers/media/pci/intel/ivsc/mei_ace.c
> > +++ b/drivers/media/pci/intel/ivsc/mei_ace.c
> > @@ -406,6 +406,9 @@ static int mei_ace_setup_dev_link(struct mei_ace
> *ace)
> >  	if (!csi_dev) {
> >  		ret = -EPROBE_DEFER;
> >  		goto err;
> > +	} else if (!dev_fwnode(csi_dev)) {
> > +		ret = -EPROBE_DEFER;
> > +		goto err_put;
> >  	}
> >
> >  	/* setup link between mei_ace and mei_csi */
> > --
> > 2.7.4
> >
> 
> --
> Sakari Ailus
diff mbox series

Patch

diff --git a/drivers/media/pci/intel/ivsc/mei_ace.c b/drivers/media/pci/intel/ivsc/mei_ace.c
index 7879f1f..627ec40 100644
--- a/drivers/media/pci/intel/ivsc/mei_ace.c
+++ b/drivers/media/pci/intel/ivsc/mei_ace.c
@@ -406,6 +406,9 @@  static int mei_ace_setup_dev_link(struct mei_ace *ace)
 	if (!csi_dev) {
 		ret = -EPROBE_DEFER;
 		goto err;
+	} else if (!dev_fwnode(csi_dev)) {
+		ret = -EPROBE_DEFER;
+		goto err_put;
 	}
 
 	/* setup link between mei_ace and mei_csi */