drm/bridge: panel: move prepare_prev_first handling to drm_panel_bridge_add_typed
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 20 Feb 2025 15:07:26 +0000 (17:07 +0200)
committerNeil Armstrong <neil.armstrong@linaro.org>
Mon, 30 Jun 2025 15:42:32 +0000 (17:42 +0200)
commiteb028cd884e1b0976ff8c5944ee6650fe3ed0a6c
treeda92b77c2d0341b2ce339aa87445fd70d8dd26fe
parent97e000acf2e20a86a50a0ec8c2739f0846f37509
drm/bridge: panel: move prepare_prev_first handling to drm_panel_bridge_add_typed

The commit 5ea6b1702781 ("drm/panel: Add prepare_prev_first flag to
drm_panel") and commit 0974687a19c3 ("drm/bridge: panel: Set
pre_enable_prev_first from drmm_panel_bridge_add") added handling of
panel's prepare_prev_first to devm_panel_bridge_add() and
drmm_panel_bridge_add(). However if the driver calls
drm_panel_bridge_add_typed() directly, then the flag won't be handled
and thus the drm_bridge.pre_enable_prev_first will not be set.

Move prepare_prev_first handling to the drm_panel_bridge_add_typed() so
that there is no way to miss the flag.

Fixes: 5ea6b1702781 ("drm/panel: Add prepare_prev_first flag to drm_panel")
Fixes: 0974687a19c3 ("drm/bridge: panel: Set pre_enable_prev_first from drmm_panel_bridge_add")
Reported-by: Svyatoslav Ryhel <clamor95@gmail.com>
Closes: https://lore.kernel.org/dri-devel/CAPVz0n3YZass3Bns1m0XrFxtAC0DKbEPiW6vXimQx97G243sXw@mail.gmail.com/
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250220-panel_prev_first-v1-1-b9e787825a1a@linaro.org
drivers/gpu/drm/bridge/panel.c