From 3a17cff0da10d22155b506b251e66f0635bdcd67 Mon Sep 17 00:00:00 2001 From: Mauro Ribeiro Date: Wed, 15 Oct 2014 04:51:29 -0300 Subject: [PATCH] mali: fixes mali drm in-tree building Change-Id: I6807fbd278772a8913f767b1de389f3d4258390d Signed-off-by: Dongjin Kim --- drivers/gpu/drm/mali_drm/Makefile | 69 ++----------------- drivers/gpu/drm/mali_drm/mali/Makefile | 19 ----- .../gpu/drm/mali_drm/{mali => }/mali_drv.c | 2 +- .../gpu/drm/mali_drm/{mali => }/mali_drv.h | 0 drivers/gpu/drm/mali_drm/{mali => }/mali_mm.c | 0 5 files changed, 7 insertions(+), 83 deletions(-) delete mode 100644 drivers/gpu/drm/mali_drm/mali/Makefile rename drivers/gpu/drm/mali_drm/{mali => }/mali_drv.c (99%) rename drivers/gpu/drm/mali_drm/{mali => }/mali_drv.h (100%) rename drivers/gpu/drm/mali_drm/{mali => }/mali_mm.c (100%) diff --git a/drivers/gpu/drm/mali_drm/Makefile b/drivers/gpu/drm/mali_drm/Makefile index ea7ae929b384..700878452cb1 100644 --- a/drivers/gpu/drm/mali_drm/Makefile +++ b/drivers/gpu/drm/mali_drm/Makefile @@ -7,70 +7,13 @@ # A copy of the licence is included with the program, and can also be obtained from Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # +# +# Makefile for the drm device driver. This driver provides support for the +# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. -MALI_DRM_FILE_PREFIX = +ccflags-y = -Iinclude/drm +mali_drm-y := mali_drv.o -# For each arch check: CROSS_COMPILE , KDIR , CFLAGS += -DARCH - -ARCH ?= arm -## @note Should allow overriding of building MALI DRM for non-debug: -EXTRA_CFLAGS += -DDEBUG - -DRM_SYMVERS_FILE = ../drm/Module.symvers -KBUILD_EXTRA_SYMBOLS = $(KBUILD_EXTMOD)/$(DRM_SYMVERS_FILE) +obj-$(CONFIG_DRM_MALI) += mali_drm.o -# linux build system integration - -ifneq ($(KERNELRELEASE),) -# Inside the kernel build system - -EXTRA_CFLAGS += -I$(KBUILD_EXTMOD) -I$(KBUILD_EXTMOD)/include -I$(KBUILD_EXTMOD)/../drm/include/ - -SRC += $(MALI_DRM_FILE_PREFIX)mali/mali_drv.c - -# Selecting files to compile by parsing the config file - -MODULE:=mali_drm.ko - -obj-m := $(MODULE:.ko=.o) -$(MODULE:.ko=-y) := $(SRC:.c=.o) - -else -# Outside the kernel build system - -# Get any user defined KDIR- or maybe even a hardcoded KDIR --include KDIR_CONFIGURATION - -# Define host system directory -KDIR-$(shell uname -m):=/lib/modules/$(shell uname -r)/build - -ifeq ($(ARCH), arm) - # when compiling for ARM we're cross compiling - export CROSS_COMPILE ?= arm-none-linux-gnueabi- - # default to Virtex5 - CONFIG ?= pb-virtex5 -else - # Compiling for the host - CONFIG ?= $(shell uname -m) -endif - -# default cpu to select -CPU ?= ct11mp - -# look up KDIR based om CPU selection -KDIR ?= $(KDIR-$(CPU)) -ifeq ($(KDIR),) -$(error No KDIR found for platform $(CPU)) -endif - -all: - $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules - -kernelrelease: - $(MAKE) -C $(KDIR) kernelrelease - -clean: - $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) clean - -endif diff --git a/drivers/gpu/drm/mali_drm/mali/Makefile b/drivers/gpu/drm/mali_drm/mali/Makefile deleted file mode 100644 index 700878452cb1..000000000000 --- a/drivers/gpu/drm/mali_drm/mali/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright (C) 2010, 2012 ARM Limited. All rights reserved. -# -# This program is free software and is provided to you under the terms of the GNU General Public License version 2 -# as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence. -# -# A copy of the licence is included with the program, and can also be obtained from Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# -# Makefile for the drm device driver. This driver provides support for the -# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. - -ccflags-y = -Iinclude/drm -mali_drm-y := mali_drv.o - -obj-$(CONFIG_DRM_MALI) += mali_drm.o - - diff --git a/drivers/gpu/drm/mali_drm/mali/mali_drv.c b/drivers/gpu/drm/mali_drm/mali_drv.c similarity index 99% rename from drivers/gpu/drm/mali_drm/mali/mali_drv.c rename to drivers/gpu/drm/mali_drm/mali_drv.c index fbfec2acd259..5458cf75fdc7 100644 --- a/drivers/gpu/drm/mali_drm/mali/mali_drv.c +++ b/drivers/gpu/drm/mali_drm/mali_drv.c @@ -16,7 +16,7 @@ #include #include #include -#include "../include/mali_drm.h" +#include "include/mali_drm.h" #include "mali_drv.h" static struct platform_device *dev0; diff --git a/drivers/gpu/drm/mali_drm/mali/mali_drv.h b/drivers/gpu/drm/mali_drm/mali_drv.h similarity index 100% rename from drivers/gpu/drm/mali_drm/mali/mali_drv.h rename to drivers/gpu/drm/mali_drm/mali_drv.h diff --git a/drivers/gpu/drm/mali_drm/mali/mali_mm.c b/drivers/gpu/drm/mali_drm/mali_mm.c similarity index 100% rename from drivers/gpu/drm/mali_drm/mali/mali_mm.c rename to drivers/gpu/drm/mali_drm/mali_mm.c