From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-ea0-x235.google.com ([2a00:1450:4013:c01::235]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VZRSE-0004BE-B2 for barebox@lists.infradead.org; Thu, 24 Oct 2013 20:24:29 +0000 Received: by mail-ea0-f181.google.com with SMTP id d10so21815eaj.26 for ; Thu, 24 Oct 2013 13:24:04 -0700 (PDT) Received: from mamamia.internal (a89-182-11-81.net-htp.de. [89.182.11.81]) by mx.google.com with ESMTPSA id bn13sm8547646eeb.11.2013.10.24.13.24.02 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Oct 2013 13:24:03 -0700 (PDT) From: Andre Heider Date: Thu, 24 Oct 2013 22:23:44 +0200 Message-Id: <1382646226-24871-5-git-send-email-a.heider@gmail.com> In-Reply-To: <1382646226-24871-1-git-send-email-a.heider@gmail.com> References: <1382646226-24871-1-git-send-email-a.heider@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 4/6] video: add a simple framebuffer driver To: barebox@lists.infradead.org This architecture independend driver implements a framebuffer driver based on a raw memory region that may be rendered to. It is the counterpart of the kernel driver with the same name. Platforms can configure display devices to scan out from such a memory region and set it up with a single function call. Doing so provides a framebuffer driver for barebox and a configuration of the corresponding kernel driver through device tree. Signed-off-by: Andre Heider --- drivers/video/Kconfig | 12 +++ drivers/video/Makefile | 1 + drivers/video/simplefb.c | 224 +++++++++++++++++++++++++++++++++++++++++++++++ include/video/simplefb.h | 21 +++++ 4 files changed, 258 insertions(+) create mode 100644 drivers/video/simplefb.c create mode 100644 include/video/simplefb.h diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 0639d9c..9afa7e8 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -71,4 +71,16 @@ config DRIVER_VIDEO_PXA Add support for the frame buffer device found on the PXA270 CPU. +config DRIVER_VIDEO_SIMPLEFB + bool "Simple framebuffer support" + depends on OFTREE + depends on ARCH_BCM2835 + help + Say Y if you want support for a simple frame-buffer. + + This driver provides the framebuffer configuration to the kernel + through device tree. + + The corresponding kernel driver has to be enabled to use this feature. + endif diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 67169d1..0da7c2b 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -9,3 +9,4 @@ obj-$(CONFIG_DRIVER_VIDEO_S3C24XX) += s3c24xx.o obj-$(CONFIG_DRIVER_VIDEO_PXA) += pxa.o obj-$(CONFIG_DRIVER_VIDEO_SDL) += sdl.o obj-$(CONFIG_DRIVER_VIDEO_OMAP) += omap.o +obj-$(CONFIG_DRIVER_VIDEO_SIMPLEFB) += simplefb.o diff --git a/drivers/video/simplefb.c b/drivers/video/simplefb.c new file mode 100644 index 0000000..f096c36 --- /dev/null +++ b/drivers/video/simplefb.c @@ -0,0 +1,224 @@ +/* + * SimpleFB driver + * + * Copyright (C) 2013 Andre Heider + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include