Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd1b09b2 authored by Urvashi Agrawal's avatar Urvashi Agrawal
Browse files

msm: kgsl: Add Qualcomm GPU driver



Snapshot of the Qualcomm Adreno GPU driver (KGSL) as of msm-4.9
commit e023d014d2039d59d0999e73984ccf0cc6e60bc7 (msm: pcie:
fix PCIe L0s and L1 ASPM support).

Fixed compile errors,checkpatch issues and API changes:
	*  Rename function _copy_from_user() to kgsl_copy_from_user()
	*  Fixup vm_fault API
	*  Rename fence API to dma_fence API
	*  Stop using scm_call()
	*  Fixup header includes
	*  Fix IDR API usage
	*  Fix __mutex_owner usage

Change-Id: Ib35ff402b3b0a14a94bc2568b34be6364ef2e882
Signed-off-by: default avatarUrvashi Agrawal <urvaagra@codeaurora.org>
parent 1c1f6b15
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
Adreno bus monitor device

kgsl-busmon is a psedo device that represents a devfreq bus bandwidth
governor. If this device is present then two different governors are used
for  GPU DCVS and bus DCVS.

Required properties:
- compatible:	Must be "qcom,kgsl-busmon"
- label:	Device name used for sysfs entry.

Example:

	qcom,kgsl-busmon {
		compatible = "qcom,kgsl-busmon";
		label = "kgsl-busmon";
	};
+2 −0
Original line number Diff line number Diff line
@@ -171,6 +171,8 @@ source "drivers/vme/Kconfig"

source "drivers/pwm/Kconfig"

source "drivers/gpu/msm/Kconfig"

source "drivers/irqchip/Kconfig"

source "drivers/ipack/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -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/
+26 −0
Original line number Diff line number Diff line
config QCOM_KGSL
	tristate "Qualcomm Technologies, Inc. 3D Graphics driver"
	default n
	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_QCOM_ADRENO_TZ
	select DEVFREQ_GOV_QCOM_GPUBW_MON
	---help---
	  3D graphics driver for the Adreno family of GPUs from QTI.
	  Required to use hardware accelerated OpenGL, compute and Vulkan
	  on QTI targets. This includes power management, memory management,
	  and scheduling for the Adreno GPUs.

config QCOM_ADRENO_DEFAULT_GOVERNOR
	string "devfreq governor for the adreno core"
	default "msm-adreno-tz" if DEVFREQ_GOV_QCOM_ADRENO_TZ
	default "simple_ondemand"
	depends on QCOM_KGSL

config QCOM_KGSL_IOMMU
	bool
	default y if QCOM_KGSL && (MSM_IOMMU || ARM_SMMU)
+55 −0
Original line number Diff line number Diff line
ccflags-y := -Iinclude/linux

msm_kgsl_core-y = \
	kgsl.o \
	kgsl_trace.o \
	kgsl_drawobj.o \
	kgsl_ioctl.o \
	kgsl_sharedmem.o \
	kgsl_pwrctrl.o \
	kgsl_pwrscale.o \
	kgsl_mmu.o \
	kgsl_snapshot.o \
	kgsl_events.o \
	kgsl_pool.o \
	kgsl_gmu.o \
	kgsl_hfi.o

msm_kgsl_core-$(CONFIG_QCOM_KGSL_IOMMU) += kgsl_iommu.o
msm_kgsl_core-$(CONFIG_DEBUG_FS) += kgsl_debugfs.o
msm_kgsl_core-$(CONFIG_SYNC_FILE) += kgsl_sync.o
msm_kgsl_core-$(CONFIG_COMPAT) += kgsl_compat.o

msm_adreno-y += \
	adreno_ioctl.o \
	adreno_ringbuffer.o \
	adreno_drawctxt.o \
	adreno_dispatch.o \
	adreno_snapshot.o \
	adreno_coresight.o \
	adreno_trace.o \
	adreno_a3xx.o \
	adreno_a4xx.o \
	adreno_a5xx.o \
	adreno_a6xx.o \
	adreno_a3xx_snapshot.o \
	adreno_a4xx_snapshot.o \
	adreno_a5xx_snapshot.o \
	adreno_a6xx_snapshot.o \
	adreno_a4xx_preempt.o \
	adreno_a5xx_preempt.o \
	adreno_a6xx_preempt.o \
	adreno_sysfs.o \
	adreno.o \
	adreno_cp_parser.o \
	adreno_perfcounter.o

msm_adreno-$(CONFIG_QCOM_KGSL_IOMMU) += adreno_iommu.o
msm_adreno-$(CONFIG_DEBUG_FS) += adreno_debugfs.o adreno_profile.o
msm_adreno-$(CONFIG_COMPAT) += adreno_compat.o

msm_kgsl_core-objs = $(msm_kgsl_core-y)
msm_adreno-objs = $(msm_adreno-y)

obj-$(CONFIG_QCOM_KGSL) += msm_kgsl_core.o
obj-$(CONFIG_QCOM_KGSL) += msm_adreno.o
Loading