[PATCH 06/10] drm/tidss: Check for K2G in in dispc_softreset()
Tomi Valkeinen
tomi.valkeinen at ideasonboard.com
Wed Nov 1 09:17:43 UTC 2023
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.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ideasonboard.com>
---
drivers/gpu/drm/tidss/tidss_dispc.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c
index cdbb88289082..f204a0701e9f 100644
--- a/drivers/gpu/drm/tidss/tidss_dispc.c
+++ b/drivers/gpu/drm/tidss/tidss_dispc.c
@@ -2707,6 +2707,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 */
@@ -2831,12 +2835,9 @@ int dispc_init(struct tidss_device *tidss)
tidss->dispc = dispc;
- /* 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;
return 0;
}
--
2.34.1
More information about the dri-devel
mailing list