From 7fafa6cf5c264b9fd55bc009373498f087fabf5b Mon Sep 17 00:00:00 2001 From: "jinhyung.jo" Date: Mon, 17 Mar 2014 14:51:21 +0900 Subject: [PATCH] maru_fb : Add a framebuffer device for Tizen emulator Add a framebuffer device for Tizen emulator Change-Id: I2090366287fb7769bae28286a6b21384ad233d4b Signed-off-by: Jinhyung Jo --- arch/x86/configs/i386_tizen_emul_defconfig | 1 + drivers/maru/Kconfig | 4 + drivers/maru/Makefile | 1 + drivers/maru/maru_fb.c | 2121 ++++++++++++++++++++ drivers/maru/maru_fb.h | 170 ++ 5 files changed, 2297 insertions(+) create mode 100644 drivers/maru/maru_fb.c create mode 100644 drivers/maru/maru_fb.h diff --git a/arch/x86/configs/i386_tizen_emul_defconfig b/arch/x86/configs/i386_tizen_emul_defconfig index 30dbcf4a68c0..179da08c7b41 100644 --- a/arch/x86/configs/i386_tizen_emul_defconfig +++ b/arch/x86/configs/i386_tizen_emul_defconfig @@ -2940,6 +2940,7 @@ CONFIG_IOMMU_SUPPORT=y # CONFIG_FMC is not set CONFIG_MARU=y CONFIG_MARU_VIRTIO_TOUCHSCREEN=y +CONFIG_MARU_FB=y CONFIG_MARU_CAMERA=y CONFIG_MARU_BACKLIGHT=y CONFIG_MARU_OVERLAY=y diff --git a/drivers/maru/Kconfig b/drivers/maru/Kconfig index af890d6fdff5..d188ace60de0 100644 --- a/drivers/maru/Kconfig +++ b/drivers/maru/Kconfig @@ -6,6 +6,10 @@ config MARU_VIRTIO_TOUCHSCREEN tristate "MARU Virtio Touchscreen Driver" depends on MARU != n +config MARU_FB + tristate "MARU framebuffer driver" + depends on MARU != n + config MARU_CAMERA tristate "MARU Camera Driver" depends on MARU != n && VIDEO_DEV && VIDEO_V4L2 diff --git a/drivers/maru/Makefile b/drivers/maru/Makefile index 65f592f13c1a..1c4005dab86b 100644 --- a/drivers/maru/Makefile +++ b/drivers/maru/Makefile @@ -1,4 +1,5 @@ obj-$(CONFIG_MARU_VIRTIO_TOUCHSCREEN) += maru_virtio_touchscreen.o +obj-$(CONFIG_MARU_FB) += maru_fb.o obj-$(CONFIG_MARU_CAMERA) += maru_camera.o obj-$(CONFIG_MARU_BACKLIGHT) += maru_bl.o obj-$(CONFIG_MARU_OVERLAY) += maru_overlay.o diff --git a/drivers/maru/maru_fb.c b/drivers/maru/maru_fb.c new file mode 100644 index 000000000000..a3a7eb4b518b --- /dev/null +++ b/drivers/maru/maru_fb.c @@ -0,0 +1,2121 @@ +/* + * Maru framebuffer device driver + * Based on driver/video/uvesafb.c: + * + * Copyright (C) 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Jinhyung Jo + * GiWoong Kim + * YeongKyoon Lee + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Contributors: + * - S-Core Co., Ltd + * + */ + +/* + * A framebuffer driver for VBE 2.0+ compliant video cards + * + * (c) 2007 Michal Januszewski + * Loosely based upon the vesafb driver. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include