Skip to content

Commit

Permalink
drm/tidss: Check for K2G in in dispc_softreset()
Browse files Browse the repository at this point in the history
[ Upstream commit 1518251 ]

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: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.com>
Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-6-ac91b5ea35c0@ideasonboard.com
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Stable-dep-of: bc288a9 ("drm/tidss: Fix dss reset")
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tomba authored and gregkh committed Jan 25, 2024
1 parent 4fcfe75 commit 11e2dc2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions drivers/gpu/drm/tidss/tidss_dispc.c
Expand Up @@ -2707,6 +2707,10 @@ static int dispc_softreset(struct dispc_device *dispc)
u32 val;
int ret = 0;

/* 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 */
Expand Down Expand Up @@ -2829,12 +2833,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;

Expand Down

0 comments on commit 11e2dc2

Please sign in to comment.