Commit 1946117b authored by Alexandre Courbot's avatar Alexandre Courbot Committed by 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: 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
...@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment