Browse Source

disp: msm: import DMA_BUF module symbols

This change imports the necessary DMA_BUF symbols from the module
as they are now contained within the module namespace.

Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/#24477195

Change-Id: I18a0a812567425d55fedbab67f7a42d3f54351ca
Signed-off-by: GG Hou <[email protected]>
Signed-off-by: Nilaan Gunabalachandran <[email protected]>
GG Hou 2 years ago
parent
commit
5624dc5b2e

+ 5 - 0
msm/msm_gem.c

@@ -23,6 +23,7 @@
 #include <linux/dma-buf.h>
 #include <linux/dma-buf.h>
 #include <linux/pfn_t.h>
 #include <linux/pfn_t.h>
 #include <linux/version.h>
 #include <linux/version.h>
+#include <linux/module.h>
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
 #include <linux/ion.h>
 #include <linux/ion.h>
 #endif
 #endif
@@ -1373,3 +1374,7 @@ exit:
 
 
 	return ret;
 	return ret;
 }
 }
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))
+MODULE_IMPORT_NS(DMA_BUF);
+#endif

+ 6 - 0
msm/msm_gem_prime.c

@@ -1,4 +1,5 @@
 /*
 /*
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
  * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
  * Copyright (C) 2013 Red Hat
  * Copyright (C) 2013 Red Hat
  * Author: Rob Clark <[email protected]>
  * Author: Rob Clark <[email protected]>
@@ -20,6 +21,7 @@
 #include "msm_gem.h"
 #include "msm_gem.h"
 #include "msm_mmu.h"
 #include "msm_mmu.h"
 #include "msm_kms.h"
 #include "msm_kms.h"
+#include <linux/module.h>
 
 
 #include <drm/drm_drv.h>
 #include <drm/drm_drv.h>
 
 
@@ -210,3 +212,7 @@ fail_put:
 
 
 	return ERR_PTR(ret);
 	return ERR_PTR(ret);
 }
 }
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))
+MODULE_IMPORT_NS(DMA_BUF);
+#endif

+ 3 - 0
msm/msm_smmu.c

@@ -617,3 +617,6 @@ void __exit msm_smmu_driver_cleanup(void)
 
 
 MODULE_LICENSE("GPL v2");
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("MSM SMMU driver");
 MODULE_DESCRIPTION("MSM SMMU driver");
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))
+MODULE_IMPORT_NS(DMA_BUF);
+#endif

+ 5 - 0
rotator/sde_rotator_dev.c

@@ -15,6 +15,7 @@
 #include <linux/wait.h>
 #include <linux/wait.h>
 #include <linux/of.h>
 #include <linux/of.h>
 #include <linux/dma-mapping.h>
 #include <linux/dma-mapping.h>
+#include <linux/module.h>
 #include <media/v4l2-ioctl.h>
 #include <media/v4l2-ioctl.h>
 #include <media/v4l2-event.h>
 #include <media/v4l2-event.h>
 #include <media/videobuf2-v4l2.h>
 #include <media/videobuf2-v4l2.h>
@@ -3622,3 +3623,7 @@ void sde_rotator_unregister(void)
 {
 {
 	platform_driver_unregister(&rotator_driver);
 	platform_driver_unregister(&rotator_driver);
 }
 }
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))
+MODULE_IMPORT_NS(DMA_BUF);
+#endif

+ 5 - 0
rotator/sde_rotator_r3.c

@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 // SPDX-License-Identifier: GPL-2.0-only
 /*
 /*
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
  * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
  */
  */
 
 
@@ -4094,3 +4095,7 @@ error_hw_rev_init:
 error_parse_dt:
 error_parse_dt:
 	return ret;
 	return ret;
 }
 }
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))
+MODULE_IMPORT_NS(DMA_BUF);
+#endif

+ 5 - 0
rotator/sde_rotator_smmu.c

@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 // SPDX-License-Identifier: GPL-2.0-only
 /*
 /*
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
  * Copyright (c) 2015-2021, The Linux Foundation. All rights reserved.
  */
  */
 
 
@@ -680,3 +681,7 @@ void sde_rotator_smmu_driver_unregister(void)
 {
 {
 	platform_driver_unregister(&sde_smmu_driver);
 	platform_driver_unregister(&sde_smmu_driver);
 }
 }
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))
+MODULE_IMPORT_NS(DMA_BUF);
+#endif

+ 6 - 0
rotator/sde_rotator_util.c

@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 // SPDX-License-Identifier: GPL-2.0-only
 /*
 /*
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  * Copyright (c) 2012, 2015-2019, 2021, The Linux Foundation. All rights reserved.
  * Copyright (c) 2012, 2015-2019, 2021, The Linux Foundation. All rights reserved.
  */
  */
 #define pr_fmt(fmt)	"%s: " fmt, __func__
 #define pr_fmt(fmt)	"%s: " fmt, __func__
@@ -20,6 +21,7 @@
 #include <linux/io.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
 #include <linux/iopoll.h>
 #include <linux/regulator/consumer.h>
 #include <linux/regulator/consumer.h>
+#include <linux/module.h>
 #include <media/msm_media_info.h>
 #include <media/msm_media_info.h>
 #include <linux/videodev2.h>
 #include <linux/videodev2.h>
 #include <linux/ion.h>
 #include <linux/ion.h>
@@ -1226,3 +1228,7 @@ struct dma_buf *sde_rot_get_dmabuf(struct sde_mdp_img_data *data)
 
 
 	return dma_buf_export(&exp_info);
 	return dma_buf_export(&exp_info);
 }
 }
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0))
+MODULE_IMPORT_NS(DMA_BUF);
+#endif