amlvideo: reset video_inuse when amlvideo stop [1/1]

PD#TV-6189

Problem:
video_inuse always is 1 when codec server crash

Solution:
reset video_inuse when amlvideo stop

Verify:
TL1

Change-Id: I5b1b808668e3b2fb78781a4ea1ccbaefc3507d2b
Signed-off-by: Lifeng Cao <lifeng.cao@amlogic.com>
This commit is contained in:
Lifeng Cao
2019-05-27 14:00:07 +08:00
parent 70e44173d1
commit 53b26248ef
3 changed files with 4 additions and 1 deletions

View File

@@ -764,6 +764,8 @@ static int amlvideo_close(struct file *file)
mutex_lock(&dev->mutex);
dev->users--;
mutex_unlock(&dev->mutex);
if (dev->inst == 0)
video_inuse = 0;
AMLVIDEO_DBG("amlvideo close");
return 0;
}

View File

@@ -103,6 +103,7 @@ struct vivi_fh {
enum v4l2_buf_type type;
};
extern bool video_inuse;
extern bool omx_secret_mode;
extern void get_ppmgr_buf_info(char **start, unsigned int *size);

View File

@@ -1116,7 +1116,7 @@ static u32 last_toggle_count;
static u32 toggle_same_count;
/* video_inuse */
static u32 video_inuse;
u32 video_inuse;
void set_freerun_mode(int mode)
{