From f9309086600f7689b61f38bb53ac00e45bb45f8f Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Tue, 9 Jul 2013 13:07:26 -0700 Subject: [PATCH] video: adf: add fbdev compatibility helper Change-Id: I2b82bb625f805e8edb27799743b290dda5befb97 Signed-off-by: Greg Hackmann --- drivers/video/adf/Kconfig | 5 + drivers/video/adf/Makefile | 2 + drivers/video/adf/adf_fbdev.c | 651 ++++++++++++++++++++++++++++++++++ include/video/adf_fbdev.h | 59 +++ 4 files changed, 717 insertions(+) create mode 100644 drivers/video/adf/adf_fbdev.c create mode 100644 include/video/adf_fbdev.h diff --git a/drivers/video/adf/Kconfig b/drivers/video/adf/Kconfig index fcd725fb93d8..33858b73d8bb 100644 --- a/drivers/video/adf/Kconfig +++ b/drivers/video/adf/Kconfig @@ -3,6 +3,11 @@ menuconfig ADF depends on DMA_SHARED_BUFFER tristate "Atomic Display Framework" +menuconfig ADF_FBDEV + depends on ADF + depends on FB + tristate "Helper for implementing the fbdev API in ADF drivers" + menuconfig ADF_MEMBLOCK depends on ADF depends on HAVE_MEMBLOCK diff --git a/drivers/video/adf/Makefile b/drivers/video/adf/Makefile index 4118f324f654..78d0915122f4 100644 --- a/drivers/video/adf/Makefile +++ b/drivers/video/adf/Makefile @@ -10,4 +10,6 @@ obj-$(CONFIG_ADF) += adf.o \ obj-$(CONFIG_COMPAT) += adf_fops32.o +obj-$(CONFIG_ADF_FBDEV) += adf_fbdev.o + obj-$(CONFIG_ADF_MEMBLOCK) += adf_memblock.o diff --git a/drivers/video/adf/adf_fbdev.c b/drivers/video/adf/adf_fbdev.c new file mode 100644 index 000000000000..477abd63ccc2 --- /dev/null +++ b/drivers/video/adf/adf_fbdev.c @@ -0,0 +1,651 @@ +/* + * Copyright (C) 2013 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include + +#include