set_fmt was not properly triggering a mode change when
a new mode was set that happened to have the same format
as the previous mode (for example, when only changing the
frame dimensions). Fix this.
Signed-off-by: Sam Bobrowicz <sam@elite-embedded.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
goto out;
}
- if (new_mode != sensor->current_mode) {
+ if (new_mode != sensor->current_mode ||
+ mbus_fmt->code != sensor->fmt.code) {
+ sensor->fmt = *mbus_fmt;
sensor->current_mode = new_mode;
sensor->pending_mode_change = true;
- }
- if (mbus_fmt->code != sensor->fmt.code) {
- sensor->fmt = *mbus_fmt;
sensor->pending_fmt_change = true;
}
out: