Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add imx327 and imx462 #207

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

geoffrey-vl
Copy link

In the future the linux kernel will be able to differentiate between IMX290, IMX327 and IMX462, see raspberrypi/linux#5859.

When the according device tree is configured, libcamera needs to adopt as well to support the newly reported camera type.

Tested as following:
libcamera-still -o "/home/pi/banding1.jpg" --shutter 100000 --gain 0 --awbgains 1,1 --immediate --raw -n --tuning-file /usr/share/libcamera/ipa/rpi/vc4/imx290.json

Question: I didn't bother tuning the new cameras. They probable deserve their own tuning due to having slightly different sensitivity, but I don't own the equipment to properly do so. Should we just go with the imx290 tuning file and copy that + rename to imx327/462.json? Or do we not add it to make it more clear that no good tuning is available, and that people should explicitly add their own tuning file (like I did in my example command)?

@6by9
Copy link
Collaborator

6by9 commented Nov 13, 2024

IMX290 has never been officially tuned, so a copy/rename of that tuning file is fine.

The annoyance is that these changes need to go upstream to the main libcamera repo, not just to our fork here. And they're likely to want the kernel patch upstreamed first.

Patches do require a Signed-off-by: tag to ensure licence compliance.

@naushir
Copy link
Collaborator

naushir commented Nov 13, 2024

Indeed, I was going to say our convention would be to post this to the libcamera-deve, then once merged, we will integrate this change to our (this) downstream tree.

@geoffrey-vl
Copy link
Author

Ah OK, let's stick to the convention then and try to get this one upstreamed. I'm not familiar with signing-off and stuff, but I'll look into it. Let me know if you already see some things there are not correctly so that I can already take them up.

@6by9
Copy link
Collaborator

6by9 commented Nov 13, 2024

I'm not familiar with signing-off and stuff, but I'll look into it.

Same as for the main Linux kernel https://www.kernel.org/doc/html/latest/process/submitting-patches.html#developer-s-certificate-of-origin-1-1
git commit -s is the easiest way to add the relevant line (use with --amend if you're editing an existing patch).

Let me know if you already see some things there are not correctly so that I can already take them up.

It's a bit of a learning curve I'm afraid.

Patches should be independent.
pisp isn't upstream, so commits adding the tuning files for that need to be separate from those for vc4.
Similarly changes to the core libipa need to be separate from individual IPA changes.

Patches also need complete commit subjects and messages. Look at existing commits for the relevant files to see what prefix should be use for them (eg "ipa: libipa: Add support for imx327 and imx462").

camera_sensor_properties is alphabetically sorted, and you've added imx462 between 327 and 335.

@geoffrey-vl
Copy link
Author

Patches have been submitted, see https://lists.libcamera.org/pipermail/libcamera-devel/2024-November/046539.html

It will require some work to get this upstreamed properly. Afterwards we can provide the same patches for pisp. Feel free to keep this one open, or close it so that I can open a new one afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants