mirror of
https://github.com/torvalds/linux.git
synced 2026-11-10 17:11:02 +01:00
media: mali-c55: fail power-on when safe stop times out
The power-on path requests safe stop to establish a non-streaming state but
ignores the polling result and publishes runtime resume success.
Power the block back off and propagate a safe-stop timeout.
Fixes: d5f281f3dd ("media: mali-c55: Add Mali-C55 ISP driver")
Cc: stable@vger.kernel.org
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
43ba38e1e0
commit
73d3d5c97c
|
|
@ -730,8 +730,13 @@ static int __mali_c55_power_on(struct mali_c55 *mali_c55)
|
|||
/* Set safe stop to ensure we're in a non-streaming state */
|
||||
mali_c55_write(mali_c55, MALI_C55_REG_INPUT_MODE_REQUEST,
|
||||
MALI_C55_INPUT_SAFE_STOP);
|
||||
readl_poll_timeout(mali_c55->base + MALI_C55_REG_MODE_STATUS,
|
||||
val, !val, 10 * USEC_PER_MSEC, 250 * USEC_PER_MSEC);
|
||||
ret = readl_poll_timeout(mali_c55->base + MALI_C55_REG_MODE_STATUS,
|
||||
val, !val, 10 * USEC_PER_MSEC, 250 * USEC_PER_MSEC);
|
||||
if (ret) {
|
||||
dev_err(mali_c55->dev, "safe stop timed out\n");
|
||||
__mali_c55_power_off(mali_c55);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user