mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
ionvideo: fix a crash in ionvideo_thread_tick
PD#171379: Change-Id: I868dd27b8ada3e9bb199e1d6b4325151a568dbf7 Signed-off-by: jintao xu <jintao.xu@amlogic.com>
This commit is contained in:
@@ -382,6 +382,9 @@ static void ionvideo_thread_tick(struct ionvideo_dev *dev)
|
||||
if (dev->active_state == ION_INACTIVE)
|
||||
return;
|
||||
|
||||
if (dev->receiver_register == 0)
|
||||
return;
|
||||
|
||||
dev->wait_ge2d_timeout = false;
|
||||
vf = vf_peek(dev->vf_receiver_name);
|
||||
if (!vf) {
|
||||
@@ -961,15 +964,14 @@ static int video_receiver_event_fun(int type, void *data, void *private_data)
|
||||
}
|
||||
|
||||
/*tsync_avevent(VIDEO_STOP, 0);*/
|
||||
IONVID_DBG("unreg:ionvideo\n");
|
||||
pr_info("unreg:ionvideo\n");
|
||||
} else if (type == VFRAME_EVENT_PROVIDER_REG) {
|
||||
dev->receiver_register = 1;
|
||||
dev->is_omx_video_started = 1;
|
||||
dev->ppmgr2_dev.interlaced_num = 0;
|
||||
dev->active_state = ION_ACTIVE;
|
||||
init_completion(&dev->inactive_done);
|
||||
|
||||
IONVID_DBG("reg:ionvideo\n");
|
||||
dev->receiver_register = 1;
|
||||
pr_info("reg:ionvideo\n");
|
||||
} else if (type == VFRAME_EVENT_PROVIDER_QUREY_STATE) {
|
||||
if (dev->vf_wait_cnt > 1)
|
||||
return RECEIVER_INACTIVE;
|
||||
|
||||
@@ -481,6 +481,11 @@ int ppmgr2_process(struct vframe_s *vf, struct ppmgr2_device *ppd, int index)
|
||||
int angle = (ppd->angle + src_vf->orientation) % 4;
|
||||
int dst_canvas_id = 0;
|
||||
|
||||
if (ppd->phy_addr[index] == NULL) {
|
||||
ppmgr2_printk(1, "NULL physical address!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (src_vf->type & VIDTYPE_INTERLACE) {
|
||||
if ((ppd->bottom_first && src_vf->type & 0x2)
|
||||
|| (ppd->bottom_first == 0
|
||||
|
||||
Reference in New Issue
Block a user