Hi Fabio,
On 4/6/20 6:37 AM, Fabio Estevam wrote:
Hi,
I am running kernel 5.6.2 on an imx6qp sabresd, but I cannot get the
mem2mem element from imx-media-csc-scaler.c to probe.
I don't see imx6_media_probe_complete() getting called, hence
imx_media_csc_scaler_device_init() is never called and no mem2mem
element is registered.
Any ideas as to how to get mem2mem registered on i.MX6?
If you're sabresd does not have the OV5640 module attached, then probe
won't complete.
You could make the upstream remote availability optional in the
imx6-mipi-csi2 receiver driver:
--- a/drivers/staging/media/imx/imx6-mipi-csi2.c
+++ b/drivers/staging/media/imx/imx6-mipi-csi2.c
@@ -537,10 +537,8 @@ static int csi2_parse_endpoint(struct device *dev,
struct v4l2_subdev *sd = dev_get_drvdata(dev);
struct csi2_dev *csi2 = sd_to_dev(sd);
- if (!fwnode_device_is_available(asd->match.fwnode)) {
- v4l2_err(&csi2->sd, "remote is not available\n");
- return -EINVAL;
- }
+ if (!fwnode_device_is_available(asd->match.fwnode))
+ return -ENOTCONN;
if (vep->bus_type != V4L2_MBUS_CSI2_DPHY) {
v4l2_err(&csi2->sd, "invalid bus type, must be MIPI
CSI2\n");
Another option would be to disable the mipi-csi2 receiver in the device
tree:
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -158,7 +158,7 @@
};
&mipi_csi {
- status = "okay";
+ status = "disabled";
port@0 {
reg = <0>;
The first patch doesn't make much sense though, without a remote sensor
the mipi-csi2 receiver won't function, so there's no point in taking up
resources used by the driver.
The second option will require migrating the mipi-csi2 receiver
enablement to new target .dts files, for example a new
"imx6qp-sabresd-mipi.dts". That has already been done for some boards,
for example the imx6qdl-icore has a separate target imx6q-icore-mipi,
that enables mipi-csi2.
Steve