For different clients, the timeout value would be different, and each
client could use timer to detect timeout, so it's not necessary to
enable timeout in cmdq driver.
Regards,
Chun-Kuang.
For different clients, the timeout value would be different, and each
client could use timer to detect timeout, so it's not necessary to
enable timeout in cmdq driver.
Regards,
Chun-Kuang.
if we do not set cmdq hardware timeout, this condition will never
happen
cmdq_thread_irq_handler
if (irq_flag & CMDQ_THR_IRQ_ERROR)
err = true;
and no error callback
else if (err) {
cmdq_task_exec_done(task, -ENOEXEC);
cmdq_task_handle_error(curr_task);
kfree(task);
}
the client will never received the error callback, cmdq hardware will
poll the event for ever and no report timeout
For different clients, the timeout value would be different, and each
client could use timer to detect timeout, so it's not necessary to
enable timeout in cmdq driver.
Regards,
Chun-Kuang.
if we do not set cmdq hardware timeout, this condition will never
happen
cmdq_thread_irq_handler
if (irq_flag & CMDQ_THR_IRQ_ERROR)
err = true;
and no error callback
else if (err) {
cmdq_task_exec_done(task, -ENOEXEC);
cmdq_task_handle_error(curr_task);
kfree(task);
}
the client will never received the error callback, cmdq hardware will
poll the event for ever and no report timeout
I think there are two way to implement the timeout mechanism. The
first way is to use the GCE hardware to detect timeout. The second way
is that client driver use timer to detect timeout, when it's timeout,
use mbox_flush() to clean up the packets in mtk cmdq driver, and
remove the error handle in irq handler.
If you think the first way is better, I think you should pass the
timeout value from client driver to cmdq driver because each client
driver has different timeout value. And the GCE clock may be different
in each SoC, so use clk_get_rate() to get the clock frequency for
different SoC.
Regards,
Chun-Kuang.
For different clients, the timeout value would be different, and
each
client could use timer to detect timeout, so it's not necessary
to
enable timeout in cmdq driver.
Regards,
Chun-Kuang.
if we do not set cmdq hardware timeout, this condition will never
happen
cmdq_thread_irq_handler
if (irq_flag & CMDQ_THR_IRQ_ERROR)
err = true;
and no error callback
else if (err) {
cmdq_task_exec_done(task, -ENOEXEC);
cmdq_task_handle_error(curr_task);
kfree(task);
}
the client will never received the error callback, cmdq hardware
will
poll the event for ever and no report timeout
I think there are two way to implement the timeout mechanism. The
first way is to use the GCE hardware to detect timeout. The second
way
is that client driver use timer to detect timeout, when it's timeout,
use mbox_flush() to clean up the packets in mtk cmdq driver, and
remove the error handle in irq handler.
If you think the first way is better, I think you should pass the
timeout value from client driver to cmdq driver because each client
driver has different timeout value. And the GCE clock may be
different
in each SoC, so use clk_get_rate() to get the clock frequency for
different SoC.
Regards,
Chun-Kuang.
this patch only used for mdp instruction error and and trigger hw
timeout flow, it is for debug, i will abandon this patch and will not
send upstream anymore.