Skip to content

Commit 53b2624

Browse files
author
Lifeng Cao
committed
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 <[email protected]>
1 parent 70e4417 commit 53b2624

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

drivers/amlogic/media/video_processor/video_dev/amlvideo.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static int amlvideo_close(struct file *file)
764764
mutex_lock(&dev->mutex);
765765
dev->users--;
766766
mutex_unlock(&dev->mutex);
767+
if (dev->inst == 0)
768+
video_inuse = 0;
767769
AMLVIDEO_DBG("amlvideo close");
768770
return 0;
769771
}

drivers/amlogic/media/video_processor/video_dev/amlvideo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ struct vivi_fh {
103103
enum v4l2_buf_type type;
104104
};
105105

106+
extern bool video_inuse;
106107
extern bool omx_secret_mode;
107108
extern void get_ppmgr_buf_info(char **start, unsigned int *size);
108109

drivers/amlogic/media/video_sink/video.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ static u32 last_toggle_count;
11161116
static u32 toggle_same_count;
11171117

11181118
/* video_inuse */
1119-
static u32 video_inuse;
1119+
u32 video_inuse;
11201120

11211121
void set_freerun_mode(int mode)
11221122
{

0 commit comments

Comments
 (0)