media: venus: avoid multiple core dumps
Core dump is generated whenever there is system error reported by firmware. Right now, multiple such dumps are generated if recovery fails in first attempt, since the sys error handler is invoked again for every failed recovery. To avoid it, add conditional check to generate core dump only once during every system error notification from firmware. Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil: document new dump_core field]
This commit is contained in:
parent
e750a4b122
commit
02e92ea83b
@ -68,6 +68,7 @@ static void venus_event_notify(struct venus_core *core, u32 event)
|
||||
|
||||
mutex_lock(&core->lock);
|
||||
set_bit(0, &core->sys_error);
|
||||
set_bit(0, &core->dump_core);
|
||||
list_for_each_entry(inst, &core->instances, list)
|
||||
inst->ops->event_notify(inst, EVT_SESSION_ERROR, NULL);
|
||||
mutex_unlock(&core->lock);
|
||||
@ -110,7 +111,10 @@ static void venus_sys_error_handler(struct work_struct *work)
|
||||
|
||||
venus_shutdown(core);
|
||||
|
||||
venus_coredump(core);
|
||||
if (test_bit(0, &core->dump_core)) {
|
||||
venus_coredump(core);
|
||||
clear_bit(0, &core->dump_core);
|
||||
}
|
||||
|
||||
pm_runtime_put_sync(core->dev);
|
||||
|
||||
|
||||
@ -169,6 +169,7 @@ struct venus_format {
|
||||
* @core1_usage_count: usage counter for core1
|
||||
* @root: debugfs root directory
|
||||
* @venus_ver: the venus firmware version
|
||||
* @dump_core: a flag indicating that a core dump is required
|
||||
*/
|
||||
struct venus_core {
|
||||
void __iomem *base;
|
||||
@ -232,6 +233,7 @@ struct venus_core {
|
||||
u32 minor;
|
||||
u32 rev;
|
||||
} venus_ver;
|
||||
unsigned long dump_core;
|
||||
};
|
||||
|
||||
struct vdec_controls {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user