|
@@ -3067,6 +3067,50 @@ unlock:
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
+int venus_hfi_session_set_secure_mode(struct msm_vidc_inst *inst)
|
|
|
+{
|
|
|
+ int rc = 0;
|
|
|
+ struct msm_vidc_core *core;
|
|
|
+ u32 secure_mode;
|
|
|
+
|
|
|
+ if (!inst || !inst->core || !inst->packet) {
|
|
|
+ d_vpr_e("%s: invalid params\n", __func__);
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+ core = inst->core;
|
|
|
+ core_lock(core, __func__);
|
|
|
+
|
|
|
+ if (!__valdiate_session(core, inst, __func__)) {
|
|
|
+ rc = -EINVAL;
|
|
|
+ goto unlock;
|
|
|
+ }
|
|
|
+
|
|
|
+ rc = hfi_create_header(inst->packet, inst->packet_size,
|
|
|
+ inst->session_id, core->header_id++);
|
|
|
+ if (rc)
|
|
|
+ goto unlock;
|
|
|
+
|
|
|
+ secure_mode = inst->capabilities->cap[SECURE_MODE].value;
|
|
|
+ rc = hfi_create_packet(inst->packet, inst->packet_size,
|
|
|
+ HFI_PROP_SECURE,
|
|
|
+ HFI_HOST_FLAGS_NONE,
|
|
|
+ HFI_PAYLOAD_U32,
|
|
|
+ HFI_PORT_NONE,
|
|
|
+ core->packet_id++,
|
|
|
+ &secure_mode,
|
|
|
+ sizeof(u32));
|
|
|
+ if (rc)
|
|
|
+ goto unlock;
|
|
|
+
|
|
|
+ rc = __iface_cmdq_write(inst->core, inst->packet);
|
|
|
+ if (rc)
|
|
|
+ goto unlock;
|
|
|
+
|
|
|
+unlock:
|
|
|
+ core_unlock(core, __func__);
|
|
|
+ return rc;
|
|
|
+}
|
|
|
+
|
|
|
int venus_hfi_session_property(struct msm_vidc_inst *inst,
|
|
|
u32 pkt_type, u32 flags, u32 port, u32 payload_type,
|
|
|
void *payload, u32 payload_size)
|