Hi Folks!
I am trying to get an imx577 camera working on a custom board using a CM4
According to this thread:
https://patchwork.kernel.org/project/li ... inaro.org/
The imx577 and imx477 are code compatible and the 477 driver can be used for it. I reproduced the changes on this thread (added dt string and chip ID to the driver) and created an imx577 overlay based on the 477 with the correct compatible string.
So far so good, the camera is detected on powerup:
Time to get a frame using libcamera-still:
And now it gets strange. One half of the image is perfectly fine, while the other half is bizarre. The correct data is there in the background, I can recognize the correct shapes but it's all as if it was in the wrong data format.
(please note I have rotated the original image 180°, the camera was upside down at the time. So the actual bad part of the image is the left, the correct one is the right)
I've tried to run the entire raw image thorugh a raw image reader to check parsing different formats (I420, NV21, etc....) but nothing matches.
I'm not sure where to go from there. It does seem the driver works fine. Could it be a hardware issue? How does a 2 lane CSI arranges the data? Is it one half of the picture per lane, or only successive bits (which would seem more likely).
Is there anything more I could do to test and debug this?
I have tried running a capture through gstreamer or ffmpeg with v4l2 as input sources but they both report 'Could not allocate memory' (yet I have tried increasing the Cma size to 512M to no avail).
Any help or hint would be of great help, thanks!
I am trying to get an imx577 camera working on a custom board using a CM4
According to this thread:
https://patchwork.kernel.org/project/li ... inaro.org/
The imx577 and imx477 are code compatible and the 477 driver can be used for it. I reproduced the changes on this thread (added dt string and chip ID to the driver) and created an imx577 overlay based on the 477 with the correct compatible string.
So far so good, the camera is detected on powerup:
Code:
[ 29.798393] imx477 0-001a: Device found is imx577[ 29.804246] imx477 0-001a: Runtime PM usage count underflow![ 29.810468] imx477 0-001a: Runtime PM usage count underflow![ 29.816203] imx477 0-001a: Consider updating driver imx477 to match on endpoints
And now it gets strange. One half of the image is perfectly fine, while the other half is bizarre. The correct data is there in the background, I can recognize the correct shapes but it's all as if it was in the wrong data format.
(please note I have rotated the original image 180°, the camera was upside down at the time. So the actual bad part of the image is the left, the correct one is the right)
I've tried to run the entire raw image thorugh a raw image reader to check parsing different formats (I420, NV21, etc....) but nothing matches.
I'm not sure where to go from there. It does seem the driver works fine. Could it be a hardware issue? How does a 2 lane CSI arranges the data? Is it one half of the picture per lane, or only successive bits (which would seem more likely).
Is there anything more I could do to test and debug this?
I have tried running a capture through gstreamer or ffmpeg with v4l2 as input sources but they both report 'Could not allocate memory' (yet I have tried increasing the Cma size to 512M to no avail).
Any help or hint would be of great help, thanks!
Statistics: Posted by TheDude510 — Tue Aug 06, 2024 4:50 pm — Replies 0 — Views 4