From ec3fd76a1edd94995318f1c3118e4abe8e47aced Mon Sep 17 00:00:00 2001 From: Per-Daniel Olsson Date: Fri, 10 Feb 2012 20:10:44 +0100 Subject: misc: clonedev: New device for cloning A new device for content cloning between drifferent instances of comdev has been added. ST-Ericsson Linux next: NA ST-Ericsson ID: 404691 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I8c96bede685fad46ebb51b0217c48164dcad6659 Signed-off-by: Per-Daniel Olsson Conflicts: drivers/video/mcde/display-av8100.c Signed-off-by: Per-Daniel Olsson Change-Id: I8c96bede685fad46ebb51b0217c48164dcad6659 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/49977 Reviewed-by: Robert FEKETE --- drivers/misc/Kconfig | 16 ++ drivers/misc/Makefile | 1 + drivers/misc/clonedev/Makefile | 5 + drivers/misc/clonedev/clonedev.c | 312 ++++++++++++++++++++++++++++++++++++ drivers/video/mcde/display-av8100.c | 42 ++++- include/linux/clonedev.h | 50 ++++++ 6 files changed, 424 insertions(+), 2 deletions(-) create mode 100644 drivers/misc/clonedev/Makefile create mode 100644 drivers/misc/clonedev/clonedev.c create mode 100644 include/linux/clonedev.h diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index c7c7114859f..0e2c6a34f19 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -479,6 +479,22 @@ config COMPDEV This driver replaces the use of the framebuffer The device allows for posting userspace buffers to be used with the overlays. +config CLONEDEV + bool "Display cloning device" + depends on FB_MCDE && HWMEM && COMPDEV + default n + help + This driver provides a way to clone content between two compdev + devices. + +config CLONEDEV_DEBUG + bool "Display cloning device debug" + depends on CLONEDEV + default n + help + This driver provides a way to clone content between two compdev + devices. + config PCH_PHUB tristate "Intel EG20T PCH/LAPIS Semicon IOH(ML7213/ML7223/ML7831) PHUB" depends on PCI diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 6f925aafbd5..570f57e2717 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -48,6 +48,7 @@ obj-y += lis3lv02d/ obj-y += carma/ obj-$(CONFIG_DISPDEV) += dispdev/ obj-$(CONFIG_COMPDEV) += compdev/ +obj-$(CONFIG_CLONEDEV) += clonedev/ obj-$(CONFIG_USB_SWITCH_FSA9480) += fsa9480.o obj-$(CONFIG_ALTERA_STAPL) +=altera-stapl/ obj-$(CONFIG_MAX8997_MUIC) += max8997-muic.o diff --git a/drivers/misc/clonedev/Makefile b/drivers/misc/clonedev/Makefile new file mode 100644 index 00000000000..f84859dd3ee --- /dev/null +++ b/drivers/misc/clonedev/Makefile @@ -0,0 +1,5 @@ +obj-$(CONFIG_CLONEDEV) += clonedev.o + +ifdef CONFIG_CLONEDEV_DEBUG +EXTRA_CFLAGS += -DDEBUG +endif diff --git a/drivers/misc/clonedev/clonedev.c b/drivers/misc/clonedev/clonedev.c new file mode 100644 index 00000000000..d3b770fd324 --- /dev/null +++ b/drivers/misc/clonedev/clonedev.c @@ -0,0 +1,312 @@ +/* + * Copyright (C) ST-Ericsson SA 2011 + * + * Device for display cloning on external output. + * + * Author: Per-Daniel Olsson + * for ST-Ericsson. + * + * License terms: GNU General Public License (GPL), version 2. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include