imx477 and imx708: changing long exposure shift doesn't rewrite exposure register
@6by9 is already working on this.
Since Jun 2, 2023.
Assessment
This issue has not been assessed yet.
Description
Describe the bug
Noted when reviewing imx258, and logging so we don't forget.
https://patchwork.linuxtv.org/project/linux-media/patch/20230530173000.3060865-15-dave.stevenson@raspberrypi.com/
Start the sensor and __v4l2_ctrl_handler_setup will set all the registers for all controls.
Change V4L2_CID_VBLANK to a value that requires a different value in IMX477_LONG_EXP_SHIFT_REG
IMX477_REG_EXPOSURE will not get rewritten, therefore the exposure is incorrect.
Similarly there is no guarantee that __v4l2_ctrl_handler_setup will call s_ctrl for V4L2_CID_VBLANK (and set imx477->long_exp_shift) before s_ctrl V4L2_CID_EXPOSURE, therefore the initial register setting for exposure may be incorrect.
The shift needs to be computed before the check for pm_runtime_get_if_in_use, and the code after that conditional that applies the settings needs to rewrite IMX477_REG_EXPOSURE if IMX477_LONG_EXP_SHIFT_REG changes.
This applies for imx477 and imx708.
@naushir for info.
Steps to reproduce the behaviour
See above
Device (s)
Raspberry Pi CM4
System
6.1 kernel
Logs
No response
Additional context
No response
- Dominant language
- C
- Stars
- 13.2k
- Forks
- 5.5k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 21
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/linux
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7415 · 2 comments · 1 reaction ·
-
rp1-cfe doesn't forward V4L2_EVENT_SOURCE_CHANGE event from csi-2 sensor driver to userspace app Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
raspberrypi/linux#7399 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
raspberrypi/linux#7357 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
raspberrypi/linux#7054 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/linux#7634 · 8 comments · 1 reaction ·
All issues in raspberrypi/linux
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
zephyrproject-rtos/zephyr#119726 ·
-
[Bounty proposal] fix(web): memory insights count an evening memory on the next day ($25 proposed) Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BasedHardware/omi#15320 ·
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·