Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odroidc 3.10.y #99

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/arm/configs/odroidc_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4366,7 +4366,7 @@ CONFIG_AVERAGE=y
CONFIG_OID_REGISTRY=m
# CONFIG_VIRTUALIZATION is not set
CONFIG_BACKPORT_INTEGRATE=y
CONFIG_BACKPORT_DIR="backports/"
CONFIG_BACKPORT_DIR="backports"
CONFIG_BACKPORT_VERSION="backports-20150129-0-gdd4a670"
CONFIG_BACKPORT_KERNEL_VERSION="next-20150129-0-g828f79f"
CONFIG_BACKPORT_KERNEL_NAME="Linux"
Expand Down
7 changes: 6 additions & 1 deletion backports/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ NOSTDINC_FLAGS := \

export backport_srctree = $(M)
else
export BACKPORT_DIR = backports/
ifneq ($(KBUILD_SRC),)
ifneq ($(wildcard $(KBUILD_SRC)/$(src)),)
TOP_KBUILD_SRC := $(KBUILD_SRC)/
endif
endif
export BACKPORT_DIR = $(TOP_KBUILD_SRC)backports
export backport_srctree = $(BACKPORT_DIR)
NOSTDINC_FLAGS := \
-I$(BACKPORT_DIR)/backport-include/ \
Expand Down
34 changes: 20 additions & 14 deletions drivers/gpu/arm/mali/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ MALI_PP_SCHEDULER_FORCE_NO_JOB_OVERLAP_BETWEEN_APPS ?= 0
MALI_UPPER_HALF_SCHEDULING ?= 1
MALI_ENABLE_CPU_CYCLES ?= 0

ifneq ($(KBUILD_SRC),)
ifneq ($(wildcard $(KBUILD_SRC)/$(src)),)
TOP_KBUILD_SRC := $(KBUILD_SRC)/
endif
endif

# For customer releases the Linux Device Drivers will be provided as ARM proprietary and GPL releases:
# The ARM proprietary product will only include the license/proprietary directory
# The GPL product will only include the license/gpl directory
ifeq ($(wildcard $(src)/linux/license/gpl/*),)
ccflags-y += -I$(src)/linux/license/proprietary
ifeq ($(wildcard $(TOP_KBUILD_SRC)$(src)/linux/license/gpl/*),)
ccflags-y += -I$(TOP_KBUILD_SRC)$(src)/linux/license/proprietary
ifeq ($(CONFIG_MALI400_PROFILING),y)
$(error Profiling is incompatible with non-GPL license)
endif
Expand All @@ -39,7 +45,7 @@ ifeq ($(wildcard $(src)/linux/license/gpl/*),)
endif
$(error Linux Device integration is incompatible with non-GPL license)
else
ccflags-y += -I$(src)/linux/license/gpl
ccflags-y += -I$(TOP_KBUILD_SRC)$(src)/linux/license/gpl
endif

ifeq ($(USING_GPU_UTILIZATION), 1)
Expand Down Expand Up @@ -123,7 +129,7 @@ mali-y += \
platform/meson_m450/platform_m8b.o

ccflags-$(CONFIG_SYNC) += -Idrivers/staging/android
ccflags-y += -I$(src)/../../../../include/ump
ccflags-y += -I$(TOP_KBUILD_SRC)$(src)/../../../../include/ump

ifneq ($(MALI_PLATFORM_FILES),)
mali-y += $(MALI_PLATFORM_FILES:.c=.o)
Expand All @@ -133,7 +139,7 @@ mali-$(CONFIG_MALI400_PROFILING) += linux/mali_ukk_profiling.o
mali-$(CONFIG_MALI400_PROFILING) += linux/mali_osk_profiling.o

mali-$(CONFIG_MALI400_INTERNAL_PROFILING) += linux/mali_profiling_internal.o timestamp-$(TIMESTAMP)/mali_timestamp.o
ccflags-$(CONFIG_MALI400_INTERNAL_PROFILING) += -I$(src)/timestamp-$(TIMESTAMP)
ccflags-$(CONFIG_MALI400_INTERNAL_PROFILING) += -I$(TOP_KBUILD_SRC)$(src)/timestamp-$(TIMESTAMP)

mali-$(CONFIG_DMA_SHARED_BUFFER) += linux/mali_memory_dma_buf.o
mali-$(CONFIG_SYNC) += linux/mali_sync.o
Expand Down Expand Up @@ -161,16 +167,16 @@ ifeq ($(MALI_UPPER_HALF_SCHEDULING),1)
ccflags-y += -DMALI_UPPER_HALF_SCHEDULING
endif

ccflags-$(CONFIG_MALI400_UMP) += -I$(src)/../../ump/include/ump
ccflags-$(CONFIG_MALI400_UMP) += -I$(TOP_KBUILD_SRC)$(src)/../../ump/include/ump
ccflags-$(CONFIG_MALI400_DEBUG) += -DDEBUG

# Use our defines when compiling
ccflags-y += -I$(src) -I$(src)/include -I$(src)/common -I$(src)/linux -I$(src)/platform
ccflags-y += -I$(TOP_KBUILD_SRC)$(src) -I$(TOP_KBUILD_SRC)$(src)/include -I$(TOP_KBUILD_SRC)$(src)/common -I$(TOP_KBUILD_SRC)$(src)/linux -I$(TOP_KBUILD_SRC)$(src)/platform

# Get subversion revision number, fall back to only ${MALI_RELEASE_NAME} if no svn info is available
MALI_RELEASE_NAME=$(shell cat $(src)/.version 2> /dev/null)
MALI_RELEASE_NAME=$(shell cat $(TOP_KBUILD_SRC)$(src)/.version 2> /dev/null)

SVN_INFO = (cd $(src); svn info 2>/dev/null)
SVN_INFO = (cd $$(TOP_KBUILD_SRC)(src); svn info 2>/dev/null)

ifneq ($(shell $(SVN_INFO) 2>/dev/null),)
# SVN detected
Expand All @@ -181,13 +187,13 @@ CHANGED_REVISION := $(shell $(SVN_INFO) | grep '^Last Changed Rev: ' | cut -d: -
REPO_URL := $(shell $(SVN_INFO) | grep '^URL: ' | cut -d: -f2- | cut -b2-)

else # SVN
GIT_REV := $(shell cd $(src); git describe --always 2>/dev/null)
GIT_REV := $(shell cd $(TOP_KBUILD_SRC)$(src); git describe --always 2>/dev/null)
ifneq ($(GIT_REV),)
# Git detected
DRIVER_REV := $(MALI_RELEASE_NAME)-$(GIT_REV)
CHANGE_DATE := $(shell cd $(src); git log -1 --format="%ci")
CHANGE_DATE := $(shell cd $(TOP_KBUILD_SRC)$(src); git log -1 --format="%ci")
CHANGED_REVISION := $(GIT_REV)
REPO_URL := $(shell cd $(src); git describe --all --always 2>/dev/null)
REPO_URL := $(shell cd $(TOP_KBUILD_SRC)$(src); git describe --all --always 2>/dev/null)

else # Git
# No Git or SVN detected
Expand All @@ -200,7 +206,7 @@ endif
ccflags-y += -DSVN_REV_STRING=\"$(DRIVER_REV)\"

VERSION_STRINGS :=
VERSION_STRINGS += API_VERSION=$(shell cd $(src); grep "\#define _MALI_API_VERSION" $(FILES_PREFIX)include/linux/mali/mali_utgard_uk_types.h | cut -d' ' -f 3 )
VERSION_STRINGS += API_VERSION=$(shell cd $(TOP_KBUILD_SRC)$(src); grep "\#define _MALI_API_VERSION" $(FILES_PREFIX)include/linux/mali/mali_utgard_uk_types.h | cut -d' ' -f 3 )
VERSION_STRINGS += REPO_URL=$(REPO_URL)
VERSION_STRINGS += REVISION=$(DRIVER_REV)
VERSION_STRINGS += CHANGED_REVISION=$(CHANGED_REVISION)
Expand All @@ -224,5 +230,5 @@ VERSION_STRINGS += USING_DVFS=$(CONFIG_MALI_DVFS)
VERSION_STRINGS += MALI_UPPER_HALF_SCHEDULING=$(MALI_UPPER_HALF_SCHEDULING)

# Create file with Mali driver configuration
$(src)/__malidrv_build_info.c:
$(TOP_KBUILD_SRC)$(src)/__malidrv_build_info.c:
@echo 'const char *__malidrv_build_info(void) { return "malidrv: $(VERSION_STRINGS)";}' > $(src)/__malidrv_build_info.c
32 changes: 19 additions & 13 deletions drivers/gpu/arm/ump/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,27 @@
# Change this to use a different config.h
CONFIG ?= default

ifneq ($(KBUILD_SRC),)
ifneq ($(wildcard $(KBUILD_SRC)/$(src)),)
TOP_KBUILD_SRC := $(KBUILD_SRC)/
endif
endif

# Validate selected config
ifneq ($(shell [ -d $(src)/arch-$(CONFIG) ] && [ -f $(src)/arch-$(CONFIG)/config.h ] && echo "OK"), OK)
$(warning Current directory is $(src))
ifneq ($(shell [ -d $(TOP_KBUILD_SRC)$(src)/arch-$(CONFIG) ] && [ -f $(TOP_KBUILD_SRC)$(src)/arch-$(CONFIG)/config.h ] && echo "OK"), OK)
$(warning Current directory is $(TOP_KBUILD_SRC)$(src))
$(error No configuration found for config $(CONFIG). Check that arch-$(CONFIG)/config.h exists)
else
# Link arch to the selected arch-config directory
$(shell [ -L $(src)/arch ] && rm $(src)/arch)
$(shell ln -sf arch-$(CONFIG) $(src)/arch)
$(shell touch $(src)/arch/config.h)
$(shell [ -L $(TOP_KBUILD_SRC)$(src)/arch ] && rm $(TOP_KBUILD_SRC)$(src)/arch)
$(shell ln -sf arch-$(CONFIG) $(TOP_KBUILD_SRC)$(src)/arch)
$(shell touch $(TOP_KBUILD_SRC)$(src)/arch/config.h)
endif

UDD_FILE_PREFIX = ../mali/

# Get subversion revision number, fall back to 0000 if no svn info is available
SVN_INFO = (cd $(src); svn info 2>/dev/null)
SVN_INFO = (cd $(TOP_KBUILD_SRC)$(src); svn info 2>/dev/null)

ifneq ($(shell $(SVN_INFO) 2>/dev/null),)
# SVN detected
Expand All @@ -37,13 +43,13 @@ CHANGED_REVISION := $(shell $(SVN_INFO) | grep '^Last Changed Rev: ' | cut -d: -
REPO_URL := $(shell $(SVN_INFO) | grep '^URL: ' | cut -d: -f2- | cut -b2-)

else # SVN
GIT_REV := $(shell cd $(src); git describe --always 2>/dev/null)
GIT_REV := $(shell cd $(TOP_KBUILD_SRC)$(src); git describe --always 2>/dev/null)
ifneq ($(GIT_REV),)
# Git detected
DRIVER_REV := $(MALI_RELEASE_NAME)-$(GIT_REV)
CHANGE_DATE := $(shell cd $(src); git log -1 --format="%ci")
CHANGE_DATE := $(shell cd $(TOP_KBUILD_SRC)$(src); git log -1 --format="%ci")
CHANGED_REVISION := $(GIT_REV)
REPO_URL := $(shell cd $(src); git describe --all --always 2>/dev/null)
REPO_URL := $(shell cd $(TOP_KBUILD_SRC)$(src); git describe --all --always 2>/dev/null)

else # Git
# No Git or SVN detected
Expand All @@ -56,7 +62,7 @@ endif
ccflags-y += -DSVN_REV=$(SVN_REV)
ccflags-y += -DSVN_REV_STRING=\"$(DRIVER_REV)\"

ccflags-y += -I$(src) -I$(src)/common -I$(src)/linux -I$(src)/../mali/common -I$(src)/../mali/linux -I$(src)/../../ump/include/ump -I$(src)/../../../../include/ump
ccflags-y += -I$(TOP_KBUILD_SRC)$(src) -I$(TOP_KBUILD_SRC)$(src)/common -I$(TOP_KBUILD_SRC)$(src)/linux -I$(TOP_KBUILD_SRC)$(src)/../mali/common -I$(TOP_KBUILD_SRC)$(src)/../mali/linux -I$(TOP_KBUILD_SRC)$(src)/../../ump/include/ump -I$(TOP_KBUILD_SRC)$(src)/../../../../include/ump
ccflags-y += -DMALI_STATE_TRACKING=0
ccflags-y += -DMALI_ENABLE_CPU_CYCLES=0
ccflags-$(CONFIG_UMP_DEBUG) += -DDEBUG
Expand All @@ -65,10 +71,10 @@ ccflags-$(CONFIG_UMP_DEBUG) += -DDEBUG
# The ARM proprietary product will only include the license/proprietary directory
# The GPL product will only include the license/gpl directory

ifeq ($(wildcard $(src)/linux/license/gpl/*),)
ccflags-y += -I$(src)/linux/license/proprietary -I$(src)/../mali/linux/license/proprietary
ifeq ($(wildcard $(TOP_KBUILD_SRC)$(src)/linux/license/gpl/*),)
ccflags-y += -I$(TOP_KBUILD_SRC)$(src)/linux/license/proprietary -I$(TOP_KBUILD_SRC)$(src)/../mali/linux/license/proprietary
else
ccflags-y += -I$(src)/linux/license/gpl -I$(src)/../mali/linux/license/gpl
ccflags-y += -I$(TOP_KBUILD_SRC)$(src)/linux/license/gpl -I$(TOP_KBUILD_SRC)$(src)/../mali/linux/license/gpl
endif

ump-y = common/ump_kernel_common.o \
Expand Down