Skip to contentSkip to conversation

drm/sun4i: tcon: Unconditionally reset the TCON

PATCH Applied Chen-Yu Tsai 2 participants 2 messages Sep 8, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/sun4i: tcon: Unconditionally reset the TCON

When binding the TCON, we were checking the reset control status and asserting reset if it wasn't in reset. The check failed to account for the reset control API returning error codes if the status callback was not implemented.

Since we want the TCON to be reset in all cases, use reset_control_reset to force a reset instead.

Fixes 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support")

---

Changes since v1:

- Replaced reset_control_assert / reset_control_deassert sequence with reset_control_reset, which conveys our intent more clearly

---
 drivers/gpu/drm/sun4i/sun4i_tcon.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/drm/sun4i/sun4i_tcon.c +1 -4
index d9791292553e..36cf1a0acc65 100644
@@ -530,10 +530,7 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
 	}
 
 	/* Make sure our TCON is reset */
-	if (!reset_control_status(tcon->lcd_rst))
-		reset_control_assert(tcon->lcd_rst);
-
-	ret = reset_control_deassert(tcon->lcd_rst);
+	ret = reset_control_reset(tcon->lcd_rst);
 	if (ret) {
 		dev_err(dev, "Couldn't deassert our reset line\n");
 		return ret;
Signature · 6 lines
2.14.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 10 lines · Chen-Yu Tsai

When binding the TCON, we were checking the reset control status and asserting reset if it wasn't in reset. The check failed to account for the reset control API returning error codes if the status callback was not implemented.

Since we want the TCON to be reset in all cases, use reset_control_reset to force a reset instead.

Fixes 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support")

Applied, thanks!
Maxime

Signature · 3 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel