1
2
3
4
5
6
7
8
9
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
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 { "a8b8g8r8", 32, {0, 8}, {8, 8}, {16, 8}, {24, 8}, DRM_FORMAT_ABGR8888 }, \
29 { "x2r10g10b10", 32, {20, 10}, {10, 10}, {0, 10}, {0, 0}, DRM_FORMAT_XRGB2101010 }, \
30 { "a2r10g10b10", 32, {20, 10}, {10, 10}, {0, 10}, {30, 2}, DRM_FORMAT_ARGB2101010 }, \
31}
32
33
34
35
36
37
38
39
40struct simplefb_format {
41 const char *name;
42 u32 bits_per_pixel;
43 struct fb_bitfield red;
44 struct fb_bitfield green;
45 struct fb_bitfield blue;
46 struct fb_bitfield transp;
47 u32 fourcc;
48};
49
50
51
52
53
54
55
56
57struct simplefb_platform_data {
58 u32 width;
59 u32 height;
60 u32 stride;
61 const char *format;
62};
63
64#endif
65