* [PATCH] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading
@ 2016-04-27 8:29 Philipp Zabel
2016-04-27 13:54 ` Dennis Gilmore
0 siblings, 1 reply; 3+ messages in thread
From: Philipp Zabel @ 2016-04-27 8:29 UTC (permalink / raw)
To: dri-devel; +Cc: Dennis Gilmore, Russell King, Uwe Kleine-König
If of_node is set before calling platform_device_add, the driver core
will try to use of: modalias matching, which fails because the device
tree nodes don't have a compatible property set. This patch fixes
imx-ipuv3-crtc module autoloading by setting the of_node property only
after the platform modalias is set.
Fixes: 304e6be652e2 ("gpu: ipu-v3: Assign of_node of child platform devices to corresponding ports")
Reported-by: Dennis Gilmore <dennis@ausil.us>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/gpu/ipu-v3/ipu-common.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index e00db3f..abb98c7 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -1068,7 +1068,6 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
goto err_register;
}
- pdev->dev.of_node = of_node;
pdev->dev.parent = dev;
ret = platform_device_add_data(pdev, ®->pdata,
@@ -1079,6 +1078,12 @@ static int ipu_add_client_devices(struct ipu_soc *ipu, unsigned long ipu_base)
platform_device_put(pdev);
goto err_register;
}
+
+ /*
+ * Set of_node only after calling platform_device_add. Otherwise
+ * the platform:imx-ipuv3-crtc modalias won't be used.
+ */
+ pdev->dev.of_node = of_node;
}
return 0;
--
2.8.0.rc3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading
2016-04-27 8:29 [PATCH] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading Philipp Zabel
@ 2016-04-27 13:54 ` Dennis Gilmore
2016-04-27 14:10 ` Philipp Zabel
0 siblings, 1 reply; 3+ messages in thread
From: Dennis Gilmore @ 2016-04-27 13:54 UTC (permalink / raw)
To: Philipp Zabel; +Cc: Russell King, dri-devel, Uwe Kleine-König
Thanks Philipp,
I tested and module loading worked correctly
Dennis
On 2016-04-27 03:29, Philipp Zabel wrote:
> If of_node is set before calling platform_device_add, the driver core
> will try to use of: modalias matching, which fails because the device
> tree nodes don't have a compatible property set. This patch fixes
> imx-ipuv3-crtc module autoloading by setting the of_node property only
> after the platform modalias is set.
>
> Fixes: 304e6be652e2 ("gpu: ipu-v3: Assign of_node of child platform
> devices to corresponding ports")
> Reported-by: Dennis Gilmore <dennis@ausil.us>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-By: Dennis Gilmore <dennis@ausil.us>
> ---
> drivers/gpu/ipu-v3/ipu-common.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/ipu-v3/ipu-common.c
> b/drivers/gpu/ipu-v3/ipu-common.c
> index e00db3f..abb98c7 100644
> --- a/drivers/gpu/ipu-v3/ipu-common.c
> +++ b/drivers/gpu/ipu-v3/ipu-common.c
> @@ -1068,7 +1068,6 @@ static int ipu_add_client_devices(struct ipu_soc
> *ipu, unsigned long ipu_base)
> goto err_register;
> }
>
> - pdev->dev.of_node = of_node;
> pdev->dev.parent = dev;
>
> ret = platform_device_add_data(pdev, ®->pdata,
> @@ -1079,6 +1078,12 @@ static int ipu_add_client_devices(struct
> ipu_soc *ipu, unsigned long ipu_base)
> platform_device_put(pdev);
> goto err_register;
> }
> +
> + /*
> + * Set of_node only after calling platform_device_add. Otherwise
> + * the platform:imx-ipuv3-crtc modalias won't be used.
> + */
> + pdev->dev.of_node = of_node;
> }
>
> return 0;
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading
2016-04-27 13:54 ` Dennis Gilmore
@ 2016-04-27 14:10 ` Philipp Zabel
0 siblings, 0 replies; 3+ messages in thread
From: Philipp Zabel @ 2016-04-27 14:10 UTC (permalink / raw)
To: Dennis Gilmore; +Cc: Russell King, dri-devel, Uwe Kleine-König
Am Mittwoch, den 27.04.2016, 08:54 -0500 schrieb Dennis Gilmore:
> Thanks Philipp,
>
> I tested and module loading worked correctly
>
> Dennis
>
> On 2016-04-27 03:29, Philipp Zabel wrote:
> > If of_node is set before calling platform_device_add, the driver core
> > will try to use of: modalias matching, which fails because the device
> > tree nodes don't have a compatible property set. This patch fixes
> > imx-ipuv3-crtc module autoloading by setting the of_node property only
> > after the platform modalias is set.
> >
> > Fixes: 304e6be652e2 ("gpu: ipu-v3: Assign of_node of child platform
> > devices to corresponding ports")
> > Reported-by: Dennis Gilmore <dennis@ausil.us>
> > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> Tested-By: Dennis Gilmore <dennis@ausil.us>
Thank you.
regards
Philipp
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-27 14:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-27 8:29 [PATCH] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading Philipp Zabel
2016-04-27 13:54 ` Dennis Gilmore
2016-04-27 14:10 ` Philipp Zabel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.