drm/panel-simple: Undo enable if HPD never asserts
authorDouglas Anderson <dianders@chromium.org>
Fri, 15 Jan 2021 22:44:16 +0000 (14:44 -0800)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 11 Mar 2021 16:14:39 +0000 (17:14 +0100)
commit5e7222a3674ea7422370779884dd53aabe9e4a9d
tree1bc1ebd24060ee3d40b680e02f2ff98c6fa86913
parent429fc6f9550eb4bd2b012831bafbb64dc318ae4b
drm/panel-simple: Undo enable if HPD never asserts

If the HPD signal never asserts in panel_simple_prepare() and we
return an error, we should unset the enable GPIO and disable the
regulator to make it consistent for the caller.

At the moment I have some hardware where HPD sometimes doesn't assert.
Obviously that needs to be debugged, but this patch makes it so that
if I add a retry that I can make things work.

Fixes: 48834e6084f1 ("drm/panel-simple: Support hpd-gpios for delaying prepare()")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210115144345.v2.1.I33fcbd64ab409cfe4f9491bf449f51925a4d3281@changeid
drivers/gpu/drm/panel/panel-simple.c