From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Ruehl Subject: Re: [PATCH v2] drm/imx: Match imx-ipuv3-crtc components using device node in platform data Date: Sat, 21 May 2016 12:28:20 +0800 Message-ID: <573FE3E4.9070400@gtsys.com.hk> References: <1463576200-21151-1-git-send-email-p.zabel@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1463576200-21151-1-git-send-email-p.zabel@pengutronix.de> Sender: stable-owner@vger.kernel.org To: Philipp Zabel , dri-devel@lists.freedesktop.org Cc: David Airlie , stable@vger.kernel.org, Fabio Estevam , Marcel Ziswiler , Fabio Estevam , =?UTF-8?Q?Lothar_Wa=c3=9fmann?= , Dennis Gilmore , kernel@pengutronix.de List-Id: dri-devel@lists.freedesktop.org Hi, On Wednesday, May 18, 2016 08:56 PM, Philipp Zabel wrote: > 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. > > Cc: # 4.4.x > Fixes: 950b410dd1ab ("gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading") > Signed-off-by: Philipp Zabel > --- > Changes since v1: > - Also set the crtc->port to the of_node from platform data > --- > drivers/gpu/drm/imx/imx-drm-core.c | 8 ++++++++ > drivers/gpu/drm/imx/ipuv3-crtc.c | 2 +- > drivers/gpu/ipu-v3/ipu-common.c | 5 +++-- > include/video/imx-ipu-v3.h | 2 ++ > 4 files changed, 14 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c > index e26dcde..05229b9 100644 > --- a/drivers/gpu/drm/imx/imx-drm-core.c > +++ b/drivers/gpu/drm/imx/imx-drm-core.c > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include