summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdulla Anam <abdullahanam@codeaurora.org>2017-02-15 18:42:58 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-27 02:00:12 -0700
commita864fa47c48c4b2c9f49801a444bf6d335c98d96 (patch)
tree50ffa1b97ce3231bb6c106da8983dc3e1796b9c6
parentba53c4518c7bf3b3abda54284cfb2a6d2175749b (diff)
msm: vidc: Prioritize debugfs timeout control over dtsi entry
Debugfs timeout control is read only during probe, which makes it useless as control to allow/disallow crash during sys error Prioritize this control over the dtsi entry. Change-Id: I3925653948b81e44d6540c28aa98881418e29f6e Signed-off-by: Abdulla Anam <abdullahanam@codeaurora.org>
-rw-r--r--drivers/media/platform/msm/vidc/msm_vidc_common.c13
-rw-r--r--drivers/media/platform/msm/vidc/msm_vidc_res_parse.c2
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_common.c b/drivers/media/platform/msm/vidc/msm_vidc_common.c
index 8b459e4da618..7b28e80979f2 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_common.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_common.c
@@ -902,7 +902,7 @@ static int wait_for_sess_signal_receipt(struct msm_vidc_inst *inst,
dprintk(VIDC_ERR,
"sess resp timeout can potentially crash the system\n");
msm_comm_print_debug_info(inst);
- BUG_ON(inst->core->resources.debug_timeout);
+ BUG_ON(msm_vidc_debug_timeout);
msm_comm_kill_session(inst);
rc = -EIO;
} else {
@@ -1748,7 +1748,7 @@ static void handle_sys_error(enum hal_command_response cmd, void *data)
msm_comm_print_inst_info(inst);
mutex_unlock(&core->lock);
- BUG_ON(core->resources.debug_timeout);
+ BUG_ON(msm_vidc_debug_timeout);
}
void msm_comm_session_clean(struct msm_vidc_inst *inst)
@@ -2543,7 +2543,7 @@ static int msm_comm_session_abort(struct msm_vidc_inst *inst)
"ABORT timeout can potentially crash the system\n");
msm_comm_print_debug_info(inst);
- BUG_ON(inst->core->resources.debug_timeout);
+ BUG_ON(msm_vidc_debug_timeout);
rc = -EBUSY;
} else {
rc = 0;
@@ -2645,7 +2645,7 @@ int msm_comm_check_core_init(struct msm_vidc_core *core)
msm_comm_print_debug_info(inst);
mutex_lock(&core->lock);
- BUG_ON(core->resources.debug_timeout);
+ BUG_ON(msm_vidc_debug_timeout);
rc = -EIO;
goto exit;
} else {
@@ -4110,10 +4110,9 @@ int msm_comm_try_get_prop(struct msm_vidc_inst *inst, enum hal_property ptype,
call_hfi_op(hdev, flush_debug_queue, hdev->hfi_device_data);
dprintk(VIDC_ERR,
"SESS_PROP timeout can potentially crash the system\n");
- if (inst->core->resources.debug_timeout)
- msm_comm_print_debug_info(inst);
+ msm_comm_print_debug_info(inst);
- BUG_ON(inst->core->resources.debug_timeout);
+ BUG_ON(msm_vidc_debug_timeout);
msm_comm_kill_session(inst);
rc = -ETIMEDOUT;
goto exit;
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c b/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c
index a65e22c66e30..4cc977e568ee 100644
--- a/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c
+++ b/drivers/media/platform/msm/vidc/msm_vidc_res_parse.c
@@ -1123,7 +1123,7 @@ int read_platform_resources_from_dt(
res->debug_timeout = of_property_read_bool(pdev->dev.of_node,
"qcom,debug-timeout");
- res->debug_timeout |= msm_vidc_debug_timeout;
+ msm_vidc_debug_timeout |= res->debug_timeout;
of_property_read_u32(pdev->dev.of_node,
"qcom,pm-qos-latency-us", &res->pm_qos_latency_us);