Skip to contentSkip to conversation

media: venus: handle peak bitrate set property

PATCH In review Malathi Gottam 3 participants 3 messages Oct 22, 2018 – Nov 1, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 media: venus: handle peak bitrate set property

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.

---
 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(-)
drivers/media/platform/qcom/venus/hfi_cmds.c +1 -1
index e8389d8..87a4414 100644
@@ -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);
 	}
drivers/media/platform/qcom/venus/hfi_venus.c +2 -0
index 1240855..9d086b9 100644
@@ -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;
 
Signature · 1 line
1.9.1
Tested-by on v2 1/1
#1 lore raw

Hi Malathi,

Quoted 6 lines · Malathi Gottam

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.

This seems to work, thanks!

Quoted 34 lines
---
 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(-)
drivers/media/platform/qcom/venus/hfi_cmds.c +1 -1
index e8389d8..87a4414 100644
@@ -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);
        }
drivers/media/platform/qcom/venus/hfi_venus.c +2 -1
index 1240855..9d086b9 100644
@@ -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

Acked-by on v2 1/1
#2 lore raw
In reply to Malathi Gottam

Malathi, thanks for the patch!

Quoted 28 lines · Malathi Gottam

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.

---
 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(-)
drivers/media/platform/qcom/venus/hfi_cmds.c +1 -1
index e8389d8..87a4414 100644
@@ -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);
 	}
drivers/media/platform/qcom/venus/hfi_venus.c +0 -0
index 1240855..9d086b9 100644

drivers/media/platform/qcom/venus/hfi_venus.c static int venus_session_set_property(struct venus_inst *inst, u32 ptype, · line 1362

Quoted 8 lines
drivers/media/platform/qcom/venus/hfi_venus.c +2 -0
@@ -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;
 
Signature · 2 lines
regards,
Stan