]> git.baikalelectronics.ru Git - kernel.git/commit
drm: bridge: panel: Register connector if DRM device is already registered
authorMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 19 Apr 2022 09:14:22 +0000 (11:14 +0200)
committerRobert Foss <robert.foss@linaro.org>
Tue, 19 Apr 2022 16:11:27 +0000 (18:11 +0200)
commit4b486a1a4e44a60d8139aad2c37f935a098b4136
tree093232c32014ac7e30a2c44e42e2e62046ef1e9d
parentd395975d022ce73410606a3e9abb2897fdb974f1
drm: bridge: panel: Register connector if DRM device is already registered

If panel_bridge_attach() happens after DRM device registration, the
created connector will not be registered by the DRM core anymore. Fix
this by registering it explicitly in such case.

This fixes the following issue observed on Samsung Exynos4210-based Trats
board with a DSI panel (the panel driver is registered after the Exynos DRM
component device is bound):

$ ./modetest -c -Mexynos
could not get connector 56: No such file or directory
Segmentation fault

While touching this, move the connector reset() call also under the DRM
device registered check, because otherwise it is not really needed.

Fixes: cb81ee33dff4 ("drm: bridge: panel: Reset the connector state pointer")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220419091422.4255-1-m.szyprowski@samsung.com
drivers/gpu/drm/bridge/panel.c