diff options
| author | Arun Menon <avmenon@codeaurora.org> | 2014-08-19 15:49:29 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-12-04 12:05:26 -0800 |
| commit | 8e47b3bd8564ed0f0841b6c3c179fc505eabf3d6 (patch) | |
| tree | eda296e427ee952094373c3212fc46b03b360349 | |
| parent | 9cc0afb4cfddbf1211027951ae62adba37813574 (diff) | |
msm: vidc: Unload firmware immediately after sys error
Currently the video driver delays unloading of firmware
by 10 sec. This was primarily done to avoid re-loading
the firmware if we had another video instance starting
immediately. However, if firmware goes in to bad state
and firmware unload is delayed, then any subsequent session
started within 10 sec will fail, as firmware is still in
bad state. We can avoid this by unloading firmware without
delay when video firmware goes in to bad state.
Change-Id: I747d6ce2fa61916cd8a24c180068879b371101a8
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
| -rw-r--r-- | drivers/media/platform/msm/vidc/msm_vidc_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_common.c b/drivers/media/platform/msm/vidc/msm_vidc_common.c index bcd831df303..924bbbe6a66 100644 --- a/drivers/media/platform/msm/vidc/msm_vidc_common.c +++ b/drivers/media/platform/msm/vidc/msm_vidc_common.c @@ -2100,7 +2100,8 @@ static int msm_vidc_deinit_core(struct msm_vidc_inst *inst) * e.g. thumbnail generation. */ schedule_delayed_work(&core->fw_unload_work, - msecs_to_jiffies(10000)); + msecs_to_jiffies(core->state == VIDC_CORE_INVALID ? + 0 : 10000)); } core_already_uninited: |
