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

video: drivers misc fixes #87366

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

Conversation

ngphibang
Copy link
Contributor

Some misc fixes on video drivers, especially on the controls parts. This is to prepare to implement correctly each control type in the upcomming video control framework.

@ngphibang
Copy link
Contributor Author

@josuah : The video emul imager exposes 3 controls : VIDEO_CID_EXPOSURE, VIDEO_CID_GAIN and VIDEO_CID_TEST_PATTERN. However, it does nothing specific to each control type, just a "fake" register write (?). I know this is just for testing purpose but even if this is just an emulation, we need to emul something "real". If not, it will be very difficult to rework the video control framework as each control type needs a specific implementation. I am going to remove these controls in the driver and just keep 1 control of type "vendor-specific" as an emulated read/write. Is it ok for you to do that ?

@josuah
Copy link
Collaborator

josuah commented Mar 19, 2025

I added that commit here: db5abeb

Also available as a stand-alone commit on top of this nxp branch: tinyvision-ai-inc@e76b19d (git format-patch -1 attached) 0001-drivers-video-emul_imager-use-a-PRIV-video-CID.patch.txt

Whichever is most convenient!

Tested with: west twister -i -T tests/drivers/video/api/

josuah
josuah previously approved these changes Mar 19, 2025
@ngphibang ngphibang added the DNM This PR should not be merged (Do Not Merge) label Mar 20, 2025
The MIPI CSI-2 Rx needs to be initialized after the camera sensor which
is generally initialized with CONFIG_VIDEO_INIT_PRIORITY.

This is currently true "by chance" due to the order the linker links the
object files. This linker order is not easily controlled, so use an
explicit priority value to ensure this requirement.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Aptina was acquired by Onsemi for a long time. Fix the company name
prefix and compatible string.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
0xFarahFl and others added 9 commits March 21, 2025 11:20
Fix coding style in a variable naming.

Signed-off-by: Farah Fliss <farah.fliss@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The mt9m114 camera driver used to be single-instance.
Improve it to multi-instance.

Signed-off-by: Farah Fliss <farah.fliss@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Modify the pixel rate type to uint32_t which is sufficient to
support pixel rates range.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Change pixel rate type to uint32_t which is sufficient to support
pixel rates range.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Separate autogain and gain controls. This type of controls depend on
each other and  will be supported as "control group" in the new video
control framework.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
SDE_CTRL8_REG's value must be modified using modify_register.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Fix the sign register for brightness control

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
Fix sign's register for constrast value.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
The Emul Rx needs to be initialized after the camera sensor which
is generally initialized with CONFIG_VIDEO_INIT_PRIORITY.

This is currently true "by chance" due to the order the linker links the
object files. This linker order is not easily controlled, so use an
explicit priority value to ensure this requirement.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
@ngphibang
Copy link
Contributor Author

  • drivers: video: emul_rx: Explicitly set init priority

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree area: Shields Shields (add-on boards) area: Video Video subsystem DNM This PR should not be merged (Do Not Merge) platform: NXP Drivers NXP Semiconductors, drivers Release Notes To be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants