-
Notifications
You must be signed in to change notification settings - Fork 5k
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
media: i2c: imx477: Add vsync trigger_mode parameter #4656
media: i2c: imx477: Add vsync trigger_mode parameter #4656
Conversation
The content looks OK, although we get a couple of warnings from
As currently imx477.c is totally clean of checkpatch warnings, it would be nice to fix all of those up, even though "Signed-off By" is required as we are going to upstream this driver, so all contributions need to be appropriately tagged - see https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin. Please note "sorry, no pseudonyms or anonymous contributions". @naushir We were talking about this change being needed earlier in the week - one fewer job for you then. |
Once the warning are cleared, LGTM. |
Thanks, done. Regarding initialisation, default (ineffective) value is now -1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update.
Could you also squash your commits together. We apply them exactly as presented in the PR, so don't need your development history.
drivers/media/i2c/imx477.c
Outdated
@@ -25,6 +25,10 @@ static int dpc_enable = 1; | |||
module_param(dpc_enable, int, 0644); | |||
MODULE_PARM_DESC(dpc_enable, "Enable on-sensor DPC"); | |||
|
|||
static int trigger_mode = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was fine using a value of 0, but a static variable is automatically zeroed and so didn't need it explicitly.
static int trigger_mode;
would have been fine.
If the aim is to squash everything into one commit, especially if the commit message on the first commit doesn't require modification, then we can squash during the merge, but for more complicated combinations it's necessary for the submitter to squash before pushing. |
trigger_mode == 0 (default) => no effect / no registers written trigger_mode == 1 => source trigger_mode == 2 => sink This can be set e.g. in /boot/cmdline.txt as imx477.trigger_mode=N Signed-off-by: Jonas Jacob <[email protected]>
67cc4b0
to
ddc0780
Compare
Upstream may point out that |
Thanks for the feedback and excuse the explicit initialisation/checking (it's habitual, coming from a MISRA background). |
See: raspberrypi/linux#4406 kernel: media: i2c: imx477: Add vsync trigger_mode parameter See: raspberrypi/linux#4656 kernel: bcm2835-v4l2-codec: Remove advertised support of VP8 See: raspberrypi/linux#4661 firmware: platform: Remove licence on VP6, VP8, Theora, and FLAC See: raspberrypi/linux#4661
See: raspberrypi/linux#4406 kernel: media: i2c: imx477: Add vsync trigger_mode parameter See: raspberrypi/linux#4656 kernel: bcm2835-v4l2-codec: Remove advertised support of VP8 See: raspberrypi/linux#4661 firmware: platform: Remove licence on VP6, VP8, Theora, and FLAC See: raspberrypi/linux#4661
trigger_mode == 0 (default) => no effect / no registers written
trigger_mode == 1 => source
trigger_mode == 2 => sink
This can be set e.g. in /boot/cmdline.txt as imx477.trigger_mode=N
Setting it to 0 or not setting it at all has the same effect.
Tested on HQ cameras (XVS <-> XVS, GND <-> GND) with libcamera.
Credits to 6by9.