From: Stanimir Varbanov <stanimir.varbanov@linaro.org>
To: Malathi Gottam <mgottam@codeaurora.org>,
stanimir.varbanov@linaro.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: handle peak bitrate set property
Date: Tue, 9 Oct 2018 17:59:55 +0300 [thread overview]
Message-ID: <274a112a-604c-82b4-130a-c3718abcf141@linaro.org> (raw)
In-Reply-To: <1539071483-1371-1-git-send-email-mgottam@codeaurora.org>
Hi Malathi,
Thanks for the patch!
On 10/09/2018 10:51 AM, Malathi Gottam wrote:
> Max bitrate property is not supported for venus version 4xx.
> Add a version check for the same.
I'd like to avoid version checks in this layer of the driver. Could just
black-list this property in pkt_session_set_property_4xx? Hint, see
HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE in the same function.
>
> Signed-off-by: Malathi Gottam <mgottam@codeaurora.org>
> ---
> drivers/media/platform/qcom/venus/venc.c | 22 ++++++++++++----------
> 1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> index ef11495..3f50cd0 100644
> --- a/drivers/media/platform/qcom/venus/venc.c
> +++ b/drivers/media/platform/qcom/venus/venc.c
> @@ -757,18 +757,20 @@ static int venc_set_properties(struct venus_inst *inst)
> if (ret)
> return ret;
>
> - if (!ctr->bitrate_peak)
> - bitrate *= 2;
> - else
> - bitrate = ctr->bitrate_peak;
> + if (!IS_V4(inst->core)) {
> + if (!ctr->bitrate_peak)
> + bitrate *= 2;
> + else
> + bitrate = ctr->bitrate_peak;
>
> - ptype = HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE;
> - brate.bitrate = bitrate;
> - brate.layer_id = 0;
> + ptype = HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE;
> + brate.bitrate = bitrate;
> + brate.layer_id = 0;
>
> - ret = hfi_session_set_property(inst, ptype, &brate);
> - if (ret)
> - return ret;
> + ret = hfi_session_set_property(inst, ptype, &brate);
> + if (ret)
> + return ret;
> + }
>
> if (inst->fmt_cap->pixfmt == V4L2_PIX_FMT_H264) {
> profile = venc_v4l2_to_hfi(V4L2_CID_MPEG_VIDEO_H264_PROFILE,
>
--
regards,
Stan
next prev parent reply other threads:[~2018-10-09 15:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 7:51 [PATCH] media: venus: handle peak bitrate set property Malathi Gottam
2018-10-09 14:59 ` Stanimir Varbanov [this message]
2018-10-22 12:04 ` 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=274a112a-604c-82b4-130a-c3718abcf141@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;
as well as URLs for NNTP newsgroup(s).