Commit aceafbb5 authored by Tomi Valkeinen's avatar Tomi Valkeinen

drm/tidss: Return error value from from softreset

Return an error value from dispc_softreset() so that the caller can
handle the errors.
Reviewed-by: default avatarAradhya Bhatia <a-bhatia1@ti.com>
Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-5-ac91b5ea35c0@ideasonboard.comSigned-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
parent 36d1e085
......@@ -2761,7 +2761,7 @@ static void dispc_init_errata(struct dispc_device *dispc)
}
}
static void dispc_softreset(struct dispc_device *dispc)
static int dispc_softreset(struct dispc_device *dispc)
{
u32 val;
int ret;
......@@ -2771,8 +2771,12 @@ static void dispc_softreset(struct dispc_device *dispc)
/* Wait for reset to complete */
ret = readl_poll_timeout(dispc->base_common + DSS_SYSSTATUS,
val, val & 1, 100, 5000);
if (ret)
dev_warn(dispc->dev, "failed to reset dispc\n");
if (ret) {
dev_err(dispc->dev, "failed to reset dispc\n");
return ret;
}
return 0;
}
int dispc_init(struct tidss_device *tidss)
......@@ -2885,8 +2889,11 @@ int dispc_init(struct tidss_device *tidss)
&dispc->memory_bandwidth_limit);
/* K2G display controller does not support soft reset */
if (feat->subrev != DISPC_K2G)
dispc_softreset(dispc);
if (feat->subrev != DISPC_K2G) {
r = dispc_softreset(dispc);
if (r)
return r;
}
tidss->dispc = dispc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment