diff options
| author | Jordan Crouse <jcrouse@codeaurora.org> | 2016-02-25 09:16:25 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:15:52 -0700 |
| commit | 56930b9f1730d6cdaf59da6000cfe0ca71f90f15 (patch) | |
| tree | 632046dee775a570ea6391474d6aba9492631104 | |
| parent | 318be96313dcf3828b02937e5aae38e9f862acf3 (diff) | |
msm: kgsl: Update various exernal APIs for the 4.4 kernel
Make several changes to build the GPU driver for 4.4:
- Rename CONFIG_MSM to CONFIG_QCOM where applicable
- Add msm_kgsl.h to the Kbuild exports
- Remove linux/coresight_of.h (as it has been merged into
coresight.h) and remove the .owner member of the
coresight_desc struct.
- Use the new location for the sync.h file (in staging)
- Remove an unused sync function
- Move oneshot_sync.h inside of #ifdef wrappers
Signed-off-by: Jordan Crouse <jcrouse@codeauorora.org>
| -rw-r--r-- | drivers/gpu/Makefile | 1 | ||||
| -rw-r--r-- | drivers/gpu/msm/Kconfig | 29 | ||||
| -rw-r--r-- | drivers/gpu/msm/Makefile | 8 | ||||
| -rw-r--r-- | drivers/gpu/msm/adreno.c | 5 | ||||
| -rw-r--r-- | drivers/gpu/msm/adreno.h | 2 | ||||
| -rw-r--r-- | drivers/gpu/msm/adreno_coresight.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/msm/adreno_cp_parser.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/msm/kgsl_cffdump.h | 4 | ||||
| -rw-r--r-- | drivers/gpu/msm/kgsl_device.h | 2 | ||||
| -rw-r--r-- | drivers/gpu/msm/kgsl_iommu.h | 2 | ||||
| -rw-r--r-- | drivers/gpu/msm/kgsl_mmu.h | 2 | ||||
| -rw-r--r-- | drivers/gpu/msm/kgsl_sharedmem.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/msm/kgsl_sync.c | 12 | ||||
| -rw-r--r-- | drivers/gpu/msm/kgsl_sync.h | 2 | ||||
| -rw-r--r-- | drivers/video/Kconfig | 1 | ||||
| -rw-r--r-- | include/uapi/linux/Kbuild | 1 |
16 files changed, 38 insertions, 46 deletions
diff --git a/drivers/gpu/Makefile b/drivers/gpu/Makefile index e9ed439a5b65..f4ebf7783ffc 100644 --- a/drivers/gpu/Makefile +++ b/drivers/gpu/Makefile @@ -4,3 +4,4 @@ obj-$(CONFIG_TEGRA_HOST1X) += host1x/ obj-y += drm/ vga/ obj-$(CONFIG_IMX_IPUV3_CORE) += ipu-v3/ +obj-$(CONFIG_QCOM_KGSL) += msm/ diff --git a/drivers/gpu/msm/Kconfig b/drivers/gpu/msm/Kconfig index aca3ab611214..967e70f04155 100644 --- a/drivers/gpu/msm/Kconfig +++ b/drivers/gpu/msm/Kconfig @@ -1,23 +1,24 @@ -config MSM_KGSL - tristate "MSM 3D Graphics driver" +config QCOM_KGSL + tristate "Qualcomm 3D Graphics driver" default n - depends on ARCH_MSM && !ARCH_MSM7X00A && !ARCH_MSM7X25 + depends on ARCH_QCOM select GENERIC_ALLOCATOR select FW_LOADER select PM_DEVFREQ select DEVFREQ_GOV_SIMPLE_ONDEMAND select DEVFREQ_GOV_PERFORMANCE - select DEVFREQ_GOV_MSM_ADRENO_TZ - select DEVFREQ_GOV_MSM_GPUBW_MON + select DEVFREQ_GOV_QCOM_ADRENO_TZ + select DEVFREQ_GOV_QCOM_GPUBW_MON select ONESHOT_SYNC if SYNC ---help--- - 3D graphics driver. Required to use hardware accelerated - OpenGL ES 2.0 and 1.1. + 3D graphics driver for the Adreno family of GPUs from Qualcomm. + Required to use hardware accelerated OpenGL and compute on Qualcomm + targets. -config MSM_KGSL_CFF_DUMP +config QCOM_KGSL_CFF_DUMP bool "Enable KGSL Common File Format (CFF) Dump Feature [Use with caution]" default n - depends on MSM_KGSL + depends on QCOM_KGSL select RELAY ---help--- This is an analysis and diagnostic feature only, and should only be @@ -27,16 +28,16 @@ config MSM_KGSL_CFF_DUMP via 'echo 0 > /d/kgsl/cff_dump'. The log can be captured via /d/kgsl-cff/cpu[0|1]. -config MSM_KGSL_CFF_DUMP_NO_CONTEXT_MEM_DUMP +config QCOM_KGSL_CFF_DUMP_NO_CONTEXT_MEM_DUMP bool "When selected will disable KGSL CFF Dump for context switches" default n - depends on MSM_KGSL_CFF_DUMP + depends on QCOM_KGSL_CFF_DUMP ---help--- Dumping all the memory for every context switch can produce quite huge log files, to reduce this, turn this feature on. -config MSM_ADRENO_DEFAULT_GOVERNOR +config QCOM_ADRENO_DEFAULT_GOVERNOR string "devfreq governor for the adreno core" - default "msm-adreno-tz" if DEVFREQ_GOV_MSM_ADRENO_TZ + default "msm-adreno-tz" if DEVFREQ_GOV_QCOM_ADRENO_TZ default "simple_ondemand" - depends on MSM_KGSL + depends on QCOM_KGSL diff --git a/drivers/gpu/msm/Makefile b/drivers/gpu/msm/Makefile index 9ee90751b944..d6ad9829d150 100644 --- a/drivers/gpu/msm/Makefile +++ b/drivers/gpu/msm/Makefile @@ -1,4 +1,4 @@ -ccflags-y := -Iinclude/uapi/drm -Iinclude/drm -Idrivers/gpu/msm +ccflags-y := -Idrivers/staging/android msm_kgsl_core-y = \ kgsl.o \ @@ -14,7 +14,7 @@ msm_kgsl_core-y = \ kgsl_events.o msm_kgsl_core-$(CONFIG_DEBUG_FS) += kgsl_debugfs.o -msm_kgsl_core-$(CONFIG_MSM_KGSL_CFF_DUMP) += kgsl_cffdump.o +msm_kgsl_core-$(CONFIG_QCOM_KGSL_CFF_DUMP) += kgsl_cffdump.o msm_kgsl_core-$(CONFIG_SYNC) += kgsl_sync.o msm_kgsl_core-$(CONFIG_COMPAT) += kgsl_compat.o @@ -44,5 +44,5 @@ msm_adreno-$(CONFIG_COMPAT) += adreno_compat.o msm_kgsl_core-objs = $(msm_kgsl_core-y) msm_adreno-objs = $(msm_adreno-y) -obj-$(CONFIG_MSM_KGSL) += msm_kgsl_core.o -obj-$(CONFIG_MSM_KGSL) += msm_adreno.o +obj-$(CONFIG_QCOM_KGSL) += msm_kgsl_core.o +obj-$(CONFIG_QCOM_KGSL) += msm_adreno.o diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c index 5bac1f2d79e0..b74e3b54f331 100644 --- a/drivers/gpu/msm/adreno.c +++ b/drivers/gpu/msm/adreno.c @@ -16,7 +16,6 @@ #include <linux/of.h> #include <linux/of_device.h> #include <linux/delay.h> -#include <linux/of_coresight.h> #include <linux/input.h> #include <soc/qcom/scm.h> @@ -1001,7 +1000,7 @@ static int adreno_of_get_power(struct adreno_device *adreno_dev, return 0; } -#ifdef CONFIG_MSM_OCMEM +#ifdef CONFIG_QCOM_OCMEM static int adreno_ocmem_malloc(struct adreno_device *adreno_dev) { @@ -1112,7 +1111,7 @@ static int adreno_probe(struct platform_device *pdev) adreno_sysfs_init(device); - kgsl_pwrscale_init(&pdev->dev, CONFIG_MSM_ADRENO_DEFAULT_GOVERNOR); + kgsl_pwrscale_init(&pdev->dev, CONFIG_QCOM_ADRENO_DEFAULT_GOVERNOR); adreno_input_handler.private = device; diff --git a/drivers/gpu/msm/adreno.h b/drivers/gpu/msm/adreno.h index 82399db488ae..a45da5162c12 100644 --- a/drivers/gpu/msm/adreno.h +++ b/drivers/gpu/msm/adreno.h @@ -26,7 +26,7 @@ #include "a4xx_reg.h" -#ifdef CONFIG_MSM_OCMEM +#ifdef CONFIG_QCOM_OCMEM #include <soc/qcom/ocmem.h> #endif diff --git a/drivers/gpu/msm/adreno_coresight.c b/drivers/gpu/msm/adreno_coresight.c index 326f3ed0ed4d..5f351d1caa57 100644 --- a/drivers/gpu/msm/adreno_coresight.c +++ b/drivers/gpu/msm/adreno_coresight.c @@ -11,7 +11,6 @@ */ #include <linux/platform_device.h> -#include <linux/of_coresight.h> #include <linux/coresight.h> #include "adreno.h" @@ -319,7 +318,6 @@ int adreno_coresight_init(struct adreno_device *adreno_dev) desc.subtype.source_subtype = CORESIGHT_DEV_SUBTYPE_SOURCE_BUS; desc.ops = &adreno_coresight_ops; desc.dev = &device->pdev->dev; - desc.owner = THIS_MODULE; desc.groups = gpudev->coresight->groups; adreno_dev->csdev = coresight_register(&desc); diff --git a/drivers/gpu/msm/adreno_cp_parser.c b/drivers/gpu/msm/adreno_cp_parser.c index 4faf3a8319cb..4a444c27b8a4 100644 --- a/drivers/gpu/msm/adreno_cp_parser.c +++ b/drivers/gpu/msm/adreno_cp_parser.c @@ -799,13 +799,14 @@ static int adreno_cp_parse_ib2(struct kgsl_device *device, * only try to find sub objects iff this IB has * not been processed already */ - for (i = 0; i < ib_obj_list->num_objs; i++) + for (i = 0; i < ib_obj_list->num_objs; i++) { ib_obj = &(ib_obj_list->obj_list[i]); if ((SNAPSHOT_GPU_OBJECT_IB == ib_obj->snapshot_obj_type) && (gpuaddr >= ib_obj->gpuaddr) && (gpuaddr + dwords * sizeof(unsigned int) <= ib_obj->gpuaddr + ib_obj->size)) return 0; + } return adreno_ib_find_objs(device, process, gpuaddr, dwords, SNAPSHOT_GPU_OBJECT_IB, ib_obj_list, 2); diff --git a/drivers/gpu/msm/kgsl_cffdump.h b/drivers/gpu/msm/kgsl_cffdump.h index 5eb04e7ea500..315a097ba817 100644 --- a/drivers/gpu/msm/kgsl_cffdump.h +++ b/drivers/gpu/msm/kgsl_cffdump.h @@ -23,7 +23,7 @@ static inline bool kgsl_cffdump_flags_no_memzero(void) { return true; } struct kgsl_device_private; -#ifdef CONFIG_MSM_KGSL_CFF_DUMP +#ifdef CONFIG_QCOM_KGSL_CFF_DUMP #define CFF_OP_WRITE_MEM 0x0000000b @@ -179,5 +179,5 @@ static inline int kgsl_cff_dump_enable_get(void *data, u64 *val) return -ENODEV; } -#endif /* CONFIG_MSM_KGSL_CFF_DUMP */ +#endif /* CONFIG_QCOM_KGSL_CFF_DUMP */ #endif /* __KGSL_CFFDUMP_H */ diff --git a/drivers/gpu/msm/kgsl_device.h b/drivers/gpu/msm/kgsl_device.h index 8fc3fa1311b5..706de527c444 100644 --- a/drivers/gpu/msm/kgsl_device.h +++ b/drivers/gpu/msm/kgsl_device.h @@ -27,8 +27,6 @@ #include "kgsl_sharedmem.h" #include "kgsl_cmdbatch.h" -#include <linux/sync.h> - #define KGSL_TIMEOUT_NONE 0 #define KGSL_TIMEOUT_DEFAULT 0xFFFFFFFF #define KGSL_TIMEOUT_PART 50 /* 50 msec */ diff --git a/drivers/gpu/msm/kgsl_iommu.h b/drivers/gpu/msm/kgsl_iommu.h index 738c8296642a..33c1f9bd71d3 100644 --- a/drivers/gpu/msm/kgsl_iommu.h +++ b/drivers/gpu/msm/kgsl_iommu.h @@ -13,7 +13,7 @@ #ifndef __KGSL_IOMMU_H #define __KGSL_IOMMU_H -#ifdef CONFIG_MSM_IOMMU +#ifdef CONFIG_QCOM_IOMMU #include <linux/qcom_iommu.h> #endif #include <linux/of.h> diff --git a/drivers/gpu/msm/kgsl_mmu.h b/drivers/gpu/msm/kgsl_mmu.h index dc266ab9f381..c2497fed73b3 100644 --- a/drivers/gpu/msm/kgsl_mmu.h +++ b/drivers/gpu/msm/kgsl_mmu.h @@ -329,7 +329,7 @@ kgsl_mmu_pagetable_get_contextidr(struct kgsl_pagetable *pagetable) return 0; } -#ifdef CONFIG_MSM_IOMMU +#ifdef CONFIG_QCOM_IOMMU #include <linux/qcom_iommu.h> static inline bool kgsl_mmu_bus_secured(struct device *dev) { diff --git a/drivers/gpu/msm/kgsl_sharedmem.c b/drivers/gpu/msm/kgsl_sharedmem.c index 53dd3270c75b..9032035fe966 100644 --- a/drivers/gpu/msm/kgsl_sharedmem.c +++ b/drivers/gpu/msm/kgsl_sharedmem.c @@ -741,10 +741,10 @@ _kgsl_sharedmem_page_alloc(struct kgsl_memdesc *memdesc, * Don't do some of the more aggressive memory recovery * techniques for large order allocations */ - if (page_size != PAGE_SIZE) - gfp_mask |= __GFP_COMP | __GFP_NORETRY | - __GFP_NO_KSWAPD | __GFP_NOWARN; - else + if (page_size != PAGE_SIZE) { + gfp_mask |= __GFP_COMP | __GFP_NORETRY | __GFP_NOWARN; + gfp_mask &= ~__GFP_RECLAIM; + } else gfp_mask |= GFP_KERNEL; if (sharedmem_noretry_flag == true) diff --git a/drivers/gpu/msm/kgsl_sync.c b/drivers/gpu/msm/kgsl_sync.c index 401a6661f5a9..83d0f87cd869 100644 --- a/drivers/gpu/msm/kgsl_sync.c +++ b/drivers/gpu/msm/kgsl_sync.c @@ -13,7 +13,6 @@ #include <linux/err.h> #include <linux/file.h> -#include <linux/oneshot_sync.h> #include <linux/sched.h> #include <linux/slab.h> #include <linux/uaccess.h> @@ -298,14 +297,6 @@ static int kgsl_sync_fill_driver_data(struct sync_pt *sync_pt, void *data, return sizeof(kpt->timestamp); } -static void kgsl_sync_pt_log(struct sync_pt *sync_pt) -{ - struct kgsl_sync_pt *kpt = (struct kgsl_sync_pt *) sync_pt; - pr_info("-----\n"); - kgsl_context_dump(kpt->context); - pr_info("-----\n"); -} - static void kgsl_sync_timeline_release_obj(struct sync_timeline *sync_timeline) { /* @@ -324,7 +315,6 @@ static const struct sync_timeline_ops kgsl_sync_timeline_ops = { .pt_value_str = kgsl_sync_pt_value_str, .fill_driver_data = kgsl_sync_fill_driver_data, .release_obj = kgsl_sync_timeline_release_obj, - .pt_log = kgsl_sync_pt_log, }; int kgsl_sync_timeline_create(struct kgsl_context *context) @@ -442,6 +432,8 @@ int kgsl_sync_fence_async_cancel(struct kgsl_sync_fence_waiter *kwaiter) #ifdef CONFIG_ONESHOT_SYNC +#include <linux/oneshot_sync.h> + struct kgsl_syncsource { struct kref refcount; int id; diff --git a/drivers/gpu/msm/kgsl_sync.h b/drivers/gpu/msm/kgsl_sync.h index bf69ad9657c3..68b4246bad83 100644 --- a/drivers/gpu/msm/kgsl_sync.h +++ b/drivers/gpu/msm/kgsl_sync.h @@ -13,7 +13,7 @@ #ifndef __KGSL_SYNC_H #define __KGSL_SYNC_H -#include <linux/sync.h> +#include "sync.h" #include "kgsl_device.h" struct kgsl_sync_timeline { diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 35d239ebf912..7d32e2c5cc0d 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -21,6 +21,7 @@ source "drivers/gpu/vga/Kconfig" source "drivers/gpu/host1x/Kconfig" source "drivers/gpu/ipu-v3/Kconfig" +source "drivers/gpu/msm/Kconfig" source "drivers/gpu/drm/Kconfig" diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 7cc34cb88963..92971b5cbff2 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -275,6 +275,7 @@ header-y += mroute.h header-y += msdos_fs.h header-y += msg.h header-y += msm_ion.h +header-y += msm_kgsl.h header-y += msm_rmnet.h header-y += mtio.h header-y += nbd.h |
