From: Philipp Zabel
Date: Thu, 12 May 2016 13:00:44 +0000 (+0200)
Subject: drm/imx: Match imx-ipuv3-crtc components using device node in platform data
X-Git-Tag: v4.4.13~17
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=137bd12493e76f610aa56cee1e63e70b3707f6d8;p=users%2Fdwmw2%2Flinux.git
drm/imx: Match imx-ipuv3-crtc components using device node in platform data
commit 310944d148e3600dcff8b346bee7fa01d34903b1 upstream.
The component master driver imx-drm-core matches component devices using
their of_node. Since commit 950b410dd1ab ("gpu: ipu-v3: Fix imx-ipuv3-crtc
module autoloading"), the imx-ipuv3-crtc dev->of_node is not set during
probing. Before that, of_node was set and caused an of: modalias to be
used instead of the platform: modalias, which broke module autoloading.
On the other hand, if dev->of_node is not set yet when the imx-ipuv3-crtc
probe function calls component_add, component matching in imx-drm-core
fails. While dev->of_node will be set once the next component tries to
bring up the component master, imx-drm-core component binding will never
succeed if one of the crtc devices is probed last.
Add of_node to the component platform data and match against the
pdata->of_node instead of dev->of_node in imx-drm-core to work around
this problem.
Fixes: 950b410dd1ab ("gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading")
Signed-off-by: Philipp Zabel
Tested-by: Fabio Estevam
Tested-by: Lothar Waßmann
Tested-by: Heiko Schocher
Tested-by: Chris Ruehl
Signed-off-by: Greg Kroah-Hartman
---
diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c
index 7b990b4e96d23..5378bdc3bbf9f 100644
--- a/drivers/gpu/drm/imx/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/imx-drm-core.c
@@ -26,6 +26,7 @@
#include
#include
#include
+#include