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

drivers: video: gc2145: Include set_resolution() in the format caps check #78731

Merged

Commits on Sep 21, 2024

  1. drivers: video: gc2145: check format compatibility before applying

    While applying the format, the pixel format and drv_data->fmt were set
    immediately, and the resolution was set only if it had a matching
    entry on the "caps".
    
    This commit makes sure the requested format matches the caps before
    applying the format as well as drv_data->fmt. This does not guards
    against partial failure (i.e. only pixelformat set and not
    resolution).
    
    Signed-off-by: Josuah Demangeon <[email protected]>
    josuah committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    54a1792 View commit details
    Browse the repository at this point in the history
  2. drivers: video: gc2145: return 0 at the end of functions

    After the error code is checked to be zero, it is possible to return 0
    explicitly to help with readability. Also, when available, forward the
    return code from the failing function instead of a locally chosen error
    code like -EIO.
    
    Signed-off-by: Josuah Demangeon <[email protected]>
    josuah committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    c325ac7 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. drivers: video: gc2145: set_fmt: branch on failure rather than success

    This aims to make the code more linear by having the for loop
    validates the input format rather than search for a match.
    
    Signed-off-by: Josuah Demangeon <[email protected]>
    josuah committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    ea5086f View commit details
    Browse the repository at this point in the history