drm/panel: otm8009a: Don't double check prepared/enabled
authorDouglas Anderson <dianders@chromium.org>
Fri, 4 Aug 2023 21:06:06 +0000 (14:06 -0700)
committerDouglas Anderson <dianders@chromium.org>
Wed, 13 Sep 2023 15:36:18 +0000 (08:36 -0700)
commit1e0465eb16a4f288a1b77b72af2f294c709ecf22
tree4b06c0f68933a00bee8f814e64bfcc506bb4a4ed
parentd43f0fe153dcb963374cd5b1256ec14287f951e4
drm/panel: otm8009a: Don't double check prepared/enabled

As talked about in commit d2aacaf07395 ("drm/panel: Check for already
prepared/enabled in drm_panel"), we want to remove needless code from
panel drivers that was storing and double-checking the
prepared/enabled state. Even if someone was relying on the
double-check before, that double-check is now in the core and not
needed in individual drivers.

For the "otm8009a" driver we fully remove the storing of the "enabled"
state and we remove the double-checking, but we still keep the storing
of the "prepared" state since the backlight code in the driver checks
it. This backlight code may not be perfectly safe since there doesn't
appear to be sufficient synchronization between the backlight driver
(which userspace can call into directly) and the code that's
unpreparing the panel. However, this lack of safety is not new and can
be addressed in a future patch.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230804140605.RFC.3.I6a4a3c81c78acf5acdc2e5b5d936e19bf57ec07a@changeid
drivers/gpu/drm/panel/panel-orisetech-otm8009a.c