2
0
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:
Alexandre Courbot 2018-06-05 00:50:46 -04:00 committed by Mauro Carvalho Chehab
parent e95d7c6eb9
commit 1946117b8f
2 changed files with 0 additions and 4 deletions

View File

@ -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,

View File

@ -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,