Skip to content

Commit d38ceaf

Browse files
committed
drm/amdgpu: add core driver (v4)
This adds the non-asic specific core driver code. v2: remove extra kconfig option v3: implement minor fixes from Fengguang Wu v4: fix cast in amdgpu_ucode.c Acked-by: Christian König <christian.koenig@amd.com> Acked-by: Jammy Zhou <Jammy.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 97b2e20 commit d38ceaf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+33596
-0
lines changed

drivers/gpu/drm/Kconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,27 @@ config DRM_RADEON
120120

121121
source "drivers/gpu/drm/radeon/Kconfig"
122122

123+
config DRM_AMDGPU
124+
tristate "AMD GPU"
125+
depends on DRM && PCI
126+
select FB_CFB_FILLRECT
127+
select FB_CFB_COPYAREA
128+
select FB_CFB_IMAGEBLIT
129+
select FW_LOADER
130+
select DRM_KMS_HELPER
131+
select DRM_KMS_FB_HELPER
132+
select DRM_TTM
133+
select POWER_SUPPLY
134+
select HWMON
135+
select BACKLIGHT_CLASS_DEVICE
136+
select INTERVAL_TREE
137+
help
138+
Choose this option if you have a recent AMD Radeon graphics card.
139+
140+
If M is selected, the module will be called amdgpu.
141+
142+
source "drivers/gpu/drm/amd/amdgpu/Kconfig"
143+
123144
source "drivers/gpu/drm/nouveau/Kconfig"
124145

125146
config DRM_I810

drivers/gpu/drm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ obj-$(CONFIG_DRM_TDFX) += tdfx/
3737
obj-$(CONFIG_DRM_R128) += r128/
3838
obj-$(CONFIG_HSA_AMD) += amd/amdkfd/
3939
obj-$(CONFIG_DRM_RADEON)+= radeon/
40+
obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/
4041
obj-$(CONFIG_DRM_MGA) += mga/
4142
obj-$(CONFIG_DRM_I810) += i810/
4243
obj-$(CONFIG_DRM_I915) += i915/

drivers/gpu/drm/amd/amdgpu/Kconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
config DRM_AMDGPU_CIK
2+
bool "Enable amdgpu support for CIK parts"
3+
depends on DRM_AMDGPU
4+
help
5+
Choose this option if you want to enable experimental support
6+
for CIK asics.
7+
8+
CIK is already supported in radeon. CIK support in amdgpu
9+
is for experimentation and testing.
10+
11+
config DRM_AMDGPU_USERPTR
12+
bool "Always enable userptr write support"
13+
depends on DRM_AMDGPU
14+
select MMU_NOTIFIER
15+
help
16+
This option selects CONFIG_MMU_NOTIFIER if it isn't already
17+
selected to enabled full userptr support.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# Makefile for the drm device driver. This driver provides support for the
3+
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
4+
5+
ccflags-y := -Iinclude/drm -Idrivers/gpu/drm/amd/include/asic_reg
6+
7+
amdgpu-y := amdgpu_drv.o
8+
9+
# add KMS driver
10+
amdgpu-y += amdgpu_device.o amdgpu_kms.o \
11+
amdgpu_atombios.o atombios_crtc.o amdgpu_connectors.o \
12+
atom.o amdgpu_fence.o amdgpu_ttm.o amdgpu_object.o amdgpu_gart.o \
13+
amdgpu_encoders.o amdgpu_display.o amdgpu_i2c.o \
14+
amdgpu_fb.o amdgpu_gem.o amdgpu_ring.o \
15+
amdgpu_cs.o amdgpu_bios.o amdgpu_benchmark.o amdgpu_test.o \
16+
amdgpu_pm.o atombios_dp.o amdgpu_afmt.o amdgpu_trace_points.o \
17+
atombios_encoders.o amdgpu_semaphore.o amdgpu_sa.o atombios_i2c.o \
18+
amdgpu_prime.o amdgpu_vm.o amdgpu_ib.o amdgpu_pll.o \
19+
amdgpu_ucode.o amdgpu_bo_list.o amdgpu_ctx.o amdgpu_sync.o
20+
21+
# add IH block
22+
amdgpu-y += \
23+
amdgpu_irq.o \
24+
amdgpu_ih.o
25+
26+
# add SMC block
27+
amdgpu-y += \
28+
amdgpu_dpm.o
29+
30+
# add GFX block
31+
amdgpu-y += \
32+
amdgpu_gfx.o
33+
34+
# add UVD block
35+
amdgpu-y += \
36+
amdgpu_uvd.o
37+
38+
# add VCE block
39+
amdgpu-y += \
40+
amdgpu_vce.o
41+
42+
amdgpu-$(CONFIG_COMPAT) += amdgpu_ioc32.o
43+
amdgpu-$(CONFIG_VGA_SWITCHEROO) += amdgpu_atpx_handler.o
44+
amdgpu-$(CONFIG_ACPI) += amdgpu_acpi.o
45+
amdgpu-$(CONFIG_MMU_NOTIFIER) += amdgpu_mn.o
46+
47+
obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o
48+
49+
CFLAGS_amdgpu_trace_points.o := -I$(src)

0 commit comments

Comments
 (0)