mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
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:
@@ -764,6 +764,8 @@ static int amlvideo_close(struct file *file)
|
|||||||
mutex_lock(&dev->mutex);
|
mutex_lock(&dev->mutex);
|
||||||
dev->users--;
|
dev->users--;
|
||||||
mutex_unlock(&dev->mutex);
|
mutex_unlock(&dev->mutex);
|
||||||
|
if (dev->inst == 0)
|
||||||
|
video_inuse = 0;
|
||||||
AMLVIDEO_DBG("amlvideo close");
|
AMLVIDEO_DBG("amlvideo close");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ struct vivi_fh {
|
|||||||
enum v4l2_buf_type type;
|
enum v4l2_buf_type type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern bool video_inuse;
|
||||||
extern bool omx_secret_mode;
|
extern bool omx_secret_mode;
|
||||||
extern void get_ppmgr_buf_info(char **start, unsigned int *size);
|
extern void get_ppmgr_buf_info(char **start, unsigned int *size);
|
||||||
|
|
||||||
|
|||||||
@@ -1116,7 +1116,7 @@ static u32 last_toggle_count;
|
|||||||
static u32 toggle_same_count;
|
static u32 toggle_same_count;
|
||||||
|
|
||||||
/* video_inuse */
|
/* video_inuse */
|
||||||
static u32 video_inuse;
|
u32 video_inuse;
|
||||||
|
|
||||||
void set_freerun_mode(int mode)
|
void set_freerun_mode(int mode)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user