Skip to content
Open
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
28 changes: 10 additions & 18 deletions arch/arm/configs/sun8iw7p1smp_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,7 @@ CONFIG_NET_NS=y
# CONFIG_SCHED_AUTOGROUP is not set
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE="output/rootfs.cpio.gz"
CONFIG_INITRAMFS_ROOT_UID=0
CONFIG_INITRAMFS_ROOT_GID=0
CONFIG_RD_GZIP=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
CONFIG_INITRAMFS_COMPRESSION_NONE=y
# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set
# CONFIG_BLK_DEV_INITRD is not set
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
Expand Down Expand Up @@ -471,7 +461,7 @@ CONFIG_ZONE_DMA_FLAG=0
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
# CONFIG_KSM is not set
CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
# CONFIG_CLEANCACHE is not set
CONFIG_FORCE_MAX_ZONEORDER=11
CONFIG_ALIGNMENT_TRAP=y
Expand All @@ -487,10 +477,10 @@ CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART=y
# CONFIG_USE_OF is not set
CONFIG_ZBOOT_ROM_TEXT=0
CONFIG_ZBOOT_ROM_BSS=0
CONFIG_CMDLINE="earlyprintk=ttyS0,115200 loglevel=8 initcall_debug=0 console=ttyS0,115200 init=/init "
CONFIG_CMDLINE=""
# CONFIG_CMDLINE_FROM_BOOTLOADER is not set
# CONFIG_CMDLINE_EXTEND is not set
CONFIG_CMDLINE_FORCE=y
# CONFIG_CMDLINE_FORCE is not set
# CONFIG_XIP_KERNEL is not set
# CONFIG_KEXEC is not set
# CONFIG_CRASH_DUMP is not set
Expand Down Expand Up @@ -658,7 +648,7 @@ CONFIG_IPV6_TUNNEL=y
CONFIG_IPV6_MULTIPLE_TABLES=y
# CONFIG_IPV6_SUBTREES is not set
# CONFIG_IPV6_MROUTE is not set
CONFIG_ANDROID_PARANOID_NETWORK=y
# CONFIG_ANDROID_PARANOID_NETWORK is not set
CONFIG_NET_ACTIVITY_STATS=y
CONFIG_NETWORK_SECMARK=y
# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
Expand Down Expand Up @@ -1209,6 +1199,7 @@ CONFIG_NET_VENDOR_SUNXI=y
CONFIG_SUNXI_GETH=y
CONFIG_GETH_SCRIPT_SYS=y
CONFIG_GETH_CLK_SYS=y
CONFIG_GMAC_PHY_POWER=y
CONFIG_PHYLIB=y

#
Expand Down Expand Up @@ -2062,10 +2053,12 @@ CONFIG_VIDEO_ENCODER_DECODER_SUNXI=y
#
# Graphics support
#
# CONFIG_DRM is not set
CONFIG_DRM=m
CONFIG_DRM_MALI=m
CONFIG_ION=y
CONFIG_ION_SUNXI=y
CONFIG_ION_SUNXI_RESERVE_LIST="160M@0,256M@0,130M@1,200M@1"
CONFIG_MALI=m
# CONFIG_VGASTATE is not set
# CONFIG_VIDEO_OUTPUT_CONTROL is not set
CONFIG_FB=y
Expand Down Expand Up @@ -2097,7 +2090,7 @@ CONFIG_FB=y
#
# CONFIG_FB_CONSOLE_SUNXI is not set
CONFIG_DISP2_SUNXI=y
CONFIG_HDMI_DISP2_SUNXI=m
CONFIG_HDMI_DISP2_SUNXI=y
CONFIG_TV_DISP2_SUNXI=m
# CONFIG_DISP2_SUNXI_BOOT_COLORBAR is not set
CONFIG_DISP2_SUNXI_DEBUG=y
Expand Down Expand Up @@ -3102,7 +3095,6 @@ CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_SPARC=y
CONFIG_XZ_DEC_BCJ=y
# CONFIG_XZ_DEC_TEST is not set
CONFIG_DECOMPRESS_GZIP=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=y
Expand Down
12 changes: 6 additions & 6 deletions arch/arm/mach-sunxi/power/brom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ resumes-y := resumes.o \

resumes-y := $(addprefix $(obj)/,$(resumes-y))

$(obj)/resumes.code: $(obj)/resumes.bin
$(Q)$(obj)/gen_check_code $(obj)/resumes.bin $(obj)/resumes.code
$(obj)/resumes.code: $(src)/gen_check_code $(obj)/resumes.bin
$(Q)$< $(obj)/resumes.bin $(obj)/resumes.code

$(obj)/resumes.bin: $(obj)/resumes.elf FORCE
$(Q)$(CROSS_COMPILE)objcopy -O binary $(obj)/resumes.elf $(obj)/resumes.bin

