static int vavs2_event_cb(int type, void *data, void *private_data)
{
+ struct AVS2Decoder_s *dec = (struct AVS2Decoder_s *)private_data;
+
+ if (type & VFRAME_EVENT_RECEIVER_REQ_STATE) {
+ struct provider_state_req_s *req =
+ (struct provider_state_req_s *)data;
+ if (req->req_type == REQ_STATE_SECURE)
+ req->req_result[0] = vdec_secure(hw_to_vdec(dec));
+ else
+ req->req_result[0] = 0xffffffff;
+ }
+
return 0;
}
static int vavs_event_cb(int type, void *data, void *private_data)
{
+ struct vdec_avs_hw_s *hw = (struct vdec_avs_hw_s *)private_data;
+
+ if (type & VFRAME_EVENT_RECEIVER_REQ_STATE) {
+ struct provider_state_req_s *req =
+ (struct provider_state_req_s *)data;
+ if (req->req_type == REQ_STATE_SECURE)
+ req->req_result[0] = vdec_secure(hw_to_vdec(hw));
+ else
+ req->req_result[0] = 0xffffffff;
+ }
+
return 0;
}
dpb_print(DECODE_ID(hw), PRINT_FLAG_VDEC_STATUS,
"%s(type 0x%x vf buf_spec_num 0x%x)=>size 0x%x\n",
__func__, type, buf_spec_num, req->aux_size);
+ } else if (type & VFRAME_EVENT_RECEIVER_REQ_STATE) {
+ struct provider_state_req_s *req =
+ (struct provider_state_req_s *)data;
+ if (req->req_type == REQ_STATE_SECURE)
+ req->req_result[0] = vdec_secure(vdec);
+ else
+ req->req_result[0] = 0xffffffff;
}
return 0;
hevc_print(hevc, 0,
"%s(type 0x%x vf index 0x%x)=>size 0x%x\n",
__func__, type, index, req->aux_size);
+ }
#ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
- } else if (type & VFRAME_EVENT_RECEIVER_DOLBY_BYPASS_EL) {
+ else if (type & VFRAME_EVENT_RECEIVER_DOLBY_BYPASS_EL) {
if ((force_bypass_dvenl & 0x80000000) == 0) {
hevc_print(hevc, 0,
"%s: VFRAME_EVENT_RECEIVER_DOLBY_BYPASS_EL\n",
__func__);
hevc->bypass_dvenl_enable = 1;
}
-
+ }
#endif
+ else if (type & VFRAME_EVENT_RECEIVER_REQ_STATE) {
+ struct provider_state_req_s *req =
+ (struct provider_state_req_s *)data;
+ if (req->req_type == REQ_STATE_SECURE)
+ req->req_result[0] = vdec_secure(vdec);
+ else
+ req->req_result[0] = 0xffffffff;
}
+
return 0;
}
hw->put_num++;
}
-static int vmjpeg_event_cb(int type, void *data, void *private_data)
+static int vmjpeg_event_cb(int type, void *data, void *op_arg)
{
+ struct vdec_s *vdec = op_arg;
+
+ if (type & VFRAME_EVENT_RECEIVER_REQ_STATE) {
+ struct provider_state_req_s *req =
+ (struct provider_state_req_s *)data;
+ if (req->req_type == REQ_STATE_SECURE)
+ req->req_result[0] = vdec_secure(vdec);
+ else
+ req->req_result[0] = 0xffffffff;
+ }
+
return 0;
}
(const struct vframe_s *)vf);
}
-static int vmpeg_event_cb(int type, void *data, void *private_data)
+
+static int vmpeg_event_cb(int type, void *data, void *op_arg)
{
+ struct vdec_s *vdec = op_arg;
+
+ if (type & VFRAME_EVENT_RECEIVER_REQ_STATE) {
+ struct provider_state_req_s *req =
+ (struct provider_state_req_s *)data;
+ if (req->req_type == REQ_STATE_SECURE)
+ req->req_result[0] = vdec_secure(vdec);
+ else
+ req->req_result[0] = 0xffffffff;
+ }
+
return 0;
}
kfifo_put(&hw->newframe_q, (const struct vframe_s *)vf);
}
-static int vmpeg_event_cb(int type, void *data, void *private_data)
+static int vmpeg_event_cb(int type, void *data, void *op_arg)
{
+ struct vdec_s *vdec = op_arg;
+
+ if (type & VFRAME_EVENT_RECEIVER_REQ_STATE) {
+ struct provider_state_req_s *req =
+ (struct provider_state_req_s *)data;
+ if (req->req_type == REQ_STATE_SECURE)
+ req->req_result[0] = vdec_secure(vdec);
+ else
+ req->req_result[0] = 0xffffffff;
+ }
+
return 0;
}
av1_print(hw, 0,
"%s(type 0x%x vf index 0x%x)=>size 0x%x\n",
__func__, type, index, req->aux_size);
-#if 0
-//def CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_DOLBYVISION
- } else if (type & VFRAME_EVENT_RECEIVER_DOLBY_BYPASS_EL) {
- if ((force_bypass_dvenl & 0x80000000) == 0) {
- av1_print(hw, 0,
- "%s: VFRAME_EVENT_RECEIVER_DOLBY_BYPASS_EL\n",
- __func__);
- hw->bypass_dvenl_enable = 1;
- }
-
-#endif
+ } else if (type & VFRAME_EVENT_RECEIVER_REQ_STATE) {
+ struct provider_state_req_s *req =
+ (struct provider_state_req_s *)data;
+ if (req->req_type == REQ_STATE_SECURE)
+ req->req_result[0] = vdec_secure(hw_to_vdec(hw));
+ else
+ req->req_result[0] = 0xffffffff;
}
return 0;
}
static int vvp9_event_cb(int type, void *data, void *private_data)
{
+ struct VP9Decoder_s *pbi = (struct VP9Decoder_s *)private_data;
+
if (type & VFRAME_EVENT_RECEIVER_RESET) {
#if 0
unsigned long flags;
#endif
amhevc_start();
#endif
+ } else if (type & VFRAME_EVENT_RECEIVER_REQ_STATE) {
+ struct provider_state_req_s *req =
+ (struct provider_state_req_s *)data;
+ if (req->req_type == REQ_STATE_SECURE)
+ req->req_result[0] = vdec_secure(hw_to_vdec(pbi));
+ else
+ req->req_result[0] = 0xffffffff;
}
return 0;