aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/samsung/ump
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.org>2013-02-23 01:33:12 +0000
committercodeworkx <codeworkx@cyanogenmod.org>2013-02-23 01:33:12 +0000
commit3536d5c6bfd05e861b3b430d4de36fdf31afa5e1 (patch)
tree996624e7f343759ffe3a98a43ac0f6e03355399e /drivers/media/video/samsung/ump
parentc715892450ed51c52a1b3b885090ad470f11643a (diff)
downloadkernel_samsung_smdk4412-3536d5c6bfd05e861b3b430d4de36fdf31afa5e1.zip
kernel_samsung_smdk4412-3536d5c6bfd05e861b3b430d4de36fdf31afa5e1.tar.gz
kernel_samsung_smdk4412-3536d5c6bfd05e861b3b430d4de36fdf31afa5e1.tar.bz2
mali: update to r3p1-01rel1
Change-Id: I38a5488af2f2a64e2851826cdbc475ef5727c965
Diffstat (limited to 'drivers/media/video/samsung/ump')
-rw-r--r--drivers/media/video/samsung/ump/Kconfig13
-rw-r--r--drivers/media/video/samsung/ump/Kconfig_module16
-rw-r--r--drivers/media/video/samsung/ump/Makefile28
-rw-r--r--[-rwxr-xr-x]drivers/media/video/samsung/ump/Makefile.common6
-rwxr-xr-xdrivers/media/video/samsung/ump/Makefile_module119
-rw-r--r--drivers/media/video/samsung/ump/arch-orion-m400/config.h12
-rw-r--r--[-rwxr-xr-x]drivers/media/video/samsung/ump/arch-pb-virtex5/config.h2
-rw-r--r--[-rwxr-xr-x]drivers/media/video/samsung/ump/arch-pegasus-m400/config.h12
-rw-r--r--drivers/media/video/samsung/ump/common/ump_kernel_api.c23
-rw-r--r--drivers/media/video/samsung/ump/common/ump_kernel_common.c28
-rw-r--r--drivers/media/video/samsung/ump/common/ump_kernel_common.h4
-rw-r--r--[-rwxr-xr-x]drivers/media/video/samsung/ump/common/ump_kernel_descriptor_mapping.c33
-rw-r--r--[-rwxr-xr-x]drivers/media/video/samsung/ump/common/ump_kernel_descriptor_mapping.h4
-rw-r--r--drivers/media/video/samsung/ump/common/ump_kernel_memory_backend.h7
-rw-r--r--drivers/media/video/samsung/ump/common/ump_kernel_ref_drv.c68
-rw-r--r--drivers/media/video/samsung/ump/common/ump_kernel_types.h4
-rw-r--r--drivers/media/video/samsung/ump/common/ump_osk.h6
-rw-r--r--drivers/media/video/samsung/ump/common/ump_ukk.h4
-rw-r--r--drivers/media/video/samsung/ump/include/ump_kernel_interface.h4
-rw-r--r--drivers/media/video/samsung/ump/include/ump_kernel_interface_ref_drv.h8
-rw-r--r--drivers/media/video/samsung/ump/include/ump_kernel_interface_vcm.h37
-rw-r--r--drivers/media/video/samsung/ump/include/ump_kernel_platform.h4
-rw-r--r--[-rwxr-xr-x]drivers/media/video/samsung/ump/linux/license/gpl/ump_kernel_license.h6
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_ioctl.h5
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_kernel_linux.c17
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_kernel_linux.h6
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_dedicated.c6
-rw-r--r--[-rwxr-xr-x]drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_dedicated.h7
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_os.c9
-rw-r--r--[-rwxr-xr-x]drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_os.h7
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_vcm.c290
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_vcm.h22
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_memory_backend.c13
-rw-r--r--[-rwxr-xr-x]drivers/media/video/samsung/ump/linux/ump_osk_atomics.c6
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_osk_low_level_mem.c132
-rw-r--r--[-rwxr-xr-x]drivers/media/video/samsung/ump/linux/ump_osk_misc.c6
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_ukk_ref_wrappers.c6
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_ukk_ref_wrappers.h6
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_ukk_wrappers.c4
-rw-r--r--drivers/media/video/samsung/ump/linux/ump_ukk_wrappers.h8
40 files changed, 144 insertions, 854 deletions
diff --git a/drivers/media/video/samsung/ump/Kconfig b/drivers/media/video/samsung/ump/Kconfig
index 9d8e5e6..aaae26e 100644
--- a/drivers/media/video/samsung/ump/Kconfig
+++ b/drivers/media/video/samsung/ump/Kconfig
@@ -17,18 +17,10 @@ config UMP_VCM_ALLOC
help
Use VCM(virtual-contiguous-memory) to allocate physical memory.
-
-config UMP_R3P1_LSI
- bool "Uses the R3P1 as a ump module"
- depends on VIDEO_UMP
- default n
- ---help---
- This uses the r3p1 as a UMP kernel module
-
choice
depends on VIDEO_UMP
prompt "UMP MEMEMORY OPTION"
-default UMP_OSMEM_ONLY
+default UMP_OSMEM_ONLY
config UMP_DED_ONLY
bool "ump dedicated memory only"
---help---
@@ -45,7 +37,7 @@ config UMP_VCM_ONLY
endchoice
config UMP_MEM_SIZE
int "UMP Memory Size"
- depends on VIDEO_UMP
+ depends on VIDEO_UMP
default "512"
---help---
This value is dedicated memory size of UMP (unit is MByte).
@@ -56,3 +48,4 @@ config VIDEO_UMP_DEBUG
default n
help
This enables UMP driver debug messages.
+
diff --git a/drivers/media/video/samsung/ump/Kconfig_module b/drivers/media/video/samsung/ump/Kconfig_module
new file mode 100644
index 0000000..3ae316c
--- /dev/null
+++ b/drivers/media/video/samsung/ump/Kconfig_module
@@ -0,0 +1,16 @@
+config UMP
+ tristate "UMP support"
+ depends on ARM
+ ---help---
+ This enables support for the UMP memory allocation and sharing API.
+
+ To compile this driver as a module, choose M here: the module will be
+ called ump.
+
+config UMP_DEBUG
+ bool "Enable extra debug in UMP"
+ depends on UMP
+ default y
+ ---help---
+ This enabled extra debug checks and messages in UMP.
+
diff --git a/drivers/media/video/samsung/ump/Makefile b/drivers/media/video/samsung/ump/Makefile
index 1ac28d7..0ba1253 100644
--- a/drivers/media/video/samsung/ump/Makefile
+++ b/drivers/media/video/samsung/ump/Makefile
@@ -1,9 +1,9 @@
#
-# Copyright (C) 2010 ARM Limited. All rights reserved.
-#
+# 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.
#
@@ -18,12 +18,6 @@ UMP_MEM_SIZE= $(CONFIG_UMP_MEM_SIZE)
USING_MEMORY=1
endif
-ifeq ($(CONFIG_UMP_VCM_ONLY),y)
-UMP_MEM_SIZE= $(CONFIG_UMP_MEM_SIZE)
-USING_MEMORY=2
-endif
-
-
# For UMP Debug
ifeq ($(CONFIG_VIDEO_UMP_DEBUG),y)
DEFINES += -DDEBUG
@@ -36,7 +30,7 @@ DEFINES += -DUMP_MEM_SIZE=$(UMP_MEM_SIZE)
DEFINES += -DMALI_STATE_TRACKING=1
UDD_FILE_PREFIX := drivers/media/video/samsung/ump/
-KBUILDROOT =
+KBUILDROOT =
# linux build system integration
@@ -60,7 +54,7 @@ OSKFILES+=\
$(KBUILDROOT)../mali/linux/mali_osk_locks.o \
$(KBUILDROOT)../mali/linux/mali_osk_math.o \
$(KBUILDROOT)../mali/linux/mali_osk_memory.o \
- $(KBUILDROOT)../mali/linux/mali_osk_misc.o
+ $(KBUILDROOT)../mali/linux/mali_osk_misc.o
ump-y := \
$(KBUILDROOT)linux/ump_kernel_linux.o \
@@ -78,15 +72,13 @@ ump-y := \
$(KBUILDROOT)common/ump_kernel_ref_drv.o\
$(OSKFILES)
-ump-$(CONFIG_UMP_VCM_ALLOC) += \
- $(KBUILDROOT)linux/ump_kernel_memory_backend_vcm.o \
-
EXTRA_CFLAGS += $(INCLUDES) \
- $(DEFINES)
-
-
+ $(DEFINES)
+
+
# Get subversion revision number, fall back to 0000 if no svn info is available
SVN_REV:=$(shell ((svnversion | grep -E "^[0-9]+" && echo -n 'Revision: ' && svnversion) || git svn info | sed -e 's/$$$$/M/' | grep '^Revision: ' || echo ${MALI_RELEASE_NAME}) 2>/dev/null | sed -e 's/^Revision: //')
-
+
EXTRA_CFLAGS += -DSVN_REV=$(SVN_REV)
EXTRA_CFLAGS += -DSVN_REV_STRING=\"$(SVN_REV)\"
+
diff --git a/drivers/media/video/samsung/ump/Makefile.common b/drivers/media/video/samsung/ump/Makefile.common
index 35527a2..503a38d 100755..100644
--- a/drivers/media/video/samsung/ump/Makefile.common
+++ b/drivers/media/video/samsung/ump/Makefile.common
@@ -1,9 +1,9 @@
#
# 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.
#
@@ -14,7 +14,7 @@ SRC = $(UMP_FILE_PREFIX)common/ump_kernel_common.c \
$(UMP_FILE_PREFIX)common/ump_kernel_ref_drv.c
# Get subversion revision number, fall back to 0000 if no svn info is available
-SVN_REV:=$(shell ((svnversion | grep -qv exported && echo -n 'Revision: ' && svnversion) || git svn info | sed -e 's/$$$$/M/' | grep '^Revision: ' || echo ${MALI_RELEASE_NAME}) 2>/dev/null | sed -e 's/^Revision: //')
+SVN_REV:=$(shell ((svnversion | grep -E "^[0-9]+" && echo -n 'Revision: ' && svnversion) || git svn info | sed -e 's/$$$$/M/' | grep '^Revision: ' || echo ${MALI_RELEASE_NAME}) 2>/dev/null | sed -e 's/^Revision: //')
EXTRA_CFLAGS += -DSVN_REV=$(SVN_REV)
EXTRA_CFLAGS += -DSVN_REV_STRING=\"$(SVN_REV)\"
diff --git a/drivers/media/video/samsung/ump/Makefile_module b/drivers/media/video/samsung/ump/Makefile_module
deleted file mode 100755
index f0c3829..0000000
--- a/drivers/media/video/samsung/ump/Makefile_module
+++ /dev/null
@@ -1,119 +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.
-#
-
-UMP_FILE_PREFIX =
-UDD_FILE_PREFIX = ../mali/
-
-ifneq ($(KBUILD_EXTMOD),)
-include $(KBUILD_EXTMOD)/Makefile.common
-else
-include ./Makefile.common
-endif
-
-# For each arch check: CROSS_COMPILE , KDIR , CFLAGS += -DARCH
-
-ARCH ?= arm
-BUILD ?= debug
-
-EXTRA_CFLAGS += -DDEBUG -DMALI_STATE_TRACKING=0
-ifeq ($(BUILD), debug)
-EXTRA_CFLAGS += -DDEBUG
-endif
-
-# linux build system integration
-
-ifneq ($(KERNELRELEASE),)
-# Inside the kernel build system
-
-EXTRA_CFLAGS += -I$(KBUILD_EXTMOD) -I$(KBUILD_EXTMOD)/common -I$(KBUILD_EXTMOD)/linux -I$(KBUILD_EXTMOD)/../mali/common -I$(KBUILD_EXTMOD)/../mali/linux -I$(KBUILD_EXTMOD)/../../ump/include/ump
-
-# 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 $(KBUILD_EXTMOD)/linux/license/gpl/*),)
-EXTRA_CFLAGS += -I$(KBUILD_EXTMOD)/linux/license/proprietary
-else
-EXTRA_CFLAGS += -I$(KBUILD_EXTMOD)/linux/license/gpl
-endif
-
-SRC += $(UMP_FILE_PREFIX)linux/ump_kernel_linux.c \
- $(UMP_FILE_PREFIX)linux/ump_kernel_memory_backend_os.c \
- $(UMP_FILE_PREFIX)linux/ump_kernel_memory_backend_dedicated.c \
- $(UMP_FILE_PREFIX)linux/ump_memory_backend.c \
- $(UMP_FILE_PREFIX)linux/ump_ukk_wrappers.c \
- $(UMP_FILE_PREFIX)linux/ump_ukk_ref_wrappers.c \
- $(UMP_FILE_PREFIX)linux/ump_osk_atomics.c \
- $(UMP_FILE_PREFIX)linux/ump_osk_low_level_mem.c \
- $(UMP_FILE_PREFIX)linux/ump_osk_misc.c \
- $(UDD_FILE_PREFIX)linux/mali_osk_atomics.c \
- $(UDD_FILE_PREFIX)linux/mali_osk_locks.c \
- $(UDD_FILE_PREFIX)linux/mali_osk_memory.c \
- $(UDD_FILE_PREFIX)linux/mali_osk_math.c \
- $(UDD_FILE_PREFIX)linux/mali_osk_misc.c
-
-# Selecting files to compile by parsing the config file
-
-MODULE:=ump.ko
-
-obj-m := $(MODULE:.ko=.o)
-$(MODULE:.ko=-y) := $(SRC:.c=.o)
-
-else
-# Outside the kernel build system
-
-# Check that required parameters are supplied.
-ifeq ($(CONFIG),)
-$(error "CONFIG must be specified.")
-endif
-ifeq ($(CPU)$(KDIR),)
-$(error "KDIR or CPU must be specified.")
-endif
-
-# Get any user defined KDIR-<names> 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-
-endif
-
-# look up KDIR based om CPU selection
-KDIR ?= $(KDIR-$(CPU))
-
-ifeq ($(KDIR),)
-$(error No KDIR found for platform $(CPU))
-endif
-
-# Validate selected config
-ifneq ($(shell [ -d arch-$(CONFIG) ] && [ -f arch-$(CONFIG)/config.h ] && echo "OK"), OK)
-$(warning Current directory is $(shell pwd))
-$(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 arch ] && rm arch)
-$(shell ln -sf arch-$(CONFIG) arch)
-$(shell touch arch/config.h)
-endif
-
-all:
- $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules
-
-kernelrelease:
- $(MAKE) ARCH=$(ARCH) -C $(KDIR) kernelrelease
-
-clean:
- $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) clean
- $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR)/../mali clean
-
-endif
diff --git a/drivers/media/video/samsung/ump/arch-orion-m400/config.h b/drivers/media/video/samsung/ump/arch-orion-m400/config.h
index 688edc9..7afbca6 100644
--- a/drivers/media/video/samsung/ump/arch-orion-m400/config.h
+++ b/drivers/media/video/samsung/ump/arch-orion-m400/config.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -11,12 +11,12 @@
#ifndef __ARCH_CONFIG_UMP_H__
#define __ARCH_CONFIG_UMP_H__
-#define ARCH_UMP_BACKEND_DEFAULT USING_MEMORY
+#define ARCH_UMP_BACKEND_DEFAULT USING_MEMORY
#if (USING_MEMORY == 0) /* Dedicated Memory */
-#define ARCH_UMP_MEMORY_ADDRESS_DEFAULT 0x2C000000
+#define ARCH_UMP_MEMORY_ADDRESS_DEFAULT 0x2C000000
#else
-#define ARCH_UMP_MEMORY_ADDRESS_DEFAULT 0
+#define ARCH_UMP_MEMORY_ADDRESS_DEFAULT 0
#endif
-#define ARCH_UMP_MEMORY_SIZE_DEFAULT UMP_MEM_SIZE*1024*1024
+#define ARCH_UMP_MEMORY_SIZE_DEFAULT UMP_MEM_SIZE*1024*1024
#endif /* __ARCH_CONFIG_UMP_H__ */
diff --git a/drivers/media/video/samsung/ump/arch-pb-virtex5/config.h b/drivers/media/video/samsung/ump/arch-pb-virtex5/config.h
index 38ae1ee..532fc94 100755..100644
--- a/drivers/media/video/samsung/ump/arch-pb-virtex5/config.h
+++ b/drivers/media/video/samsung/ump/arch-pb-virtex5/config.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 ARM Limited. All rights reserved.
+ * 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.
diff --git a/drivers/media/video/samsung/ump/arch-pegasus-m400/config.h b/drivers/media/video/samsung/ump/arch-pegasus-m400/config.h
index 688edc9..7afbca6 100755..100644
--- a/drivers/media/video/samsung/ump/arch-pegasus-m400/config.h
+++ b/drivers/media/video/samsung/ump/arch-pegasus-m400/config.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -11,12 +11,12 @@
#ifndef __ARCH_CONFIG_UMP_H__
#define __ARCH_CONFIG_UMP_H__
-#define ARCH_UMP_BACKEND_DEFAULT USING_MEMORY
+#define ARCH_UMP_BACKEND_DEFAULT USING_MEMORY
#if (USING_MEMORY == 0) /* Dedicated Memory */
-#define ARCH_UMP_MEMORY_ADDRESS_DEFAULT 0x2C000000
+#define ARCH_UMP_MEMORY_ADDRESS_DEFAULT 0x2C000000
#else
-#define ARCH_UMP_MEMORY_ADDRESS_DEFAULT 0
+#define ARCH_UMP_MEMORY_ADDRESS_DEFAULT 0
#endif
-#define ARCH_UMP_MEMORY_SIZE_DEFAULT UMP_MEM_SIZE*1024*1024
+#define ARCH_UMP_MEMORY_SIZE_DEFAULT UMP_MEM_SIZE*1024*1024
#endif /* __ARCH_CONFIG_UMP_H__ */
diff --git a/drivers/media/video/samsung/ump/common/ump_kernel_api.c b/drivers/media/video/samsung/ump/common/ump_kernel_api.c
index 83f0d30..6569b02 100644
--- a/drivers/media/video/samsung/ump/common/ump_kernel_api.c
+++ b/drivers/media/video/samsung/ump/common/ump_kernel_api.c
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -55,24 +55,7 @@ UMP_KERNEL_API_EXPORT ump_dd_handle ump_dd_handle_create_from_secure_id(ump_secu
return (ump_dd_handle)mem;
}
-UMP_KERNEL_API_EXPORT ump_dd_handle ump_dd_handle_get(ump_secure_id secure_id)
-{
- ump_dd_mem * mem;
-
- _mali_osk_lock_wait(device.secure_id_map_lock, _MALI_OSK_LOCKMODE_RW);
-
- DBG_MSG(5, ("Getting handle from secure ID. ID: %u\n", secure_id));
- if (0 != ump_descriptor_mapping_get(device.secure_id_map, (int)secure_id, (void**)&mem))
- {
- _mali_osk_lock_signal(device.secure_id_map_lock, _MALI_OSK_LOCKMODE_RW);
- DBG_MSG(1, ("Secure ID not found. ID: %u\n", secure_id));
- return UMP_DD_HANDLE_INVALID;
- }
- _mali_osk_lock_signal(device.secure_id_map_lock, _MALI_OSK_LOCKMODE_RW);
-
- return (ump_dd_handle)mem;
-}
UMP_KERNEL_API_EXPORT unsigned long ump_dd_phys_block_count_get(ump_dd_handle memh)
{
@@ -277,7 +260,7 @@ _mali_osk_errcode_t _ump_ukk_release( _ump_uk_release_s *release_info )
}
_mali_osk_lock_signal(session_data->lock, _MALI_OSK_LOCKMODE_RW);
- DBG_MSG_IF(1, _MALI_OSK_ERR_OK != ret, ("UMP memory with ID %u does not belong to this session.\n", secure_id));
+ DBG_MSG_IF(1, _MALI_OSK_ERR_OK != ret, ("UMP memory with ID %u does not belong to this session.\n", secure_id));
DBG_MSG(4, ("_ump_ukk_release() returning 0x%x\n", ret));
return ret;
diff --git a/drivers/media/video/samsung/ump/common/ump_kernel_common.c b/drivers/media/video/samsung/ump/common/ump_kernel_common.c
index 1fa7c8a..b1545e8 100644
--- a/drivers/media/video/samsung/ump/common/ump_kernel_common.c
+++ b/drivers/media/video/samsung/ump/common/ump_kernel_common.c
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -228,17 +228,12 @@ _mali_osk_errcode_t _ump_ukk_map_mem( _ump_uk_map_mem_s *args )
int map_id;
session_data = (ump_session_data *)args->ctx;
- if(NULL == session_data)
+ if( NULL == session_data )
{
MSG_ERR(("Session data is NULL in _ump_ukk_map_mem()\n"));
return _MALI_OSK_ERR_INVALID_ARGS;
}
- /* SEC kernel stability 2012-02-17 */
- if (NULL == session_data->cookies_map)
- {
- MSG_ERR(("session_data->cookies_map is NULL in _ump_ukk_map_mem()\n"));
- return _MALI_OSK_ERR_INVALID_ARGS;
- }
+
descriptor = (ump_memory_allocation*) _mali_osk_calloc( 1, sizeof(ump_memory_allocation));
if (NULL == descriptor)
{
@@ -288,12 +283,6 @@ _mali_osk_errcode_t _ump_ukk_map_mem( _ump_uk_map_mem_s *args )
args->is_cached = 1;
DBG_MSG(3, ("Mapping UMP secure_id: %d as cached.\n", args->secure_id));
}
- else if ( args->is_cached)
- {
- mem->is_cached = 1;
- descriptor->is_cached = 1;
- DBG_MSG(3, ("Warning mapping UMP secure_id: %d. As cached, while it was allocated uncached.\n", args->secure_id));
- }
else
{
descriptor->is_cached = 0;
@@ -366,17 +355,12 @@ void _ump_ukk_unmap_mem( _ump_uk_unmap_mem_s *args )
session_data = (ump_session_data *)args->ctx;
- if (NULL == session_data)
+ if( NULL == session_data )
{
MSG_ERR(("Session data is NULL in _ump_ukk_map_mem()\n"));
return;
}
- /* SEC kernel stability 2012-02-17 */
- if (NULL == session_data->cookies_map)
- {
- MSG_ERR(("session_data->cookies_map is NULL in _ump_ukk_map_mem()\n"));
- return;
- }
+
if (0 != ump_descriptor_mapping_get( session_data->cookies_map, (int)args->cookie, (void**)&descriptor) )
{
MSG_ERR(("_ump_ukk_map_mem: cookie 0x%X not found for this session\n", args->cookie ));
diff --git a/drivers/media/video/samsung/ump/common/ump_kernel_common.h b/drivers/media/video/samsung/ump/common/ump_kernel_common.h
index 03d213d..6e3a2e9 100644
--- a/drivers/media/video/samsung/ump/common/ump_kernel_common.h
+++ b/drivers/media/video/samsung/ump/common/ump_kernel_common.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
diff --git a/drivers/media/video/samsung/ump/common/ump_kernel_descriptor_mapping.c b/drivers/media/video/samsung/ump/common/ump_kernel_descriptor_mapping.c
index cc7b8be..d6b59b7 100755..100644
--- a/drivers/media/video/samsung/ump/common/ump_kernel_descriptor_mapping.c
+++ b/drivers/media/video/samsung/ump/common/ump_kernel_descriptor_mapping.c
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -65,9 +65,9 @@ void ump_descriptor_mapping_destroy(ump_descriptor_mapping * map)
int ump_descriptor_mapping_allocate_mapping(ump_descriptor_mapping * map, void * target)
{
- int descriptor = -1;/*-EFAULT;*/
- _mali_osk_lock_wait(map->lock, _MALI_OSK_LOCKMODE_RW);
- descriptor = _mali_osk_find_first_zero_bit(map->table->usage, map->current_nr_mappings);
+ int descriptor = -1;/*-EFAULT;*/
+ _mali_osk_lock_wait(map->lock, _MALI_OSK_LOCKMODE_RW);
+ descriptor = _mali_osk_find_first_zero_bit(map->table->usage, map->current_nr_mappings);
if (descriptor == map->current_nr_mappings)
{
int nr_mappings_new;
@@ -89,8 +89,8 @@ int ump_descriptor_mapping_allocate_mapping(ump_descriptor_mapping * map, void *
goto unlock_and_exit;
}
- _mali_osk_memcpy(new_table->usage, old_table->usage, (sizeof(unsigned long)*map->current_nr_mappings) / BITS_PER_LONG);
- _mali_osk_memcpy(new_table->mappings, old_table->mappings, map->current_nr_mappings * sizeof(void*));
+ _mali_osk_memcpy(new_table->usage, old_table->usage, (sizeof(unsigned long)*map->current_nr_mappings) / BITS_PER_LONG);
+ _mali_osk_memcpy(new_table->mappings, old_table->mappings, map->current_nr_mappings * sizeof(void*));
map->table = new_table;
map->current_nr_mappings = nr_mappings_new;
descriptor_table_free(old_table);
@@ -107,10 +107,10 @@ unlock_and_exit:
int ump_descriptor_mapping_get(ump_descriptor_mapping * map, int descriptor, void** target)
{
- int result = -1;/*-EFAULT;*/
- DEBUG_ASSERT(map);
- _mali_osk_lock_wait(map->lock, _MALI_OSK_LOCKMODE_RO);
- if ( (descriptor >= 0) && (descriptor < map->current_nr_mappings) && _mali_osk_test_bit(descriptor, map->table->usage) )
+ int result = -1;/*-EFAULT;*/
+ DEBUG_ASSERT(map);
+ _mali_osk_lock_wait(map->lock, _MALI_OSK_LOCKMODE_RO);
+ if ( (descriptor >= 0) && (descriptor < map->current_nr_mappings) && _mali_osk_test_bit(descriptor, map->table->usage) )
{
*target = map->table->mappings[descriptor];
result = 0;
@@ -122,9 +122,9 @@ int ump_descriptor_mapping_get(ump_descriptor_mapping * map, int descriptor, voi
int ump_descriptor_mapping_set(ump_descriptor_mapping * map, int descriptor, void * target)
{
- int result = -1;/*-EFAULT;*/
- _mali_osk_lock_wait(map->lock, _MALI_OSK_LOCKMODE_RO);
- if ( (descriptor >= 0) && (descriptor < map->current_nr_mappings) && _mali_osk_test_bit(descriptor, map->table->usage) )
+ int result = -1;/*-EFAULT;*/
+ _mali_osk_lock_wait(map->lock, _MALI_OSK_LOCKMODE_RO);
+ if ( (descriptor >= 0) && (descriptor < map->current_nr_mappings) && _mali_osk_test_bit(descriptor, map->table->usage) )
{
map->table->mappings[descriptor] = target;
result = 0;
@@ -135,8 +135,8 @@ int ump_descriptor_mapping_set(ump_descriptor_mapping * map, int descriptor, voi
void ump_descriptor_mapping_free(ump_descriptor_mapping * map, int descriptor)
{
- _mali_osk_lock_wait(map->lock, _MALI_OSK_LOCKMODE_RW);
- if ( (descriptor >= 0) && (descriptor < map->current_nr_mappings) && _mali_osk_test_bit(descriptor, map->table->usage) )
+ _mali_osk_lock_wait(map->lock, _MALI_OSK_LOCKMODE_RW);
+ if ( (descriptor >= 0) && (descriptor < map->current_nr_mappings) && _mali_osk_test_bit(descriptor, map->table->usage) )
{
map->table->mappings[descriptor] = NULL;
_mali_osk_clear_nonatomic_bit(descriptor, map->table->usage);
@@ -163,3 +163,4 @@ static void descriptor_table_free(ump_descriptor_table * table)
{
_mali_osk_free(table);
}
+
diff --git a/drivers/media/video/samsung/ump/common/ump_kernel_descriptor_mapping.h b/drivers/media/video/samsung/ump/common/ump_kernel_descriptor_mapping.h
index 881d3d8..05b3982 100755..100644
--- a/drivers/media/video/samsung/ump/common/ump_kernel_descriptor_mapping.h
+++ b/drivers/media/video/samsung/ump/common/ump_kernel_descriptor_mapping.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
diff --git a/drivers/media/video/samsung/ump/common/ump_kernel_memory_backend.h b/drivers/media/video/samsung/ump/common/ump_kernel_memory_backend.h
index 73915ee..a91ae28 100644
--- a/drivers/media/video/samsung/ump/common/ump_kernel_memory_backend.h
+++ b/drivers/media/video/samsung/ump/common/ump_kernel_memory_backend.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -40,8 +40,6 @@ typedef struct ump_memory_backend
u32 (*stat)(struct ump_memory_backend *backend);
int (*pre_allocate_physical_check)(void *ctx, u32 size);
u32 (*adjust_to_mali_phys)(void *ctx, u32 cpu_phys);
- void *(*get)(ump_dd_mem *mem, void *args);
- void (*set)(ump_dd_mem *mem, void *args);
void * ctx;
} ump_memory_backend;
@@ -49,3 +47,4 @@ ump_memory_backend * ump_memory_backend_create ( void );
void ump_memory_backend_destroy( void );
#endif /*__UMP_KERNEL_MEMORY_BACKEND_H__ */
+
diff --git a/drivers/media/video/samsung/ump/common/ump_kernel_ref_drv.c b/drivers/media/video/samsung/ump/common/ump_kernel_ref_drv.c
index a5ccfeb..cd5825e 100644
--- a/drivers/media/video/samsung/ump/common/ump_kernel_ref_drv.c
+++ b/drivers/media/video/samsung/ump/common/ump_kernel_ref_drv.c
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -158,8 +158,6 @@ _mali_osk_errcode_t _ump_ukk_allocate( _ump_uk_allocate_s *user_interaction )
new_allocation->is_cached = 0;
else new_allocation->is_cached = 1;
- new_allocation->backend_info = (void*)user_interaction->constraints;
-
/* special case a size of 0, we should try to emulate what malloc does in this case, which is to return a valid pointer that must be freed, but can't be dereferences */
if (0 == user_interaction->size)
{
@@ -197,65 +195,3 @@ _mali_osk_errcode_t _ump_ukk_allocate( _ump_uk_allocate_s *user_interaction )
return _MALI_OSK_ERR_OK;
}
-
-
-UMP_KERNEL_API_EXPORT ump_dd_status_code ump_dd_meminfo_set(ump_dd_handle memh, void* args)
-{
- ump_dd_mem * mem;
- ump_secure_id secure_id;
-
- DEBUG_ASSERT_POINTER(memh);
-
- secure_id = ump_dd_secure_id_get(memh);
-
- _mali_osk_lock_wait(device.secure_id_map_lock, _MALI_OSK_LOCKMODE_RW);
- if (0 == ump_descriptor_mapping_get(device.secure_id_map, (int)secure_id, (void**)&mem))
- {
- device.backend->set(mem, args);
- }
- else
- {
- _mali_osk_lock_signal(device.secure_id_map_lock, _MALI_OSK_LOCKMODE_RW);
- DBG_MSG(1, ("Failed to look up mapping in ump_meminfo_set(). ID: %u\n", (ump_secure_id)secure_id));
- return UMP_DD_INVALID;
- }
-
- _mali_osk_lock_signal(device.secure_id_map_lock, _MALI_OSK_LOCKMODE_RW);
-
- return UMP_DD_SUCCESS;
-}
-
-UMP_KERNEL_API_EXPORT void *ump_dd_meminfo_get(ump_secure_id secure_id, void* args)
-{
- ump_dd_mem * mem;
- void *result;
-
- _mali_osk_lock_wait(device.secure_id_map_lock, _MALI_OSK_LOCKMODE_RW);
- if (0 == ump_descriptor_mapping_get(device.secure_id_map, (int)secure_id, (void**)&mem))
- {
- result = device.backend->get(mem, args);
- }
- else
- {
- _mali_osk_lock_signal(device.secure_id_map_lock, _MALI_OSK_LOCKMODE_RW);
- DBG_MSG(1, ("Failed to look up mapping in ump_meminfo_get(). ID: %u\n", (ump_secure_id)secure_id));
- return UMP_DD_HANDLE_INVALID;
- }
-
- _mali_osk_lock_signal(device.secure_id_map_lock, _MALI_OSK_LOCKMODE_RW);
-
- return result;
-}
-
-UMP_KERNEL_API_EXPORT ump_dd_handle ump_dd_handle_get_from_vaddr(unsigned long vaddr)
-{
- ump_dd_mem * mem;
-
- DBG_MSG(5, ("Getting handle from Virtual address. vaddr: %u\n", vaddr));
-
- _ump_osk_mem_mapregion_get(&mem, vaddr);
-
- DBG_MSG(1, ("Getting handle's Handle : 0x%8lx\n", mem));
-
- return (ump_dd_handle)mem;
-}
diff --git a/drivers/media/video/samsung/ump/common/ump_kernel_types.h b/drivers/media/video/samsung/ump/common/ump_kernel_types.h
index fdacd86..19a9755 100644
--- a/drivers/media/video/samsung/ump/common/ump_kernel_types.h
+++ b/drivers/media/video/samsung/ump/common/ump_kernel_types.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
diff --git a/drivers/media/video/samsung/ump/common/ump_osk.h b/drivers/media/video/samsung/ump/common/ump_osk.h
index dabdc7f..cae0433 100644
--- a/drivers/media/video/samsung/ump/common/ump_osk.h
+++ b/drivers/media/video/samsung/ump/common/ump_osk.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -42,8 +42,6 @@ void _ump_osk_mem_mapregion_term( ump_memory_allocation * descriptor );
void _ump_osk_msync( ump_dd_mem * mem, void * virt, u32 offset, u32 size, ump_uk_msync_op op, ump_session_data * session_data );
-void _ump_osk_mem_mapregion_get( ump_dd_mem ** mem, unsigned long vaddr);
-
#ifdef __cplusplus
}
#endif
diff --git a/drivers/media/video/samsung/ump/common/ump_ukk.h b/drivers/media/video/samsung/ump/common/ump_ukk.h
index 4e6bb86..56e4be3 100644
--- a/drivers/media/video/samsung/ump/common/ump_ukk.h
+++ b/drivers/media/video/samsung/ump/common/ump_ukk.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
diff --git a/drivers/media/video/samsung/ump/include/ump_kernel_interface.h b/drivers/media/video/samsung/ump/include/ump_kernel_interface.h
index f84d237..042c8b1 100644
--- a/drivers/media/video/samsung/ump/include/ump_kernel_interface.h
+++ b/drivers/media/video/samsung/ump/include/ump_kernel_interface.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
diff --git a/drivers/media/video/samsung/ump/include/ump_kernel_interface_ref_drv.h b/drivers/media/video/samsung/ump/include/ump_kernel_interface_ref_drv.h
index 36c5c9d..c993746 100644
--- a/drivers/media/video/samsung/ump/include/ump_kernel_interface_ref_drv.h
+++ b/drivers/media/video/samsung/ump/include/ump_kernel_interface_ref_drv.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -23,10 +23,6 @@ extern "C" {
/** Turn specified physical memory into UMP memory. */
UMP_KERNEL_API_EXPORT ump_dd_handle ump_dd_handle_create_from_phys_blocks(ump_dd_physical_block * blocks, unsigned long num_blocks);
-UMP_KERNEL_API_EXPORT ump_dd_handle ump_dd_handle_get(ump_secure_id secure_id);
-UMP_KERNEL_API_EXPORT ump_dd_status_code ump_dd_meminfo_set(ump_dd_handle memh, void* args);
-UMP_KERNEL_API_EXPORT void *ump_dd_meminfo_get(ump_secure_id secure_id, void* args);
-UMP_KERNEL_API_EXPORT ump_dd_handle ump_dd_handle_get_from_vaddr(unsigned long vaddr);
#ifdef __cplusplus
}
diff --git a/drivers/media/video/samsung/ump/include/ump_kernel_interface_vcm.h b/drivers/media/video/samsung/ump/include/ump_kernel_interface_vcm.h
deleted file mode 100644
index 5ff4155..0000000
--- a/drivers/media/video/samsung/ump/include/ump_kernel_interface_vcm.h
+++ /dev/null
@@ -1,37 +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.
- */
-
-/**
- * @file ump_kernel_interface_vcm.h
- */
-
-#ifndef __UMP_KERNEL_INTERFACE_VCM_H__
-#define __UMP_KERNEL_INTERFACE_VCM_H__
-
-#include <linux/vcm-drv.h>
-#include <plat/s5p-vcm.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** Turn specified physical memory into UMP memory. */
-struct ump_vcm {
- struct vcm *vcm;
- struct vcm_res *vcm_res;
- unsigned int dev_id;
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __UMP_KERNEL_INTERFACE_VCM_H__ */
diff --git a/drivers/media/video/samsung/ump/include/ump_kernel_platform.h b/drivers/media/video/samsung/ump/include/ump_kernel_platform.h
index 339e967..4349605 100644
--- a/drivers/media/video/samsung/ump/include/ump_kernel_platform.h
+++ b/drivers/media/video/samsung/ump/include/ump_kernel_platform.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
diff --git a/drivers/media/video/samsung/ump/linux/license/gpl/ump_kernel_license.h b/drivers/media/video/samsung/ump/linux/license/gpl/ump_kernel_license.h
index 50a021c..187e33b 100755..100644
--- a/drivers/media/video/samsung/ump/linux/license/gpl/ump_kernel_license.h
+++ b/drivers/media/video/samsung/ump/linux/license/gpl/ump_kernel_license.h
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 2010-2012 ARM Limited. All rights reserved.
- *
+ * 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.
*/
diff --git a/drivers/media/video/samsung/ump/linux/ump_ioctl.h b/drivers/media/video/samsung/ump/linux/ump_ioctl.h
index 1d49b4d..83bb2a4 100644
--- a/drivers/media/video/samsung/ump/linux/ump_ioctl.h
+++ b/drivers/media/video/samsung/ump/linux/ump_ioctl.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -53,6 +53,7 @@ extern "C"
#define UMP_IOC_LOCK _IOW(UMP_IOCTL_NR, _UMP_IOC_LOCK, _ump_uk_lock_s)
#define UMP_IOC_UNLOCK _IOW(UMP_IOCTL_NR, _UMP_IOC_UNLOCK, _ump_uk_unlock_s)
+
#ifdef __cplusplus
}
#endif
diff --git a/drivers/media/video/samsung/ump/linux/ump_kernel_linux.c b/drivers/media/video/samsung/ump/linux/ump_kernel_linux.c
index 58cef54..158cc88 100644
--- a/drivers/media/video/samsung/ump/linux/ump_kernel_linux.c
+++ b/drivers/media/video/samsung/ump/linux/ump_kernel_linux.c
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -92,7 +92,7 @@ static int ump_file_ioctl(struct inode *inode, struct file *filp, unsigned int c
#endif
static int ump_file_mmap(struct file * filp, struct vm_area_struct * vma);
-#if defined(CONFIG_VIDEO_MALI400MP) || defined(CONFIG_VIDEO_MALI400MP_R3P0) || defined(CONFIG_VIDEO_MALI400MP_R2P3)
+#if defined(CONFIG_VIDEO_MALI400MP)
extern int map_errcode( _mali_osk_errcode_t err );
#endif
@@ -399,9 +399,8 @@ static int ump_file_ioctl(struct inode *inode, struct file *filp, unsigned int c
return err;
}
-#ifndef CONFIG_VIDEO_MALI400MP_R2P3
+
#ifndef CONFIG_VIDEO_MALI400MP
-#ifndef CONFIG_VIDEO_MALI400MP_R3P0
int map_errcode( _mali_osk_errcode_t err )
{
switch(err)
@@ -418,8 +417,7 @@ int map_errcode( _mali_osk_errcode_t err )
}
}
#endif
-#endif
-#endif
+
/*
* Handle from OS to map specified virtual memory to specified UMP memory.
*/
@@ -431,7 +429,7 @@ static int ump_file_mmap(struct file * filp, struct vm_area_struct * vma)
/* Validate the session data */
session_data = (struct ump_session_data *)filp->private_data;
- if (NULL == session_data || NULL == session_data->cookies_map->table->mappings)
+ if (NULL == session_data)
{
MSG_ERR(("mmap() called without any session data available\n"));
return -EFAULT;
@@ -476,9 +474,6 @@ EXPORT_SYMBOL(ump_dd_phys_blocks_get);
EXPORT_SYMBOL(ump_dd_size_get);
EXPORT_SYMBOL(ump_dd_reference_add);
EXPORT_SYMBOL(ump_dd_reference_release);
-EXPORT_SYMBOL(ump_dd_meminfo_get);
-EXPORT_SYMBOL(ump_dd_meminfo_set);
-EXPORT_SYMBOL(ump_dd_handle_get_from_vaddr);
/* Export our own extended kernel space allocator */
EXPORT_SYMBOL(ump_dd_handle_create_from_phys_blocks);
diff --git a/drivers/media/video/samsung/ump/linux/ump_kernel_linux.h b/drivers/media/video/samsung/ump/linux/ump_kernel_linux.h
index ef68040..4985bb7 100644
--- a/drivers/media/video/samsung/ump/linux/ump_kernel_linux.h
+++ b/drivers/media/video/samsung/ump/linux/ump_kernel_linux.h
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -15,4 +15,4 @@ int ump_kernel_device_initialize(void);
void ump_kernel_device_terminate(void);
-#endif /* __UMP_KERNEL_LINUX_H__ */
+#endif /* __UMP_KERNEL_H__ */
diff --git a/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_dedicated.c b/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_dedicated.c
index 82c16cc..463e609 100644
--- a/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_dedicated.c
+++ b/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_dedicated.c
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -108,8 +108,6 @@ ump_memory_backend * ump_block_allocator_create(u32 base_address, u32 size)
backend->stat = block_allocator_stat;
backend->pre_allocate_physical_check = NULL;
backend->adjust_to_mali_phys = NULL;
- backend->get = NULL;
- backend->set = NULL;
return backend;
}
diff --git a/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_dedicated.h b/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_dedicated.h
index 4f7180e..ca8faae 100755..100644
--- a/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_dedicated.h
+++ b/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_dedicated.h
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 2010-2012 ARM Limited. All rights reserved.
- *
+ * 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.
*/
@@ -20,3 +20,4 @@
ump_memory_backend * ump_block_allocator_create(u32 base_address, u32 size);
#endif /* __UMP_KERNEL_MEMORY_BACKEND_DEDICATED_H__ */
+
diff --git a/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_os.c b/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_os.c
index 2d81546..fc3afa8 100644
--- a/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_os.c
+++ b/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_os.c
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -77,8 +77,6 @@ ump_memory_backend * ump_os_memory_backend_create(const int max_allocation)
backend->stat = os_stat;
backend->pre_allocate_physical_check = NULL;
backend->adjust_to_mali_phys = NULL;
- backend->get = NULL;
- backend->set = NULL;
return backend;
}
@@ -136,7 +134,7 @@ static int os_allocate(void* ctx, ump_dd_mem * descriptor)
return 0; /* failure */
}
- while (left > 0)
+ while (left > 0 && ((info->num_pages_allocated + pages_allocated) < info->num_pages_max))
{
struct page * new_page;
@@ -149,7 +147,6 @@ static int os_allocate(void* ctx, ump_dd_mem * descriptor)
}
if (NULL == new_page)
{
- MSG_ERR(("UMP memory allocated: Out of Memory !!\n"));
break;
}
diff --git a/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_os.h b/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_os.h
index b638562d..6f7e610 100755..100644
--- a/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_os.h
+++ b/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_os.h
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 2010-2012 ARM Limited. All rights reserved.
- *
+ * 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.
*/
@@ -20,3 +20,4 @@
ump_memory_backend * ump_os_memory_backend_create(const int max_allocation);
#endif /* __UMP_KERNEL_MEMORY_BACKEND_OS_H__ */
+
diff --git a/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_vcm.c b/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_vcm.c
deleted file mode 100644
index 46797ea..0000000
--- a/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_vcm.c
+++ /dev/null
@@ -1,290 +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.
- */
-
-/* create by boojin.kim@samsung.com */
-/* needed to detect kernel version specific code */
-#include <linux/version.h>
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
-#include <linux/semaphore.h>
-#else /* pre 2.6.26 the file was in the arch specific location */
-#include <asm/semaphore.h>
-#endif
-
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <asm/atomic.h>
-#include <linux/vmalloc.h>
-#include <asm/cacheflush.h>
-#include "ump_kernel_common.h"
-#include "ump_kernel_memory_backend.h"
-#include "ump_kernel_interface_ref_drv.h"
-#include "ump_kernel_memory_backend_vcm.h"
-#include "../common/ump_uk_types.h"
-#include <linux/vcm-drv.h>
-#include <plat/s5p-vcm.h>
-#include <linux/dma-mapping.h>
-
-#define UMP_REF_DRV_UK_VCM_DEV_G2D 12
-
-typedef struct ump_vcm {
- struct vcm *vcm;
- struct vcm_res *vcm_res;
- unsigned int dev_id;
-} ump_vcm;
-
-typedef struct vcm_allocator {
- struct semaphore mutex;
- u32 num_vcm_blocks;
-} vcm_allocator;
-
-static void ump_vcm_free(void* ctx, ump_dd_mem * descriptor);
-static int ump_vcm_allocate(void* ctx, ump_dd_mem * descriptor);
-static void *vcm_res_get(ump_dd_mem *mem, void* args);
-static void vcm_attr_set(ump_dd_mem *mem, void* args);
-static int vcm_mem_allocator(vcm_allocator *info, ump_dd_mem *descriptor);
-static void vcm_memory_backend_destroy(ump_memory_backend * backend);
-
-
-/*
- * Create VCM memory backend
- */
-ump_memory_backend * ump_vcm_memory_backend_create(const int max_allocation)
-{
- ump_memory_backend * backend;
- vcm_allocator * info;
-
- info = kmalloc(sizeof(vcm_allocator), GFP_KERNEL);
- if (NULL == info)
- {
- return NULL;
- }
-
- info->num_vcm_blocks = 0;
-
-
- sema_init(&info->mutex, 1);
-
- backend = kmalloc(sizeof(ump_memory_backend), GFP_KERNEL);
- if (NULL == backend)
- {
- kfree(info);
- return NULL;
- }
-
- backend->ctx = info;
- backend->allocate = ump_vcm_allocate;
- backend->release = ump_vcm_free;
- backend->shutdown = vcm_memory_backend_destroy;
- backend->pre_allocate_physical_check = NULL;
- backend->adjust_to_mali_phys = NULL;
-
- backend->get = vcm_res_get;
- backend->set = vcm_attr_set;
-
-
- return backend;
-}
-
-/*
- * Destroy specified VCM memory backend
- */
-static void vcm_memory_backend_destroy(ump_memory_backend * backend)
-{
- vcm_allocator * info = (vcm_allocator*)backend->ctx;
-#if 0
- DBG_MSG_IF(1, 0 != info->num_pages_allocated, ("%d pages still in use during shutdown\n", info->num_pages_allocated));
-#endif
- kfree(info);
- kfree(backend);
-}
-
-/*
- * Allocate UMP memory
- */
-static int ump_vcm_allocate(void *ctx, ump_dd_mem * descriptor)
-{
- int ret; /* success */
- vcm_allocator *info;
- struct ump_vcm *ump_vcm;
-
- BUG_ON(!descriptor);
- BUG_ON(!ctx);
-
- info = (vcm_allocator*)ctx;
-
- ump_vcm = kmalloc(sizeof(struct ump_vcm), GFP_KERNEL);
- if (NULL == ump_vcm)
- {
- return 0;
- }
-
- ump_vcm->dev_id = (int)descriptor->backend_info & ~UMP_REF_DRV_UK_CONSTRAINT_USE_CACHE;
-
- if(ump_vcm->dev_id == UMP_REF_DRV_UK_CONSTRAINT_NONE) { /* None */
- ump_vcm->dev_id = UMP_REF_DRV_UK_VCM_DEV_G2D; /* this ID is G2D */
- }
- else if(ump_vcm->dev_id == UMP_REF_DRV_UK_CONSTRAINT_PHYSICALLY_LINEAR) { /* Physical Linear */
- return 0;
- }
- else { /* Other VCM */
- ump_vcm->dev_id -= 2;
- }
-
- DBG_MSG(5, ("Device ID for VCM : %d\n", ump_vcm->dev_id));
- ump_vcm->vcm = vcm_find_vcm(ump_vcm->dev_id);
-
- if (!ump_vcm->vcm)
- {
- return 0;
- }
- descriptor->backend_info = (void*)ump_vcm;
-
- if (down_interruptible(&info->mutex)) {
- DBG_MSG(1, ("Failed to get mutex in ump_vcm_allocate\n"));
- return 0; /* failure */
- }
-
- ret = vcm_mem_allocator(info, descriptor);
- up(&info->mutex);
-
- return ret; /* success */
-}
-
-static int vcm_mem_allocator(vcm_allocator *info, ump_dd_mem *descriptor)
-{
- unsigned long num_blocks;
- int i;
- struct vcm_phys *phys;
- struct vcm_phys_part *part;
- int size_total = 0;
- struct ump_vcm *ump_vcm;
-
- ump_vcm = (struct ump_vcm*)descriptor->backend_info;
-
- ump_vcm->vcm_res =
- vcm_make_binding(ump_vcm->vcm, descriptor->size_bytes,
- ump_vcm->dev_id, 0);
-
- phys = ump_vcm->vcm_res->phys;
- part = phys->parts;
- num_blocks = phys->count;
-
- DBG_MSG(5,
- ("Allocating page array. Size: %lu, VCM Reservation : 0x%x\n",
- phys->count * sizeof(ump_dd_physical_block),
- ump_vcm->vcm_res->start));
-
- /* Now, make a copy of the block information supplied by the user */
- descriptor->block_array =
- (ump_dd_physical_block *) vmalloc(sizeof(ump_dd_physical_block) *
- num_blocks);
-
- if (NULL == descriptor->block_array) {
- vfree(descriptor->block_array);
- DBG_MSG(1, ("Could not allocate a mem handle for function.\n"));
- return 0; /* failure */
- }
-
- for (i = 0; i < num_blocks; i++) {
- descriptor->block_array[i].addr = part->start;
- descriptor->block_array[i].size = part->size;
-
- dmac_unmap_area(phys_to_virt(part->start), part->size, DMA_FROM_DEVICE);
- outer_inv_range(part->start, part->start + part->size);
-
- ++part;
- size_total += descriptor->block_array[i].size;
- DBG_MSG(6,
- ("UMP memory created with VCM. addr 0x%x, size: 0x%x\n",
- descriptor->block_array[i].addr,
- descriptor->block_array[i].size));
- }
-
- descriptor->size_bytes = size_total;
- descriptor->nr_blocks = num_blocks;
- descriptor->ctx = NULL;
-
- info->num_vcm_blocks += num_blocks;
- return 1;
-}
-
-/*
- * Free specified UMP memory
- */
-static void ump_vcm_free(void *ctx, ump_dd_mem * descriptor)
-{
- struct ump_vcm *ump_vcm;
- vcm_allocator *info;
-
- BUG_ON(!descriptor);
- BUG_ON(!ctx);
-
- ump_vcm = (struct ump_vcm*)descriptor->backend_info;
- info = (vcm_allocator*)ctx;
-
- BUG_ON(descriptor->nr_blocks > info->num_vcm_blocks);
-
- if (down_interruptible(&info->mutex)) {
- DBG_MSG(1, ("Failed to get mutex in ump_vcm_free\n"));
- return;
- }
-
- DBG_MSG(5, ("Releasing %lu VCM pages\n", descriptor->nr_blocks));
-
- info->num_vcm_blocks -= descriptor->nr_blocks;
-
- up(&info->mutex);
-
- DBG_MSG(6, ("Freeing physical page by VCM\n"));
- vcm_destroy_binding(ump_vcm->vcm_res);
- ump_vcm->vcm = NULL;
- ump_vcm->vcm_res = NULL;
-
- kfree(ump_vcm);
- vfree(descriptor->block_array);
-}
-
-static void *vcm_res_get(ump_dd_mem *mem, void *args)
-{
- struct ump_vcm *ump_vcm;
- enum vcm_dev_id vcm_id;
-
- ump_vcm = (struct ump_vcm*)mem->backend_info;
- vcm_id = (enum vcm_dev_id)args;
-
- if (vcm_reservation_in_vcm
- (vcm_find_vcm(vcm_id), ump_vcm->vcm_res)
- == S5PVCM_RES_NOT_IN_VCM)
- return NULL;
- else
- return ump_vcm->vcm_res;
-}
-
-static void vcm_attr_set(ump_dd_mem *mem, void *args)
-{
- struct ump_vcm *ump_vcm, *ump_vcmh;
-
- ump_vcm = (struct ump_vcm*)args;
-
- ump_vcmh = kmalloc(sizeof(struct ump_vcm), GFP_KERNEL);
- if (NULL == ump_vcmh)
- {
- return;
- }
-
- ump_vcmh->dev_id = ump_vcm->dev_id;
- ump_vcmh->vcm = ump_vcm->vcm;
- ump_vcmh->vcm_res = ump_vcm->vcm_res;
-
- mem->backend_info= (void*)ump_vcmh;
-
- return;
-}
diff --git a/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_vcm.h b/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_vcm.h
deleted file mode 100644
index c1ead0d..0000000
--- a/drivers/media/video/samsung/ump/linux/ump_kernel_memory_backend_vcm.h
+++ /dev/null
@@ -1,22 +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.
- */
-
-/**
- * @file ump_kernel_memory_backend_vcm.h
- */
-
-#ifndef __UMP_KERNEL_MEMORY_BACKEND_VCM_H__
-#define __UMP_KERNEL_MEMORY_BACKEND_VCM_H__
-
-#include "ump_kernel_memory_backend.h"
-
-ump_memory_backend * ump_vcm_memory_backend_create(const int max_allocation);
-
-#endif /* __UMP_KERNEL_MEMORY_BACKEND_VCM_H__ */
diff --git a/drivers/media/video/samsung/ump/linux/ump_memory_backend.c b/drivers/media/video/samsung/ump/linux/ump_memory_backend.c
index 821ac27..23357f4 100644
--- a/drivers/media/video/samsung/ump/linux/ump_memory_backend.c
+++ b/drivers/media/video/samsung/ump/linux/ump_memory_backend.c
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 2010-2012 ARM Limited. All rights reserved.
- *
+ * 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.
*/
@@ -56,13 +56,6 @@ ump_memory_backend* ump_memory_backend_create ( void )
DBG_MSG(2, ("Using OS memory backend, allocation limit: %d\n", ump_memory_size));
backend = ump_os_memory_backend_create(ump_memory_size);
}
-#ifdef CONFIG_UMP_VCM_ALLOC
- else if (2 == ump_backend)
- {
- DBG_MSG(2, ("Using VCM memory backend, allocation limit: %d\n", ump_memory_size));
- backend = ump_vcm_memory_backend_create(ump_memory_size);
- }
-#endif
return backend;
}
diff --git a/drivers/media/video/samsung/ump/linux/ump_osk_atomics.c b/drivers/media/video/samsung/ump/linux/ump_osk_atomics.c
index 77be0c9..b117d99 100755..100644
--- a/drivers/media/video/samsung/ump/linux/ump_osk_atomics.c
+++ b/drivers/media/video/samsung/ump/linux/ump_osk_atomics.c
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 2010-2012 ARM Limited. All rights reserved.
- *
+ * 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.
*/
diff --git a/drivers/media/video/samsung/ump/linux/ump_osk_low_level_mem.c b/drivers/media/video/samsung/ump/linux/ump_osk_low_level_mem.c
index b38c714..0073c4d 100644
--- a/drivers/media/video/samsung/ump/linux/ump_osk_low_level_mem.c
+++ b/drivers/media/video/samsung/ump/linux/ump_osk_low_level_mem.c
@@ -1,9 +1,9 @@
/*
* 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.
*/
@@ -23,7 +23,6 @@
#include <linux/module.h> /* kernel module definitions */
#include <linux/kernel.h>
#include <linux/mm.h>
-#include <linux/sched.h>
#include <linux/slab.h>
#include <asm/memory.h>
@@ -106,8 +105,6 @@ static void ump_vma_close(struct vm_area_struct * vma)
DBG_MSG(4, ("VMA close, VMA reference count decremented. VMA: 0x%08lx, reference count: %d\n", (unsigned long)vma, new_val));
- vma_usage_tracker->descriptor->process_mapping_info = vma;
-
if (0 == new_val)
{
ump_memory_allocation * descriptor;
@@ -213,95 +210,6 @@ _mali_osk_errcode_t _ump_osk_mem_mapregion_map( ump_memory_allocation * descript
return retval;
}
-static u32 _ump_osk_virt_to_phys_start(ump_dd_mem * mem, u32 start, u32 address, int *index)
-{
- int i;
- u32 offset = address - start;
- ump_dd_physical_block *block;
- u32 sum = 0;
-
- for (i=0; i<mem->nr_blocks; i++) {
- block = &mem->block_array[i];
- sum += block->size;
- if (sum > offset) {
- *index = i;
- DBG_MSG(3, ("_ump_osk_virt_to_phys : index : %d, virtual 0x%x, phys 0x%x\n", i, address, (u32)block->addr + offset - (sum -block->size)));
- return (u32)block->addr + offset - (sum -block->size);
- }
- }
-
- return _MALI_OSK_ERR_FAULT;
-}
-
-static u32 _ump_osk_virt_to_phys_end(ump_dd_mem * mem, u32 start, u32 address, int *index)
-{
- int i;
- u32 offset = address - start;
- ump_dd_physical_block *block;
- u32 sum = 0;
-
- for (i=0; i<mem->nr_blocks; i++) {
- block = &mem->block_array[i];
- sum += block->size;
- if (sum >= offset) {
- *index = i;
- DBG_MSG(3, ("_ump_osk_virt_to_phys : index : %d, virtual 0x%x, phys 0x%x\n", i, address, (u32)block->addr + offset - (sum -block->size)));
- return (u32)block->addr + offset - (sum -block->size);
- }
- }
-
- return _MALI_OSK_ERR_FAULT;
-}
-
-static void _ump_osk_msync_with_virt(ump_dd_mem * mem, ump_uk_msync_op op, u32 start, u32 address, u32 size)
-{
- int start_index, end_index;
- u32 start_p, end_p;
-
- DBG_MSG(3, ("Cache flush with user virtual address. start : 0x%x, end : 0x%x, address 0x%x, size 0x%x\n", start, start+mem->size_bytes, address, size));
-
- start_p = _ump_osk_virt_to_phys_start(mem, start, address, &start_index);
- end_p = _ump_osk_virt_to_phys_end(mem, start, address+size, &end_index);
-
- if (start_index==end_index) {
- if (op == _UMP_UK_MSYNC_CLEAN_AND_INVALIDATE)
- outer_flush_range(start_p, end_p);
- else
- outer_clean_range(start_p, end_p);
- } else {
- ump_dd_physical_block *block;
- int i;
-
- for (i=start_index; i<=end_index; i++) {
- block = &mem->block_array[i];
-
- if (i == start_index) {
- if (op == _UMP_UK_MSYNC_CLEAN_AND_INVALIDATE) {
- outer_flush_range(start_p, block->addr+block->size);
- } else {
- outer_clean_range(start_p, block->addr+block->size);
- }
- }
- else if (i == end_index) {
- if (op == _UMP_UK_MSYNC_CLEAN_AND_INVALIDATE) {
- outer_flush_range(block->addr, end_p);
- } else {
- outer_clean_range(block->addr, end_p);
- }
- break;
- }
- else {
- if (op == _UMP_UK_MSYNC_CLEAN_AND_INVALIDATE) {
- outer_flush_range(block->addr, block->addr+block->size);
- } else {
- outer_clean_range(block->addr, block->addr+block->size);
- }
- }
- }
- }
- return;
-}
-
static void level1_cache_flush_all(void)
{
DBG_MSG(4, ("UMP[xx] Flushing complete L1 cache\n"));
@@ -436,39 +344,3 @@ void _ump_osk_msync( ump_dd_mem * mem, void * virt, u32 offset, u32 size, ump_uk
return;
}
-
-void _ump_osk_mem_mapregion_get( ump_dd_mem ** mem, unsigned long vaddr)
-{
- struct mm_struct *mm = current->mm;
- struct vm_area_struct *vma;
- ump_vma_usage_tracker * vma_usage_tracker;
- ump_memory_allocation *descriptor;
- ump_dd_handle handle;
-
- DBG_MSG(3, ("_ump_osk_mem_mapregion_get: vaddr 0x%08lx\n", vaddr));
-
- down_read(&mm->mmap_sem);
- vma = find_vma(mm, vaddr);
- up_read(&mm->mmap_sem);
- if(!vma)
- {
- DBG_MSG(3, ("Not found VMA\n"));
- *mem = NULL;
- return;
- }
- DBG_MSG(4, ("Get vma: 0x%08lx vma->vm_start: 0x%08lx\n", (unsigned long)vma, vma->vm_start));
-
- vma_usage_tracker = (struct ump_vma_usage_tracker*)vma->vm_private_data;
- if(vma_usage_tracker == NULL)
- {
- DBG_MSG(3, ("Not found vma_usage_tracker\n"));
- *mem = NULL;
- return;
- }
-
- descriptor = (struct ump_memory_allocation*)vma_usage_tracker->descriptor;
- handle = (ump_dd_handle)descriptor->handle;
-
- DBG_MSG(3, ("Get handle: 0x%08lx\n", handle));
- *mem = (ump_dd_mem*)handle;
-}
diff --git a/drivers/media/video/samsung/ump/linux/ump_osk_misc.c b/drivers/media/video/samsung/ump/linux/ump_osk_misc.c
index 1f1118e..3be6fed 100755..100644
--- a/drivers/media/video/samsung/ump/linux/ump_osk_misc.c
+++ b/drivers/media/video/samsung/ump/linux/ump_osk_misc.c
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 2010-2012 ARM Limited. All rights reserved.
- *
+ * 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.
*/
diff --git a/drivers/media/video/samsung/ump/linux/ump_ukk_ref_wrappers.c b/drivers/media/video/samsung/ump/linux/ump_ukk_ref_wrappers.c
index 405bdca..9692e5b 100644
--- a/drivers/media/video/samsung/ump/linux/ump_ukk_ref_wrappers.c
+++ b/drivers/media/video/samsung/ump/linux/ump_ukk_ref_wrappers.c
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 2010-2012 ARM Limited. All rights reserved.
- *
+ * 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.
*/
diff --git a/drivers/media/video/samsung/ump/linux/ump_ukk_ref_wrappers.h b/drivers/media/video/samsung/ump/linux/ump_ukk_ref_wrappers.h
index 8e3c0fc..416a584 100644
--- a/drivers/media/video/samsung/ump/linux/ump_ukk_ref_wrappers.h
+++ b/drivers/media/video/samsung/ump/linux/ump_ukk_ref_wrappers.h
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 2010-2012 ARM Limited. All rights reserved.
- *
+ * 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.
*/
diff --git a/drivers/media/video/samsung/ump/linux/ump_ukk_wrappers.c b/drivers/media/video/samsung/ump/linux/ump_ukk_wrappers.c
index e5c5903..780f311 100644
--- a/drivers/media/video/samsung/ump/linux/ump_ukk_wrappers.c
+++ b/drivers/media/video/samsung/ump/linux/ump_ukk_wrappers.c
@@ -1,9 +1,9 @@
/*
* 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.
*/
diff --git a/drivers/media/video/samsung/ump/linux/ump_ukk_wrappers.h b/drivers/media/video/samsung/ump/linux/ump_ukk_wrappers.h
index 99b790d..e87a903 100644
--- a/drivers/media/video/samsung/ump/linux/ump_ukk_wrappers.h
+++ b/drivers/media/video/samsung/ump/linux/ump_ukk_wrappers.h
@@ -1,9 +1,9 @@
/*
- * Copyright (C) 2010-2012 ARM Limited. All rights reserved.
- *
+ * 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.
*/
@@ -36,6 +36,8 @@ int ump_lock_wrapper(u32 __user * argument, struct ump_session_data * session_d
int ump_unlock_wrapper(u32 __user * argument, struct ump_session_data * session_data);
+
+
#ifdef __cplusplus
}
#endif