From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: Tomasz Figa <tfiga@chromium.org>,
Dikshita Agarwal <dikshita@codeaurora.org>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>,
Vikash Garodia <vgarodia@codeaurora.org>
Subject: Re: [PATCH 2/2] venus: venc: fix handlig of S_SELECTION and G_SELECTION
Date: Thu, 1 Oct 2020 04:32:41 +0300 [thread overview]
Message-ID: <b977eb27-9646-1c73-5acb-c3a74460e426@linaro.org> (raw)
In-Reply-To: <CAAFQd5CTyjagd7grrCkret2WnvoLHQk83fg+1QPK+V1NbhKTvw@mail.gmail.com>
Hi Tomasz,
On 9/25/20 11:55 PM, Tomasz Figa wrote:
> Hi Dikshita, Stanimir,
>
> On Thu, Sep 24, 2020 at 7:31 PM Dikshita Agarwal
> <dikshita@codeaurora.org> wrote:
>>
>> From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
>>
>> - return correct width and height for G_SELECTION
>> - if requested rectangle wxh doesn't match with capture port wxh
>> adjust the rectangle to supported wxh.
>>
>> Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
>> ---
>> drivers/media/platform/qcom/venus/venc.c | 20 ++++++++++++--------
>> 1 file changed, 12 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
>> index 7d2aaa8..a2cc12d 100644
>> --- a/drivers/media/platform/qcom/venus/venc.c
>> +++ b/drivers/media/platform/qcom/venus/venc.c
>> @@ -463,13 +463,13 @@ static int venc_g_fmt(struct file *file, void *fh, struct v4l2_format *f)
>> switch (s->target) {
>> case V4L2_SEL_TGT_CROP_DEFAULT:
>> case V4L2_SEL_TGT_CROP_BOUNDS:
>> - s->r.width = inst->width;
>> - s->r.height = inst->height;
>> - break;
>> - case V4L2_SEL_TGT_CROP:
>> s->r.width = inst->out_width;
>> s->r.height = inst->out_height;
>> break;
>> + case V4L2_SEL_TGT_CROP:
>> + s->r.width = inst->width;
>> + s->r.height = inst->height;
>> + break;
>> default:
>> return -EINVAL;
>> }inter
>> @@ -490,10 +490,14 @@ static int venc_g_fmt(struct file *file, void *fh, struct v4l2_format *f)
>>
>> switch (s->target) {
>> case V4L2_SEL_TGT_CROP:
>> - if (s->r.width != inst->out_width ||
>> - s->r.height != inst->out_height ||
>> - s->r.top != 0 || s->r.left != 0)
>> - return -EINVAL;
>> + if (s->r.width != inst->width ||
>> + s->r.height != inst->height ||
>> + s->r.top != 0 || s->r.left != 0) {
>> + s->r.top = 0;
>> + s->r.left = 0;
>> + s->r.width = inst->width;
>> + s->r.height = inst->height;
>
> What's the point of exposing the selection API if no selection can
> actually be done?
If someone can guarantee that dropping of s_selection will not break
userspace applications I'm fine with removing it.
I implemented g/s_selection with the idea to add crop functionality
later because with current firmware interface it needs more work.
--
regards,
Stan
next prev parent reply other threads:[~2020-10-01 1:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-24 17:31 [PATCH 0/2] Venus: fix handling of crop and s_fmt Dikshita Agarwal
2020-09-24 17:31 ` [PATCH 1/2] venus: venc: update output format based on capture format Dikshita Agarwal
2020-12-16 6:14 ` dikshita
2020-09-24 17:31 ` [PATCH 2/2] venus: venc: fix handlig of S_SELECTION and G_SELECTION Dikshita Agarwal
2020-09-24 23:09 ` Stanimir Varbanov
2020-09-25 20:55 ` Tomasz Figa
2020-10-01 1:32 ` Stanimir Varbanov [this message]
2020-10-01 15:17 ` Tomasz Figa
2020-10-07 19:33 ` vgarodia
2020-10-08 14:21 ` Tomasz Figa
2020-10-13 9:26 ` vgarodia
2020-10-13 13:39 ` Tomasz Figa
2020-10-22 4:37 ` vgarodia
2020-10-22 23:08 ` Tomasz Figa
2020-10-27 15:02 ` vgarodia
2020-11-03 17:02 ` dikshita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b977eb27-9646-1c73-5acb-c3a74460e426@linaro.org \
--to=stanimir.varbanov@linaro.org \
--cc=dikshita@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=tfiga@chromium.org \
--cc=vgarodia@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).