Commit 8e11b23c authored by Douglas Anderson's avatar Douglas Anderson Committed by Neil Armstrong

drm/panel: Update TODO list item for cleaning up prepared/enabled tracking

Now that most panels have been updated not to track/double-check their
prepared/enabled state update the TODO with next steps.
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240604172305.v3.23.I104cdece7324b0c365e552a17f9883414ffaea01@changeidSigned-off-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.23.I104cdece7324b0c365e552a17f9883414ffaea01@changeid
parent 78f15847
...@@ -469,30 +469,35 @@ Contact: Thomas Zimmermann <tzimmermann@suse.de> ...@@ -469,30 +469,35 @@ Contact: Thomas Zimmermann <tzimmermann@suse.de>
Level: Starter Level: Starter
Clean up checks for already prepared/enabled in panels Remove disable/unprepare in remove/shutdown in panel-simple and panel-edp
------------------------------------------------------ -------------------------------------------------------------------------
In a whole pile of panel drivers, we have code to make the As of commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in
prepare/unprepare/enable/disable callbacks behave as no-ops if they've already drm_panel"), we have a check in the drm_panel core to make sure nobody
been called. To get some idea of the duplicated code, try:: double-calls prepare/enable/disable/unprepare. Eventually that should probably
be turned into a WARN_ON() or somehow made louder, but right now we actually
git grep 'if.*>prepared' -- drivers/gpu/drm/panel expect it to trigger and so we don't want it to be too loud.
git grep 'if.*>enabled' -- drivers/gpu/drm/panel
Specifically, that warning will trigger for panel-edp and panel-simple at
In the patch ("drm/panel: Check for already prepared/enabled in drm_panel") shutdown time because those panels hardcode a call to drm_panel_disable()
we've moved this check to the core. Now we can most definitely remove the and drm_panel_unprepare() at shutdown and remove time that they call regardless
check from the individual panels and save a pile of code. of panel state. On systems with a properly coded DRM modeset driver that
calls drm_atomic_helper_shutdown() this is pretty much guaranteed to cause
In adition to removing the check from the individual panels, it is believed the warning to fire.
that even the core shouldn't need this check and that should be considered
an error if other code ever relies on this check. The check in the core Unfortunately we can't safely remove the calls in panel-edp and panel-simple
currently prints a warning whenever something is relying on this check with until we're sure that all DRM modeset drivers that are used with those panels
dev_warn(). After a little while, we likely want to promote this to a properly call drm_atomic_helper_shutdown(). This TODO item is to validate
WARN(1) to help encourage folks not to rely on this behavior. that all DRM modeset drivers used with panel-edp and panel-simple properly
call drm_atomic_helper_shutdown() and then remove the calls to
disable/unprepare from those panels. Alternatively, this TODO item could be
removed by convincing stakeholders that those calls are fine and downgrading
the error message in drm_panel_disable() / drm_panel_unprepare() to a
debug-level message.
Contact: Douglas Anderson <dianders@chromium.org> Contact: Douglas Anderson <dianders@chromium.org>
Level: Starter/Intermediate Level: Intermediate
Transition away from using mipi_dsi_*_write_seq() Transition away from using mipi_dsi_*_write_seq()
------------------------------------------------- -------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment