-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add glenfly arise1 series GPU DRM kernel driver(V33)
- Loading branch information
brightyi
committed
Jul 23, 2024
1 parent
41e9872
commit 6c8a07e
Showing
277 changed files
with
163,698 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
config DRM_ARISE | ||
tristate "Arise DRM" | ||
default m | ||
depends on DRM | ||
select DRM_KMS_HELPER | ||
help | ||
Choose this option if you have an Glenfly Arise GPU. If M is selected | ||
the module will be called arise. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
CHIP?=E3k | ||
DRIVER_NAME?=arise | ||
PRO_DRIVER_NAME=$(DRIVER_NAME) | ||
TARGET_ARCH?=x86_64 | ||
DEBUG?=0 | ||
VIDEO_ONLY_FPGA?=0 | ||
RUN_HW_NULL?=0 | ||
HW_NULL?=0 | ||
CONFIG-GFGPU=m | ||
ifeq ("$(M)", "") | ||
CHECK_GCC_VERSION?=0 | ||
else | ||
CHECK_GCC_VERSION?=1 | ||
endif | ||
|
||
ccflags-y := -D__LINUX__ -DKERNEL_BUILD | ||
ccflags-y += -Wno-undef -Wno-unused -Wno-missing-braces -Wno-missing-attributes -Wno-overflow -Wno-missing-prototypes -Wno-missing-declarations | ||
|
||
ifeq ($(CHECK_GCC_VERSION), 1) | ||
|
||
KERNEL_UNAME?=$(shell uname -r) | ||
KERNEL_MODLIB:=/lib/modules/$(KERNEL_UNAME) | ||
KERNEL_SOURCES:=$(shell test -d $(KERNEL_MODLIB)/source && echo $(KERNEL_MODLIB)/source || echo $(KERNEL_MODLIB)/build) | ||
KERNEL_COMPILE_H=$(KERNEL_SOURCES)/include/generated/compile.h | ||
KERNEL_COMPILE_H_EXIT=$(shell if [ -f $(KERNEL_COMPILE_H) ]; then echo 1; else echo 0; fi) | ||
|
||
ifeq ($(KERNEL_COMPILE_H_EXIT), 1) | ||
|
||
KERNEL_BUILT_GCC_STRING=$(shell cat ${KERNEL_COMPILE_H} | grep LINUX_COMPILER | cut -f 2 -d '"') | ||
KERNEL_BUILT_GCC_VERSION=$(shell echo "${KERNEL_BUILT_GCC_STRING}" | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | head -n 1) | ||
ifeq ("$(KERNEL_BUILT_GCC_VERSION)", "") | ||
KERNEL_BUILT_GCC_VERSION=$(shell echo "${KERNEL_BUILT_GCC_STRING}" | grep -o '[0-9]\+\.[0-9]\+' | head -n 1) | ||
endif | ||
|
||
SYSTEM_GCC_VERSION=$(shell $(CC) -v 2>&1 | awk 'END{print}' | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | head -n 1) | ||
ifeq ("$(SYSTEM_GCC_VERSION)", "") | ||
SYSTEM_GCC_VERSION=$(shell $(CC) -v 2>&1 | awk 'END{print}' | grep -o '[0-9]\+\.[0-9]\+' | head -n 1) | ||
endif | ||
|
||
ifneq ("$(KERNEL_BUILT_GCC_VERSION)", "$(SYSTEM_GCC_VERSION)") | ||
$(warning "Kernel Built GCC Version ($(KERNEL_BUILT_GCC_VERSION)) Are Differ From System GCC Version($(SYSTEM_GCC_VERSION))!!") | ||
$(warning "System GCC Version Must Match To Kernel Built GCC Version!!") | ||
$(warning "Please Check GCC Version!!") | ||
endif | ||
|
||
else | ||
$(warning "$(KERNEL_COMPILE_H) not exist,can not do gcc version check,skip") | ||
endif | ||
|
||
endif | ||
|
||
ifeq ($(DEBUG), 1) | ||
ccflags-y += -ggdb3 -O2 -D_DEBUG_ -DGF_TRACE_EVENT=1 | ||
else | ||
ccflags-y += -O2 -fno-strict-aliasing -fno-stack-protector -DGF_TRACE_EVENT=1 | ||
endif | ||
|
||
ifeq ($(VIDEO_ONLY_FPGA), 1) | ||
ccflags-y += -DVIDEO_ONLY_FPGA | ||
endif | ||
|
||
ifeq ($(RUN_HW_NULL), 1) | ||
ccflags-y += -DGF_HW_NULL | ||
else | ||
ccflags-y += -DGF_PCIE_BUS | ||
endif | ||
|
||
ccflags-y += -I$(src) | ||
|
||
ifeq ("$(M)", "") | ||
ifeq ("$(O)", "") | ||
GFGPU_FULL_PATH=$(src) | ||
else | ||
GFGPU_FULL_PATH=$(srctree)/$(src) | ||
endif | ||
else | ||
GFGPU_FULL_PATH=$(src) | ||
endif | ||
|
||
include $(GFGPU_FULL_PATH)/core/Makefile | ||
include $(GFGPU_FULL_PATH)/cbios/cbios.mk | ||
include $(GFGPU_FULL_PATH)/linux/Makefile | ||
obj-$(CONFIG_DRM_ARISE) := $(PRO_DRIVER_NAME).o |
Oops, something went wrong.