ifneq ($(strip $(CONFIG_ARCH_SUN9I)),)
$(obj)/resumes.elf: $(obj)/sun9i_brom_scatter.scat $(resumes-y)
$(Q)$(CROSS_COMPILE)ld -T $(obj)/sun9i_brom_scatter.scat -EL $(resumes-y) -o $(obj)/resumes.elf -Map $(obj)/resumes.map
$(obj)/resumes.elf: $(src)/sun9i_brom_scatter.scat $(resumes-y)
$(Q)$(CROSS_COMPILE)ld -T $< -EL $(resumes-y) -o $(obj)/resumes.elf -Map $(obj)/resumes.map
$(Q)$(CROSS_COMPILE)objdump -D $(obj)/resumes.elf > $(obj)/resumes.lst
endif

ifneq ($(strip $(CONFIG_ARCH_SUN8I)),)
$(obj)/resumes.elf: $(obj)/sun8i_brom_scatter.scat $(resumes-y)
$(Q)$(CROSS_COMPILE)ld -T $(obj)/sun8i_brom_scatter.scat -EL $(resumes-y) -o $(obj)/resumes.elf -Map $(obj)/resumes.map
$(obj)/resumes.elf: $(src)/sun8i_brom_scatter.scat $(resumes-y)
$(Q)$(CROSS_COMPILE)ld -T $< -EL $(resumes-y) -o $(obj)/resumes.elf -Map $(obj)/resumes.map
$(Q)$(CROSS_COMPILE)objdump -D $(obj)/resumes.elf > $(obj)/resumes.lst
endif

Expand Down
4 changes: 2 additions & 2 deletions drivers/arisc/binary/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ ifdef CONFIG_ARCH_SUN9IW1P1
PLATFORM=arisc_sun9iw1p1
endif

$(obj)/$(PLATFORM).bin : $(obj)/$(PLATFORM).code
cp $(obj)/$(PLATFORM).code $(obj)/$(PLATFORM).tar.bz2; \
$(obj)/$(PLATFORM).bin : $(src)/$(PLATFORM).code
cp $< $(obj)/$(PLATFORM).tar.bz2; \
tar -xjvf $(obj)/$(PLATFORM).tar.bz2 -C $(obj)/; \
cp $(obj)/arisc_package/$(PLATFORM).bin $(obj)/$(PLATFORM).bin; \
cp $(obj)/arisc_package/$(PLATFORM).tar.bz2.aes $(obj)/arisc; \
Expand Down
7 changes: 7 additions & 0 deletions drivers/gpu/drm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ config DRM_VIA
Choose this option if you have a Via unichrome or compatible video
chipset. If M is selected the module will be called via.

config DRM_MALI
tristate "Mali DRM supprt"
depends on DRM
help
Choose this option if you have a Mali 200 or Mali 400 gpu
If M is selected the module will be called mali_drm.

config DRM_SAVAGE
tristate "Savage video cards"
depends on DRM && PCI
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ obj-$(CONFIG_DRM_SIS) += sis/
obj-$(CONFIG_DRM_SAVAGE)+= savage/
obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/
obj-$(CONFIG_DRM_VIA) +=via/
obj-$(CONFIG_DRM_MALI) += mali/
obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/
obj-$(CONFIG_DRM_EXYNOS) +=exynos/
obj-$(CONFIG_DRM_GMA500) += gma500/
Expand Down
20 changes: 20 additions & 0 deletions drivers/gpu/drm/mali/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# * Copyright (C) 2010 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 Mali drm device driver. This driver provides support for the
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.

ccflags-y = -Iinclude/drm -Larch/arm/mach-sun4i/devices.o
mali_drm-y := mali_drv.o

obj-$(CONFIG_DRM_MALI) += mali_drm.o


190 changes: 190 additions & 0 deletions drivers/gpu/drm/mali/mali_drv.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
/**
* Copyright (C) 2010 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.
*/

/**
* @file mali_drv.c
* Implementation of the Linux device driver entrypoints for Mali DRM
*/

#include <linux/module.h>
#include <linux/vermagic.h>
#include <drm/drmP.h>
#include "mali_drv.h"

static struct platform_device *dev0;
static struct platform_device *dev1;

void mali_drm_preclose(struct drm_device *dev, struct drm_file *file_priv)
{
}

void mali_drm_lastclose(struct drm_device *dev)
{
}

static int mali_drm_suspend(struct drm_device *dev, pm_message_t state)
{
return 0;
}

static int mali_drm_resume(struct drm_device *dev)
{
return 0;
}

static int mali_drm_load(struct drm_device *dev, unsigned long chipset)
{
return 0;
}

static int mali_drm_unload(struct drm_device *dev)
{
return 0;
}

