drm/bridge: panel: Add a device link between drm device and panel device
authorLiu Ying <victor.liu@nxp.com>
Mon, 7 Aug 2023 06:11:15 +0000 (14:11 +0800)
committerNeil Armstrong <neil.armstrong@linaro.org>
Mon, 14 Aug 2023 12:41:18 +0000 (14:41 +0200)
commit199cf07ebd2b0d41185ac79b895547d45610b681
treeb2bcb2aa63d64a725c123df1f0bc9933852d9f2e
parent4d49d87b3606369c6e29b9d051892ee1a6fc4e75
drm/bridge: panel: Add a device link between drm device and panel device

Add the device link when panel bridge is attached and delete the link
when panel bridge is detached.  The drm device is the consumer while
the panel device is the supplier.  This makes sure that the drm device
suspends eariler and resumes later than the panel device, hence resolves
problems where the order is reversed, like the problematic case mentioned
in the below link.

Link: https://lore.kernel.org/lkml/CAPDyKFr0XjrU_udKoUKQ_q8RWaUkyqL+8fV-7s1CTMqi7u3-Rg@mail.gmail.com/T/
Suggested-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807061115.3244501-1-victor.liu@nxp.com
drivers/gpu/drm/bridge/panel.c