[kernel/f21] Add patch to fix loading of tegra drm using device tree

Peter Robinson pbrobinson at fedoraproject.org
Mon Jul 28 09:15:14 UTC 2014


commit 4ff978841c2add7ebb691e7cb9cb01dd7cccafe9
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Mon Jul 28 10:13:52 2014 +0100

    Add patch to fix loading of tegra drm using device tree

 arm-tegra-drmdetection.patch |  111 ++++++++++++++++++++++++++++++++++++++++++
 kernel.spec                  |    6 ++
 2 files changed, 117 insertions(+), 0 deletions(-)
---
diff --git a/arm-tegra-drmdetection.patch b/arm-tegra-drmdetection.patch
new file mode 100644
index 0000000..d840405
--- /dev/null
+++ b/arm-tegra-drmdetection.patch
@@ -0,0 +1,111 @@
+From: Stephen Warren <swarren at xxxxxxxxxx>
+
+When tegra-drm.ko is built as a module, these MODULE_DEVICE_TABLEs allow
+the module to be auto-loaded since the module will match the devices
+instantiated from device tree.
+
+(Notes for stable: in 3.14+, just git rm any conflicting file, since they
+are added in later kernels. For 3.13 and below, manual merging will be
+needed)
+
+Cc: <stable at xxxxxxxxxxxxxxx>
+Signed-off-by: Stephen Warren <swarren at xxxxxxxxxx>
+---
+v2: Remove change to drm.c, since the match table there isn't used for
+probing.
+---
+ drivers/gpu/drm/tegra/dc.c    | 1 +
+ drivers/gpu/drm/tegra/dpaux.c | 1 +
+ drivers/gpu/drm/tegra/dsi.c   | 1 +
+ drivers/gpu/drm/tegra/gr2d.c  | 1 +
+ drivers/gpu/drm/tegra/gr3d.c  | 1 +
+ drivers/gpu/drm/tegra/hdmi.c  | 1 +
+ drivers/gpu/drm/tegra/sor.c   | 1 +
+ 7 files changed, 7 insertions(+)
+
+diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
+index ef40381f3909..48c3bc460eef 100644
+--- a/drivers/gpu/drm/tegra/dc.c
++++ b/drivers/gpu/drm/tegra/dc.c
+@@ -1303,6 +1303,7 @@ static const struct of_device_id tegra_dc_of_match[] = {
+ 		/* sentinel */
+ 	}
+ };
++MODULE_DEVICE_TABLE(of, tegra_dc_of_match);
+ 
+ static int tegra_dc_parse_dt(struct tegra_dc *dc)
+ {
+diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
+index 3f132e356e9c..708f783ead47 100644
+--- a/drivers/gpu/drm/tegra/dpaux.c
++++ b/drivers/gpu/drm/tegra/dpaux.c
+@@ -382,6 +382,7 @@ static const struct of_device_id tegra_dpaux_of_match[] = {
+ 	{ .compatible = "nvidia,tegra124-dpaux", },
+ 	{ },
+ };
++MODULE_DEVICE_TABLE(of, tegra_dpaux_of_match);
+ 
+ struct platform_driver tegra_dpaux_driver = {
+ 	.driver = {
+diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
+index bd56f2affa78..97c409f10456 100644
+--- a/drivers/gpu/drm/tegra/dsi.c
++++ b/drivers/gpu/drm/tegra/dsi.c
+@@ -982,6 +982,7 @@ static const struct of_device_id tegra_dsi_of_match[] = {
+ 	{ .compatible = "nvidia,tegra114-dsi", },
+ 	{ },
+ };
++MODULE_DEVICE_TABLE(of, tegra_dsi_of_match);
+ 
+ struct platform_driver tegra_dsi_driver = {
+ 	.driver = {
+diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c
+index 7c53941f2a9e..02cd3e37a6ec 100644
+--- a/drivers/gpu/drm/tegra/gr2d.c
++++ b/drivers/gpu/drm/tegra/gr2d.c
+@@ -121,6 +121,7 @@ static const struct of_device_id gr2d_match[] = {
+ 	{ .compatible = "nvidia,tegra20-gr2d" },
+ 	{ },
+ };
++MODULE_DEVICE_TABLE(of, gr2d_match);
+ 
+ static const u32 gr2d_addr_regs[] = {
+ 	GR2D_UA_BASE_ADDR,
+diff --git a/drivers/gpu/drm/tegra/gr3d.c b/drivers/gpu/drm/tegra/gr3d.c
+index 30f5ba9bd6d0..2bea2b2d204e 100644
+--- a/drivers/gpu/drm/tegra/gr3d.c
++++ b/drivers/gpu/drm/tegra/gr3d.c
+@@ -130,6 +130,7 @@ static const struct of_device_id tegra_gr3d_match[] = {
+ 	{ .compatible = "nvidia,tegra20-gr3d" },
+ 	{ }
+ };
++MODULE_DEVICE_TABLE(of, tegra_gr3d_match);
+ 
+ static const u32 gr3d_addr_regs[] = {
+ 	GR3D_IDX_ATTRIBUTE( 0),
+diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
+index a0b8d8539d07..84ea0c8b47f7 100644
+--- a/drivers/gpu/drm/tegra/hdmi.c
++++ b/drivers/gpu/drm/tegra/hdmi.c
+@@ -1370,6 +1370,7 @@ static const struct of_device_id tegra_hdmi_of_match[] = {
+ 	{ .compatible = "nvidia,tegra20-hdmi", .data = &tegra20_hdmi_config },
+ 	{ },
+ };
++MODULE_DEVICE_TABLE(of, tegra_hdmi_of_match);
+ 
+ static int tegra_hdmi_probe(struct platform_device *pdev)
+ {
+diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
+index 27c979b50111..061a5c501124 100644
+--- a/drivers/gpu/drm/tegra/sor.c
++++ b/drivers/gpu/drm/tegra/sor.c
+@@ -1455,6 +1455,7 @@ static const struct of_device_id tegra_sor_of_match[] = {
+ 	{ .compatible = "nvidia,tegra124-sor", },
+ 	{ },
+ };
++MODULE_DEVICE_TABLE(of, tegra_sor_of_match);
+ 
+ struct platform_driver tegra_sor_driver = {
+ 	.driver = {
+-- 
+1.8.1.5
diff --git a/kernel.spec b/kernel.spec
index d09ed3d..573c0ca 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -602,6 +602,8 @@ Patch15000: nowatchdog-on-virt.patch
 Patch21020: arm-tegra-usb-no-reset-linux33.patch
 Patch21021: arm-beagle.patch
 Patch21022: arm-imx6-utilite.patch
+# http://www.spinics.net/lists/linux-tegra/msg17948.html
+Patch21023: arm-tegra-drmdetection.patch
 
 #rhbz 754518
 Patch21235: scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
@@ -1243,6 +1245,7 @@ ApplyPatch 0001-lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch
 ApplyPatch arm-tegra-usb-no-reset-linux33.patch
 ApplyPatch arm-beagle.patch
 ApplyPatch arm-imx6-utilite.patch
+ApplyPatch arm-tegra-drmdetection.patch
 
 #
 # bugfixes to drivers and filesystems
@@ -2258,6 +2261,9 @@ fi
 #                                    ||----w |
 #                                    ||     ||
 %changelog
+* Mon Jul 28 2014 Peter Robinson <pbrobinson at fedoraproject.org>
+- Add patch to fix loading of tegra drm using device tree
+
 * Sat Jul 26 2014 Josh Boyer <jwboyer at fedoraproject.org> - 3.16.0-0.rc6.git3.1
 - Linux v3.16-rc6-139-g9c5502189fa0
 


More information about the scm-commits mailing list