static struct file_operations mali_fops = {
.owner = THIS_MODULE,
.open = drm_open,
.release = drm_release,
.unlocked_ioctl = drm_ioctl,
.mmap = drm_mmap,
.poll = drm_poll,
.fasync = drm_fasync,
};

static struct drm_driver driver =
{
.driver_features = DRIVER_BUS_PLATFORM,
.load = mali_drm_load,
.unload = mali_drm_unload,
.context_dtor = NULL,
.reclaim_buffers = NULL,
.reclaim_buffers_idlelocked = NULL,
.preclose = mali_drm_preclose,
.lastclose = mali_drm_lastclose,
.suspend = mali_drm_suspend,
.resume = mali_drm_resume,
.ioctls = NULL,
.fops = &mali_fops,
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
.date = DRIVER_DATE,
.major = DRIVER_MAJOR,
.minor = DRIVER_MINOR,
.patchlevel = DRIVER_PATCHLEVEL,
};

static struct drm_driver driver1 =
{
.driver_features = DRIVER_BUS_PLATFORM,
.load = mali_drm_load,
.unload = mali_drm_unload,
.context_dtor = NULL,
.reclaim_buffers = NULL,
.reclaim_buffers_idlelocked = NULL,
.preclose = mali_drm_preclose,
.lastclose = mali_drm_lastclose,
.suspend = mali_drm_suspend,
.resume = mali_drm_resume,
.ioctls = NULL,
.fops = &mali_fops,
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
.date = DRIVER_DATE,
.major = DRIVER_MAJOR,
.minor = DRIVER_MINOR,
.patchlevel = DRIVER_PATCHLEVEL,
};

int mali_drm_init(struct platform_device *dev)
{
printk(KERN_INFO "Mali DRM initialize, driver name: %s, version %d.%d\n", DRIVER_NAME, DRIVER_MAJOR, DRIVER_MINOR);
if (dev == dev0) {
driver.num_ioctls = 0;
driver.kdriver.platform_device = dev;
return drm_platform_init(&driver, dev);
} else if (dev == dev1) {
driver1.num_ioctls = 0;
driver1.kdriver.platform_device = dev;
return drm_platform_init(&driver1, dev);
}
return 0;
}

void mali_drm_exit(struct platform_device *dev)
{
if (driver.kdriver.platform_device == dev) {
drm_platform_exit(&driver, dev);
} else if (driver1.kdriver.platform_device == dev) {
drm_platform_exit(&driver1, dev);
}
}

static int __devinit mali_platform_drm_probe(struct platform_device *dev)
{
return mali_drm_init(dev);
}

static int mali_platform_drm_remove(struct platform_device *dev)
{
mali_drm_exit(dev);

return 0;
}

static int mali_platform_drm_suspend(struct platform_device *dev, pm_message_t state)
{
return 0;
}

static int mali_platform_drm_resume(struct platform_device *dev)
{
return 0;
}


static struct platform_driver platform_drm_driver = {
.probe = mali_platform_drm_probe,
.remove = __devexit_p(mali_platform_drm_remove),
.suspend = mali_platform_drm_suspend,
.resume = mali_platform_drm_resume,
.driver = {
.owner = THIS_MODULE,
.name = DRIVER_NAME,
},
};

static int __init mali_platform_drm_init(void)
{
dev0 = platform_device_register_simple("mali_drm", 0, NULL, 0);
dev1 = platform_device_register_simple("mali_drm", 1, NULL, 0);
return platform_driver_register( &platform_drm_driver );
}

static void __exit mali_platform_drm_exit(void)
{
platform_driver_unregister( &platform_drm_driver );
platform_device_unregister(dev0);
platform_device_unregister(dev1);
}

#ifdef MODULE
module_init(mali_platform_drm_init);
#else
late_initcall(mali_platform_drm_init);
#endif
module_exit(mali_platform_drm_exit);

MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_VERSION(DRIVER_VERSION);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_LICENSE(DRIVER_LICENSE);
MODULE_ALIAS(DRIVER_ALIAS);
MODULE_INFO(vermagic, VERMAGIC_STRING);
25 changes: 25 additions & 0 deletions drivers/gpu/drm/mali/mali_drv.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Copyright (C) 2010 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.
*/

#ifndef _MALI_DRV_H_
#define _MALI_DRV_H_

#define DRIVER_AUTHOR "ARM Ltd."
#define DRIVER_NAME "mali_drm"
#define DRIVER_DESC "DRM module for Mali-200, Mali-400"
#define DRIVER_LICENSE "GPL v2"
#define DRIVER_ALIAS "platform:mali_drm"
#define DRIVER_DATE "20101111"
#define DRIVER_VERSION "0.2"
#define DRIVER_MAJOR 2
#define DRIVER_MINOR 1
#define DRIVER_PATCHLEVEL 1

#endif /* _MALI_DRV_H_ */
Loading