Commit 15182515 authored by Tomi Valkeinen's avatar Tomi Valkeinen

drm/tidss: Check for K2G in in dispc_softreset()

K2G doesn't have softreset feature. Instead of having every caller of
dispc_softreset() check for K2G, move the check into dispc_softreset(),
and make dispc_softreset() return 0 in case of K2G.
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarAradhya Bhatia <a-bhatia1@ti.com>
Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-6-ac91b5ea35c0@ideasonboard.comSigned-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
parent aceafbb5
......@@ -2766,6 +2766,10 @@ static int dispc_softreset(struct dispc_device *dispc)
u32 val;
int ret;
/* K2G display controller does not support soft reset */
if (dispc->feat->subrev == DISPC_K2G)
return 0;
/* Soft reset */
REG_FLD_MOD(dispc, DSS_SYSCONFIG, 1, 1, 1);
/* Wait for reset to complete */
......@@ -2888,12 +2892,9 @@ int dispc_init(struct tidss_device *tidss)
of_property_read_u32(dispc->dev->of_node, "max-memory-bandwidth",
&dispc->memory_bandwidth_limit);
/* K2G display controller does not support soft reset */
if (feat->subrev != DISPC_K2G) {
r = dispc_softreset(dispc);
if (r)
return r;
}
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