diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-04 12:12:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-04 12:12:17 -0400 |
commit | 228abe73ad67665d71eacd6a8a347dd76b0115ae (patch) | |
tree | dfa4e0d394aab9b54ed1662eb611ea8e1904ac58 /include/linux | |
parent | 1f9c52e16b5f67131440ddd51bd0cff27e45ea10 (diff) | |
parent | 765d5b9c2b72f5b99722cdfcf4bf8f88c556cf92 (diff) |
Merge branch 'x86-fb-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fb changes from Ingo Molnar:
"This tree includes preparatory patches for SimpleDRM driver support,
by David Herrmann. They clean up x86 framebuffer support by creating
simplefb devices wherever possible. More background can be found at
http://lwn.net/Articles/558104/"
* 'x86-fb-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
fbdev: fbcon: select VT_HW_CONSOLE_BINDING
fbdev: efifb: bind to efi-framebuffer
fbdev: vesafb: bind to platform-framebuffer device
fbdev: simplefb: add common x86 RGB formats
x86: sysfb: move EFI quirks from efifb to sysfb
x86: provide platform-devices for boot-framebuffers
fbdev: simplefb: mark as fw and allocate apertures
fbdev: simplefb: add init through platform_data
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/platform_data/simplefb.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/include/linux/platform_data/simplefb.h b/include/linux/platform_data/simplefb.h new file mode 100644 index 000000000000..53774b0cd8e9 --- /dev/null +++ b/include/linux/platform_data/simplefb.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * simplefb.h - Simple Framebuffer Device | ||
3 | * | ||
4 | * Copyright (C) 2013 David Herrmann <dh.herrmann@gmail.com> | ||
5 | * | ||
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. | ||
10 | */ | ||
11 | |||
12 | #ifndef __PLATFORM_DATA_SIMPLEFB_H__ | ||
13 | #define __PLATFORM_DATA_SIMPLEFB_H__ | ||
14 | |||
15 | #include <drm/drm_fourcc.h> | ||
16 | #include <linux/fb.h> | ||
17 | #include <linux/kernel.h> | ||
18 | |||
19 | /* format array, use it to initialize a "struct simplefb_format" array */ | ||
20 | #define SIMPLEFB_FORMATS \ | ||
21 | { \ | ||
22 | { "r5g6b5", 16, {11, 5}, {5, 6}, {0, 5}, {0, 0}, DRM_FORMAT_RGB565 }, \ | ||
23 | { "x1r5g5b5", 16, {10, 5}, {5, 5}, {0, 5}, {0, 0}, DRM_FORMAT_XRGB1555 }, \ | ||
24 | { "a1r5g5b5", 16, {10, 5}, {5, 5}, {0, 5}, {15, 1}, DRM_FORMAT_ARGB1555 }, \ | ||
25 | { "r8g8b8", 24, {16, 8}, {8, 8}, {0, 8}, {0, 0}, DRM_FORMAT_RGB888 }, \ | ||
26 | { "x8r8g8b8", 32, {16, 8}, {8, 8}, {0, 8}, {0, 0}, DRM_FORMAT_XRGB8888 }, \ | ||
27 | { "a8r8g8b8", 32, {16, 8}, {8, 8}, {0, 8}, {24, 8}, DRM_FORMAT_ARGB8888 }, \ | ||
28 | { "x2r10g10b10", 32, {20, 10}, {10, 10}, {0, 10}, {0, 0}, DRM_FORMAT_XRGB2101010 }, \ | ||
29 | { "a2r10g10b10", 32, {20, 10}, {10, 10}, {0, 10}, {30, 2}, DRM_FORMAT_ARGB2101010 }, \ | ||
30 | } | ||
31 | |||
32 | /* | ||
33 | * Data-Format for Simple-Framebuffers | ||
34 | * @name: unique 0-terminated name that can be used to identify the mode | ||
35 | * @red,green,blue: Offsets and sizes of the single RGB parts | ||
36 | * @transp: Offset and size of the alpha bits. length=0 means no alpha | ||
37 | * @fourcc: 32bit DRM four-CC code (see drm_fourcc.h) | ||
38 | */ | ||
39 | struct simplefb_format { | ||
40 | const char *name; | ||
41 | u32 bits_per_pixel; | ||
42 | struct fb_bitfield red; | ||
43 | struct fb_bitfield green; | ||
44 | struct fb_bitfield blue; | ||
45 | struct fb_bitfield transp; | ||
46 | u32 fourcc; | ||
47 | }; | ||
48 | |||
49 | /* | ||
50 | * Simple-Framebuffer description | ||
51 | * If the arch-boot code creates simple-framebuffers without DT support, it | ||
52 | * can pass the width, height, stride and format via this platform-data object. | ||
53 | * The framebuffer location must be given as IORESOURCE_MEM resource. | ||
54 | * @format must be a format as described in "struct simplefb_format" above. | ||
55 | */ | ||
56 | struct simplefb_platform_data { | ||
57 | u32 width; | ||
58 | u32 height; | ||
59 | u32 stride; | ||
60 | const char *format; | ||
61 | }; | ||
62 | |||
63 | #endif /* __PLATFORM_DATA_SIMPLEFB_H__ */ | ||