-
Notifications
You must be signed in to change notification settings - Fork 1
/
0027-gbm-add-some-new-GBM-formats.patch
67 lines (61 loc) · 1.9 KB
/
0027-gbm-add-some-new-GBM-formats.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From 6aa787a271591780a5209c89a115d1f4621f0fe5 Mon Sep 17 00:00:00 2001
From: Silvestrs Timofejevs <[email protected]>
Date: Thu, 30 Aug 2018 13:48:53 +0100
Subject: [PATCH] gbm: add some new GBM formats
GBM_FORMAT_ARGB4444
GBM_FORMAT_BGR888
GBM_FORMAT_YUYV
GBM_FORMAT_YVU444_PACK10_IMG
---
src/gbm/backends/dri/gbm_dri.c | 16 ++++++++++++++++
src/gbm/main/gbm.h | 2 ++
2 files changed, 18 insertions(+)
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index fc0bbf5..1759458 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -564,11 +564,21 @@ static const struct gbm_dri_visual gbm_dri_visuals_table[] = {
{ 10, 5, 0, 11 },
{ 5, 5, 5, 1 },
},
+ {
+ GBM_FORMAT_ARGB4444, __DRI_IMAGE_FORMAT_ARGB4444,
+ { 8, 4, 0, 12 },
+ { 4, 4, 4, 4 },
+ },
{
GBM_FORMAT_RGB565, __DRI_IMAGE_FORMAT_RGB565,
{ 11, 5, 0, -1 },
{ 5, 6, 5, 0 },
},
+ {
+ GBM_FORMAT_BGR888, __DRI_IMAGE_FORMAT_BGR888,
+ { 0, 8, 16, -1 },
+ { 8, 8, 8, 0 },
+ },
{
GBM_FORMAT_XRGB8888, __DRI_IMAGE_FORMAT_XRGB8888,
{ 16, 8, 0, -1 },
@@ -621,6 +631,12 @@ static const struct gbm_dri_visual gbm_dri_visuals_table[] = {
{ 16, 16, 16, 16 },
true,
},
+ {
+ GBM_FORMAT_YUYV, __DRI_IMAGE_FORMAT_YUYV,
+ },
+ {
+ GBM_FORMAT_YVU444_PACK10_IMG, __DRI_IMAGE_FORMAT_YVU444_PACK10_IMG,
+ },
};
static int
diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h
index 57fd1b9..bd4185b 100644
--- a/src/gbm/main/gbm.h
+++ b/src/gbm/main/gbm.h
@@ -174,6 +174,8 @@ enum gbm_bo_format {
#define GBM_FORMAT_AYUV __gbm_fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
+#define GBM_FORMAT_YVU444_PACK10_IMG __gbm_fourcc_code('I', 'M', 'G', '2') /* [31:0] unused:Y:Cr:Cb 2:10:10:10 little endian */
+
/*
* 2 plane YCbCr
* index 0 = Y plane, [7:0] Y