提交 1946117b 编写于 作者: A Alexandre Courbot 提交者: Mauro Carvalho Chehab

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: NAlexandre Courbot <acourbot@chromium.org>
Acked-by: NStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
上级 e95d7c6e
...@@ -173,8 +173,6 @@ vdec_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f) ...@@ -173,8 +173,6 @@ vdec_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f)
else else
return NULL; return NULL;
fmt = find_format(inst, pixmp->pixelformat, f->type); fmt = find_format(inst, pixmp->pixelformat, f->type);
pixmp->width = 1280;
pixmp->height = 720;
} }
pixmp->width = clamp(pixmp->width, inst->cap_width.min, pixmp->width = clamp(pixmp->width, inst->cap_width.min,
......
...@@ -297,8 +297,6 @@ venc_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f) ...@@ -297,8 +297,6 @@ venc_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f)
else else
return NULL; return NULL;
fmt = find_format(inst, pixmp->pixelformat, f->type); fmt = find_format(inst, pixmp->pixelformat, f->type);
pixmp->width = 1280;
pixmp->height = 720;
} }
pixmp->width = clamp(pixmp->width, inst->cap_width.min, pixmp->width = clamp(pixmp->width, inst->cap_width.min,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册