mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
media: adv7180: Do not write format to device in set_fmt
[ Upstream commit 46c1e7814d1c3310ef23c01ed1a582ef0c8ab1d2 ] The .set_fmt callback should not write the new format directly do the device, it should only store it and have it applied by .s_stream. The .s_stream callback already calls adv7180_set_field_mode() so it's safe to remove programming of the device and just store the format and have .s_stream apply it. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f195ac1e35
commit
20e3fe278b
@@ -803,14 +803,7 @@ static int adv7180_set_pad_format(struct v4l2_subdev *sd,
|
||||
ret = adv7180_mbus_fmt(sd, &format->format);
|
||||
|
||||
if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE) {
|
||||
if (state->field != format->format.field) {
|
||||
guard(mutex)(&state->mutex);
|
||||
|
||||
state->field = format->format.field;
|
||||
adv7180_set_power(state, false);
|
||||
adv7180_set_field_mode(state);
|
||||
adv7180_set_power(state, true);
|
||||
}
|
||||
state->field = format->format.field;
|
||||
} else {
|
||||
framefmt = v4l2_subdev_get_try_format(sd, sd_state, 0);
|
||||
*framefmt = format->format;
|
||||
|
||||
Reference in New Issue
Block a user