static struct vframe_s *vavs_vf_peek(void *);
static struct vframe_s *vavs_vf_get(void *);
static void vavs_vf_put(struct vframe_s *, void *);
+static int vavs_event_cb(int type, void *data, void *private_data);
static int vavs_vf_states(struct vframe_states *states, void *);
static const char vavs_dec_id[] = "vavs-dev";
.peek = vavs_vf_peek,
.get = vavs_vf_get,
.put = vavs_vf_put,
+ .event_cb = vavs_event_cb,
.vf_states = vavs_vf_states,
};
static void *mm_blk_handle;
static struct work_struct set_clk_work;
static bool is_reset;
-static struct vdec_s *vdec;
+static struct vdec_s *vdec = NULL;
#ifdef AVSP_LONG_CABAC
static struct work_struct long_cabac_wd_work;
}
}
-
#ifdef HANDLE_AVS_IRQ
static irqreturn_t vavs_isr(int irq, void *dev_id)
#else
decoder_bmmu_box_get_mem_handle(
mm_blk_handle,
buffer_index);
- decoder_do_frame_check(NULL, vf);
+ decoder_do_frame_check(NULL, vf);
kfifo_put(&display_q,
(const struct vframe_s *)vf);
ATRACE_COUNTER(MODULE_NAME, vf->pts);
}
+static int vavs_event_cb(int type, void *data, void *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 && vdec)
+ req->req_result[0] = vdec_secure(vdec);
+ else
+ req->req_result[0] = 0xffffffff;
+ }
+
+ return 0;
+}
+
int vavs_dec_status(struct vdec_s *vdec, struct vdec_info *vstatus)
{
if (!(stat & STAT_VDEC_RUN))
#endif
kfree(gvs);
gvs = NULL;
+ vdec = NULL;
cancel_work_sync(&set_clk_work);
return 0;
#define PROVIDER_NAME "decoder.mpeg4"
+struct vdec_s *vdec = NULL;
+
/*
*int query_video_status(int type, int *value);
*/
#endif
amvdec_start();
}
+
+ 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 && vdec)
+ req->req_result[0] = vdec_secure(vdec);
+ else
+ req->req_result[0] = 0xffffffff;
+ }
return 0;
}
pdata->dec_status = vmpeg4_dec_status;
pdata->set_isreset = vmpeg4_set_isreset;
is_reset = 0;
+ vdec = pdata;
INIT_WORK(&reset_work, reset_do_work);
INIT_WORK(¬ify_work, vmpeg4_notify_work);
vmpeg4_amstream_dec_info.rate);
kfree(gvs);
gvs = NULL;
+ vdec = NULL;
return 0;
}
#define MEM_LEVEL_CNT_BIT 18
#endif
static struct vdec_info *gvs;
+static struct vdec_s *vdec = NULL;
static struct vframe_s *vvc1_vf_peek(void *);
static struct vframe_s *vvc1_vf_get(void *);
#endif
amvdec_start();
}
+
+ 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 && vdec)
+ req->req_result[0] = vdec_secure(vdec);
+ else
+ req->req_result[0] = 0xffffffff;
+ }
return 0;
}
pdata->dec_status = vvc1_dec_status;
pdata->set_isreset = vvc1_set_isreset;
is_reset = 0;
+ vdec = pdata;
vvc1_vdec_info_init();
#endif
kfree(gvs);
gvs = NULL;
+ vdec = NULL;
return 0;
}