MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.76k stars 495 forks source link

ROCKPro64 | Camera support (imx214) #3360

Open philfleck opened 4 years ago

philfleck commented 4 years ago

Creating a feature request

Camera modul support in dietpi (Pine64 provided camera modul). The say, it is working with the android version, but we could not get it to run with dietpi. However, if i am not wrong, there is already an implementation driver in the Kernel device tree.

Is your feature request related to a problem? Please describe:

The shipped Kernel in stable does not support the camera. We experience performance issues when using the Beta Version.

Describe the solution you'd like:

Merge the existing imx214 driver into the used Kernel version of Stable?

Describe alternatives you've considered:

Github Imx214 Camera Module

MichaIng commented 4 years ago

@philfleck Many thanks for your request.

To clarify:

The shipped Kernel in stable does not support the camera. We experience performance issues when using the Beta Version.

With "stable" you mean the old Stretch-based image and with "beta" the new Buster-based image, provided here?

The old image is based on legacy but official Pine64-provided Linux kernel 4.4 while the new is based on mainline Linux kernel 5.4, which hence includes additional/updated drivers on the one hand, but might be slightly less optimised for this particular board. But actually since RK3399 is very widely used, there should be no performance downsides of mainline kernel to legacy one...

Since we usually do not do kernel development of compiling, we'll not provide an updated camera driver for the legacy kernel version, especially since all future images will be based on new mainline kernel. So I suggest two options:

philfleck commented 4 years ago

@philfleck

With "stable" you mean the old Stretch-based image and with "beta" the new Buster-based image, provided here?

exactly.

Thank you for making it clear. We are going to perform further tests and let you know.

philfleck commented 4 years ago

Hi we could not make it to work. We switched to Manjaro Arm and die some kernel patching we got from the imx214 devs. We will try future versions of dietpi and let you know.

MichaIng commented 4 years ago

@philfleck I see the kernel driver with last commit is part of Linux since 5.5, while Armbian currently is at 5.4, however 5.5 is already in testing. I think hence this will be solved soon.

But btw did you try a source build of the module to replace or add the driver that is shipped with the Armbian kernel?

belveder79 commented 2 years ago

Co-working with @philfleck on this, the current status is the following (sorry for misusing this to document what we've tried and what is the current status with latest Dietpi on Bullseye):

I will follow up on this here if I have something new, because it might be of interest to others... if ANYONE has made the camera work on an RK3399 chipset with kernel 5, I would be very happy to talk about it...

MichaIng commented 2 years ago

This is awesome. When you found possibly required changes to the kernel or device tree, this should be suggested to Armbian:

Here is the kernel configuration, a quick search though the list did not result in a line about a rkisp1 module, so probably it needs to be added indeed. As module (not builtin) it should be pretty reasonable for ROCKPro64, given that it's about the camera module explicitly built for this SBC.

The development forum is also a great place to get further input.

I'm happy to implement a toggle to dietpi-config to have required kernel modules, in case device tree overlays loaded and userland utilities (v4l-utils package).

marv commented 2 years ago

@belveder79 Hey! I have the imx214 working with my RockPro64 board. The imx214 kernel driver needs more work to properly support exposure times, gain, frame rates etc., but I can capture images using libcamera just fine. Feel free to contact me (maybe on IRC? I'm marvs@Libera or marv@pine64) and let me know how to help :-)

belveder79 commented 2 years ago

@marv going to get in contact with you over IRC... I have a working DTS and it would definitely be good to have some conversation to get the camera support improved...

kbingham commented 1 year ago

If you have patches to improve the IMX214 please post them to linux-media mailinglist.

http://vger.kernel.org/vger-lists.html#linux-media

That's the path to getting the fixes directly into the linux-kernel.

MichaIng commented 1 year ago

Makes much sense to send any patches upstream directly.

belveder79 commented 1 year ago

will do so... seems that I repair broke my version :grinning: - need to get back to a working state first...