Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1946117b authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Mauro Carvalho Chehab
Browse files

media: venus: keep resolution when adjusting format



When checking a format for validity, the resolution is reset to 1280x720
whenever the pixel format is not supported. This behavior can mislead
user-space into believing that this is the only resolution supported,
and looks strange considering that if we try/set the same format with
just the pixel format changed to a valid one, the call will this time
succeed without altering the resolution.

Resolution is managed independently of the pixel format, so remove this
reset.

Signed-off-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Acked-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent e95d7c6e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -173,8 +173,6 @@ vdec_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f)
		else
			return NULL;
		fmt = find_format(inst, pixmp->pixelformat, f->type);
		pixmp->width = 1280;
		pixmp->height = 720;
	}

	pixmp->width = clamp(pixmp->width, inst->cap_width.min,
+0 −2
Original line number Diff line number Diff line
@@ -297,8 +297,6 @@ venc_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f)
		else
			return NULL;
		fmt = find_format(inst, pixmp->pixelformat, f->type);
		pixmp->width = 1280;
		pixmp->height = 720;
	}

	pixmp->width = clamp(pixmp->width, inst->cap_width.min,