2 * simplefb.h - Simple Framebuffer Device
4 * Copyright (C) 2013 David Herrmann <dh.herrmann@gmail.com>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
12 #ifndef __PLATFORM_DATA_SIMPLEFB_H__
13 #define __PLATFORM_DATA_SIMPLEFB_H__
15 #include <drm/drm_fourcc.h>
17 #include <linux/kernel.h>
19 /* format array, use it to initialize a "struct simplefb_format" array */
20 #define SIMPLEFB_FORMATS \
22 { "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0}, DRM_FORMAT_RGB565 }, \
26 * Data-Format for Simple-Framebuffers
27 * @name: unique 0-terminated name that can be used to identify the mode
28 * @red,green,blue: Offsets and sizes of the single RGB parts
29 * @transp: Offset and size of the alpha bits. length=0 means no alpha
30 * @fourcc: 32bit DRM four-CC code (see drm_fourcc.h)
32 struct simplefb_format {
35 struct fb_bitfield red;
36 struct fb_bitfield green;
37 struct fb_bitfield blue;
38 struct fb_bitfield transp;
43 * Simple-Framebuffer description
44 * If the arch-boot code creates simple-framebuffers without DT support, it
45 * can pass the width, height, stride and format via this platform-data object.
46 * The framebuffer location must be given as IORESOURCE_MEM resource.
47 * @format must be a format as described in "struct simplefb_format" above.
49 struct simplefb_platform_data {
56 #endif /* __PLATFORM_DATA_SIMPLEFB_H__ */