-
Notifications
You must be signed in to change notification settings - Fork 8.2k
GC2145: fixes (fix of B/R (U/V) color swap) / cleanups, cci API usage and allow driver multi-instance #91991
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
GC2145: fixes (fix of B/R (U/V) color swap) / cleanups, cci API usage and allow driver multi-instance #91991
Conversation
| {0x15, 0x37}, | ||
| {0x16, 0x45}, | ||
| {GC2145_REG_OUTPUT_FMT, 0x53}, | ||
| {0x84, 0x53}, |
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 seems like #define GC2145_REG_OUTPUT_FMT 0x84 above would lead to the same value. Any reason to change it?
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.
REG_OUTPUT_FMT register is within the PAGE0. Here at that moment, we are accessing to another page hence, we souldn't call this REG_OUTPUT_FMT since this is another register with another purpose.
(I couldn't confirm which one since it is undocumented register based on the spec I have)
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.
Ah yes that is right good point, I did not spot it... I understand the commit message now. Thank you!
|
I tested that on a CSI based sensor so I'd be interested in having some tests done on a parallel interface based GC2145. |
Help identify register page change by using GC2145_REG_RESET macro. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Avoid some register page change when the right page is already being accessible. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Correct wrong macro GC2145_REG_OUTPUT_FMT / GC2145_REG_SYNC_MODE being used while a different page is being accessed. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
This bit would be used in order to generate several variants of Bayer formats, however it shouldn't be enabled for YUV/RGB formats by default. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Use video cci helper functions to access to the sensor. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Set the default format at the moment of variable declaration in gc2145_init function. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Allow the driver to be instanciated multiple times. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
ed72fa4 to
47020db
Compare
|
|
However, I had to apply this fix to DCMI: #92018 |
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.
LGTM !




This PR address the issue #89567 and cleanup few points related to registers access.
Few more commits added to perform some cleanups. Moreover moved to the CCI API functions to avoid having to limit gc2145 specific functions and allow having the driver instanciated multiple times.