Some hardware can read the alpha components separately and then conditionally fetch color components only for non-zero alpha values. This patch adds fourcc definitions for two-plane RGB formats with an 8-bit alpha channel on a second plane.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -113,6 +113,20 @@ extern "C" { · 112 unmodified lines | ||
| 113 | 113 | |
| 114 | 114 | #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ |
| 115 | 115 | |
| 116 | +/* | |
| 117 | + * 2 plane RGB + A | |
| 118 | + * index 0 = RGB plane, same format as the corresponding non _A8 format has | |
| 119 | + * index 1 = A plane, [7:0] A | |
| 120 | + */ | |
| 121 | +#define DRM_FORMAT_XRGB8888_A8 fourcc_code('X', 'R', 'A', '8') | |
| 122 | +#define DRM_FORMAT_XBGR8888_A8 fourcc_code('X', 'B', 'A', '8') | |
| 123 | +#define DRM_FORMAT_RGBX8888_A8 fourcc_code('R', 'X', 'A', '8') | |
| 124 | +#define DRM_FORMAT_BGRX8888_A8 fourcc_code('B', 'X', 'A', '8') | |
| 125 | +#define DRM_FORMAT_RGB888_A8 fourcc_code('R', '8', 'A', '8') | |
| 126 | +#define DRM_FORMAT_BGR888_A8 fourcc_code('B', '8', 'A', '8') | |
| 127 | +#define DRM_FORMAT_RGB565_A8 fourcc_code('R', '5', 'A', '8') | |
| 128 | +#define DRM_FORMAT_BGR565_A8 fourcc_code('B', '5', 'A', '8') | |
| 129 | + | |
| 116 | 130 | /* |
| 117 | 131 | * 2 plane YCbCr |
| 118 | 132 | * index 0 = Y plane, [7:0] Y |