* [PATCH] media: venus: keep resolution when adjusting format
@ 2018-06-05 4:50 Alexandre Courbot
2018-06-15 8:11 ` Stanimir Varbanov
0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Courbot @ 2018-06-05 4:50 UTC (permalink / raw)
To: Stanimir Varbanov
Cc: linux-media, linux-arm-msm, linux-kernel, Alexandre Courbot
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>
---
drivers/media/platform/qcom/venus/vdec.c | 2 --
drivers/media/platform/qcom/venus/venc.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index 49bbd1861d3a..f89a91d43cc9 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -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,
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 6b2ce479584e..11dafc7848c5 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -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,
--
2.17.1.1185.g55be947832-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: venus: keep resolution when adjusting format
2018-06-05 4:50 [PATCH] media: venus: keep resolution when adjusting format Alexandre Courbot
@ 2018-06-15 8:11 ` Stanimir Varbanov
0 siblings, 0 replies; 2+ messages in thread
From: Stanimir Varbanov @ 2018-06-15 8:11 UTC (permalink / raw)
To: Alexandre Courbot, Stanimir Varbanov
Cc: linux-media, linux-arm-msm, linux-kernel
Hi Alex,
Thanks for the patch!
On 06/05/2018 07:50 AM, Alexandre Courbot wrote:
> 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>
> ---
> drivers/media/platform/qcom/venus/vdec.c | 2 --
> drivers/media/platform/qcom/venus/venc.c | 2 --
> 2 files changed, 4 deletions(-)
Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
--
regards,
Stan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-15 8:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-05 4:50 [PATCH] media: venus: keep resolution when adjusting format Alexandre Courbot
2018-06-15 8:11 ` Stanimir Varbanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).