mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: Malathi Gottam <mgottam@codeaurora.org>,
	hverkuil@xs4all.nl, mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, acourbot@chromium.org,
	vgarodia@codeaurora.org
Subject: Re: [PATCH] media: venus: add support for selection rectangles
Date: Tue, 16 Oct 2018 12:41:45 +0300	[thread overview]
Message-ID: <0e0f689e-f6e3-73a6-e145-deb2ef7cafc8@linaro.org> (raw)
In-Reply-To: <1539071603-1588-1-git-send-email-mgottam@codeaurora.org>

Hi Malathi,

On 10/09/2018 10:53 AM, Malathi Gottam wrote:
> Handles target type crop by setting the new active rectangle
> to hardware. The new rectangle should be within YUV size.
> 
> Signed-off-by: Malathi Gottam <mgottam@codeaurora.org>
> ---
>  drivers/media/platform/qcom/venus/venc.c | 19 +++++++++++++++++--
>  1 file changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> index 3f50cd0..754c19a 100644
> --- a/drivers/media/platform/qcom/venus/venc.c
> +++ b/drivers/media/platform/qcom/venus/venc.c
> @@ -478,16 +478,31 @@ static int venc_g_fmt(struct file *file, void *fh, struct v4l2_format *f)
>  venc_s_selection(struct file *file, void *fh, struct v4l2_selection *s)
>  {
>  	struct venus_inst *inst = to_inst(file);
> +	int ret;
> +	u32 buftype;
>  
>  	if (s->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
>  		return -EINVAL;
>  
>  	switch (s->target) {
>  	case V4L2_SEL_TGT_CROP:
> -		if (s->r.width != inst->out_width ||
> -		    s->r.height != inst->out_height ||
> +		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) {
> +			buftype = HFI_BUFFER_OUTPUT;
> +			ret = venus_helper_set_output_resolution(inst,
> +								 s->r.width,
> +								 s->r.height,
> +								 buftype);

I'm afraid that set_output_resolution cannot be called at any time. Do
you think we can set it after start_session?

-- 
regards,
Stan

  reply	other threads:[~2018-10-16  9:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09  7:53 Malathi Gottam
2018-10-16  9:41 ` Stanimir Varbanov [this message]
2018-11-01 13:10   ` mgottam
2018-11-01 15:02     ` Stanimir Varbanov
2018-11-02  3:16       ` Tomasz Figa
2018-11-09  7:38         ` mgottam

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=0e0f689e-f6e3-73a6-e145-deb2ef7cafc8@linaro.org \
    --to=stanimir.varbanov@linaro.org \
    --cc=acourbot@chromium.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=mgottam@codeaurora.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

all inboxes | Powered by JetHome®