File tree Expand file tree Collapse file tree 5 files changed +7
-6
lines changed
drivers/media/platform/qcom/venus Expand file tree Collapse file tree 5 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ static void venus_event_notify(struct venus_core *core, u32 event)
65
65
}
66
66
67
67
mutex_lock (& core -> lock );
68
- core -> sys_error = true ;
68
+ set_bit ( 0 , & core -> sys_error ) ;
69
69
list_for_each_entry (inst , & core -> instances , list )
70
70
inst -> ops -> event_notify (inst , EVT_SESSION_ERROR , NULL );
71
71
mutex_unlock (& core -> lock );
@@ -161,7 +161,7 @@ static void venus_sys_error_handler(struct work_struct *work)
161
161
dev_warn (core -> dev , "system error has occurred (recovered)\n" );
162
162
163
163
mutex_lock (& core -> lock );
164
- core -> sys_error = false ;
164
+ clear_bit ( 0 , & core -> sys_error ) ;
165
165
mutex_unlock (& core -> lock );
166
166
}
167
167
Original file line number Diff line number Diff line change 7
7
#ifndef __VENUS_CORE_H_
8
8
#define __VENUS_CORE_H_
9
9
10
+ #include <linux/bitops.h>
10
11
#include <linux/list.h>
11
12
#include <media/videobuf2-v4l2.h>
12
13
#include <media/v4l2-ctrls.h>
@@ -182,7 +183,7 @@ struct venus_core {
182
183
unsigned int state ;
183
184
struct completion done ;
184
185
unsigned int error ;
185
- bool sys_error ;
186
+ unsigned long sys_error ;
186
187
const struct hfi_core_ops * core_ops ;
187
188
const struct venus_pm_ops * pm_ops ;
188
189
struct mutex pm_lock ;
Original file line number Diff line number Diff line change @@ -1486,7 +1486,7 @@ void venus_helper_vb2_stop_streaming(struct vb2_queue *q)
1486
1486
ret |= venus_helper_intbufs_free (inst );
1487
1487
ret |= hfi_session_deinit (inst );
1488
1488
1489
- if (inst -> session_error || core -> sys_error )
1489
+ if (inst -> session_error || test_bit ( 0 , & core -> sys_error ) )
1490
1490
ret = - EIO ;
1491
1491
1492
1492
if (ret )
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ int hfi_session_init(struct venus_inst *inst, u32 pixfmt)
214
214
* session_init() can't pass successfully
215
215
*/
216
216
mutex_lock (& core -> lock );
217
- if (!core -> ops || core -> sys_error ) {
217
+ if (!core -> ops || test_bit ( 0 , & inst -> core -> sys_error ) ) {
218
218
mutex_unlock (& core -> lock );
219
219
return - EIO ;
220
220
}
Original file line number Diff line number Diff line change @@ -1231,7 +1231,7 @@ static void vdec_session_release(struct venus_inst *inst)
1231
1231
ret = hfi_session_deinit (inst );
1232
1232
abort = (ret && ret != - EINVAL ) ? 1 : 0 ;
1233
1233
1234
- if (inst -> session_error || core -> sys_error )
1234
+ if (inst -> session_error || test_bit ( 0 , & core -> sys_error ) )
1235
1235
abort = 1 ;
1236
1236
1237
1237
if (abort )
You can’t perform that action at this time.
0 commit comments