* [PATCH v2] media: venus: handle peak bitrate set property
@ 2018-10-22 12:05 Malathi Gottam
2018-10-23 8:08 ` Alexandre Courbot
2018-11-01 12:21 ` Stanimir Varbanov
0 siblings, 2 replies; 3+ messages in thread
From: Malathi Gottam @ 2018-10-22 12:05 UTC (permalink / raw)
To: stanimir.varbanov, hverkuil, mchehab
Cc: linux-media, linux-kernel, linux-arm-msm, acourbot, vgarodia, mgottam
Max bitrate property is not supported for venus version 4xx.
Return unsupported from packetization layer. Handle it in
hfi_venus layer to exit gracefully to venc layer.
Signed-off-by: Malathi Gottam <mgottam@codeaurora.org>
---
drivers/media/platform/qcom/venus/hfi_cmds.c | 2 +-
drivers/media/platform/qcom/venus/hfi_venus.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c
index e8389d8..87a4414 100644
--- a/drivers/media/platform/qcom/venus/hfi_cmds.c
+++ b/drivers/media/platform/qcom/venus/hfi_cmds.c
@@ -1215,7 +1215,7 @@ static int pkt_session_set_property_1x(struct hfi_session_set_property_pkt *pkt,
}
case HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE:
/* not implemented on Venus 4xx */
- break;
+ return -ENOTSUPP;
default:
return pkt_session_set_property_3xx(pkt, cookie, ptype, pdata);
}
diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
index 1240855..9d086b9 100644
--- a/drivers/media/platform/qcom/venus/hfi_venus.c
+++ b/drivers/media/platform/qcom/venus/hfi_venus.c
@@ -1355,6 +1355,8 @@ static int venus_session_set_property(struct venus_inst *inst, u32 ptype,
pkt = (struct hfi_session_set_property_pkt *)packet;
ret = pkt_session_set_property(pkt, inst, ptype, pdata);
+ if (ret == -ENOTSUPP)
+ return 0;
if (ret)
return ret;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] media: venus: handle peak bitrate set property
2018-10-22 12:05 [PATCH v2] media: venus: handle peak bitrate set property Malathi Gottam
@ 2018-10-23 8:08 ` Alexandre Courbot
2018-11-01 12:21 ` Stanimir Varbanov
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Courbot @ 2018-10-23 8:08 UTC (permalink / raw)
To: mgottam
Cc: Stanimir Varbanov, Hans Verkuil, Mauro Carvalho Chehab,
Linux Media Mailing List, LKML, linux-arm-msm, vgarodia
Hi Malathi,
On Mon, Oct 22, 2018 at 9:06 PM Malathi Gottam <mgottam@codeaurora.org> wrote:
>
> Max bitrate property is not supported for venus version 4xx.
> Return unsupported from packetization layer. Handle it in
> hfi_venus layer to exit gracefully to venc layer.
>
> Signed-off-by: Malathi Gottam <mgottam@codeaurora.org>
This seems to work, thanks!
Tested-by: Alexandre Courbot <acourbot@chromium.org>
> ---
> drivers/media/platform/qcom/venus/hfi_cmds.c | 2 +-
> drivers/media/platform/qcom/venus/hfi_venus.c | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c
> index e8389d8..87a4414 100644
> --- a/drivers/media/platform/qcom/venus/hfi_cmds.c
> +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c
> @@ -1215,7 +1215,7 @@ static int pkt_session_set_property_1x(struct hfi_session_set_property_pkt *pkt,
> }
> case HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE:
> /* not implemented on Venus 4xx */
> - break;
> + return -ENOTSUPP;
> default:
> return pkt_session_set_property_3xx(pkt, cookie, ptype, pdata);
> }
> diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
> index 1240855..9d086b9 100644
> --- a/drivers/media/platform/qcom/venus/hfi_venus.c
> +++ b/drivers/media/platform/qcom/venus/hfi_venus.c
> @@ -1355,6 +1355,8 @@ static int venus_session_set_property(struct venus_inst *inst, u32 ptype,
> pkt = (struct hfi_session_set_property_pkt *)packet;
>
> ret = pkt_session_set_property(pkt, inst, ptype, pdata);
> + if (ret == -ENOTSUPP)
> + return 0;
> if (ret)
> return ret;
>
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] media: venus: handle peak bitrate set property
2018-10-22 12:05 [PATCH v2] media: venus: handle peak bitrate set property Malathi Gottam
2018-10-23 8:08 ` Alexandre Courbot
@ 2018-11-01 12:21 ` Stanimir Varbanov
1 sibling, 0 replies; 3+ messages in thread
From: Stanimir Varbanov @ 2018-11-01 12:21 UTC (permalink / raw)
To: Malathi Gottam, hverkuil, mchehab
Cc: linux-media, linux-kernel, linux-arm-msm, acourbot, vgarodia
Malathi, thanks for the patch!
On 10/22/18 3:05 PM, Malathi Gottam wrote:
> Max bitrate property is not supported for venus version 4xx.
> Return unsupported from packetization layer. Handle it in
> hfi_venus layer to exit gracefully to venc layer.
>
> Signed-off-by: Malathi Gottam <mgottam@codeaurora.org>
> ---
> drivers/media/platform/qcom/venus/hfi_cmds.c | 2 +-
> drivers/media/platform/qcom/venus/hfi_venus.c | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c
> index e8389d8..87a4414 100644
> --- a/drivers/media/platform/qcom/venus/hfi_cmds.c
> +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c
> @@ -1215,7 +1215,7 @@ static int pkt_session_set_property_1x(struct hfi_session_set_property_pkt *pkt,
> }
> case HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE:
> /* not implemented on Venus 4xx */
> - break;
> + return -ENOTSUPP;
> default:
> return pkt_session_set_property_3xx(pkt, cookie, ptype, pdata);
> }
> diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
> index 1240855..9d086b9 100644
> --- a/drivers/media/platform/qcom/venus/hfi_venus.c
> +++ b/drivers/media/platform/qcom/venus/hfi_venus.c
> @@ -1355,6 +1355,8 @@ static int venus_session_set_property(struct venus_inst *inst, u32 ptype,
> pkt = (struct hfi_session_set_property_pkt *)packet;
>
> ret = pkt_session_set_property(pkt, inst, ptype, pdata);
> + if (ret == -ENOTSUPP)
> + return 0;
> if (ret)
> return ret;
>
Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
--
regards,
Stan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-01 12:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-22 12:05 [PATCH v2] media: venus: handle peak bitrate set property Malathi Gottam
2018-10-23 8:08 ` Alexandre Courbot
2018-11-01 12:21 ` 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).