mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 14:43:58 +08:00
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: Alexandre Courbot <acourbot@chromium.org> Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
e95d7c6eb9
commit
1946117b8f
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user