Re: [PATCH 1/6] media: ivsc: csi: Don't parse remote endpoints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/26/23 4:13 PM, Sakari Ailus wrote:
> The driver parsed, besides its own endpoint on the sink, the remote
> upstream endpoint that most likely is a sensor, and took the number of
> lanes from that. Instead obtain the number of lanes from the local
> endpoint.

Yes, it's the work of ipu-bridge or device table. ;)
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
> Tested-by: Wentong Wu <wentong.wu@xxxxxxxxx>
> ---
>  drivers/media/pci/intel/ivsc/mei_csi.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/media/pci/intel/ivsc/mei_csi.c b/drivers/media/pci/intel/ivsc/mei_csi.c
> index b2b9d1669a82..b04847e30213 100644
> --- a/drivers/media/pci/intel/ivsc/mei_csi.c
> +++ b/drivers/media/pci/intel/ivsc/mei_csi.c
> @@ -662,6 +662,8 @@ static int mei_csi_parse_firmware(struct mei_csi *csi)
>  		return -EINVAL;
>  	}
>  
> +	csi->nr_of_lanes = v4l2_ep.bus.mipi_csi2.num_data_lanes;
> +
>  	fwnode = fwnode_graph_get_remote_endpoint(ep);
>  	fwnode_handle_put(ep);
>  
> @@ -675,18 +677,12 @@ static int mei_csi_parse_firmware(struct mei_csi *csi)
>  		return PTR_ERR(asd);
>  	}
>  
> -	ret = v4l2_fwnode_endpoint_alloc_parse(fwnode, &v4l2_ep);
>  	fwnode_handle_put(fwnode);
> -	if (ret)
> -		return ret;
> -	csi->nr_of_lanes = v4l2_ep.bus.mipi_csi2.num_data_lanes;
>  
>  	ret = v4l2_async_nf_register(&csi->notifier);
>  	if (ret)
>  		v4l2_async_nf_cleanup(&csi->notifier);
>  
> -	v4l2_fwnode_endpoint_free(&v4l2_ep);
> -
>  	return ret;
>  }
>  
>

Reviewed-by: Bingbu Cao <bingbu.cao@xxxxxxxxx>

-- 
Best regards,
Bingbu Cao



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux