diff options
author | Fabien Dessenne <fabien.dessenne@st.com> | 2015-02-04 12:12:53 -0500 |
---|---|---|
committer | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2015-02-05 04:27:32 -0500 |
commit | 8adb57763e8b4f85607b000a0295747d0a338c32 (patch) | |
tree | 90c7e4ffb2c3b4a8d37e7329d3071f2cf14e512a | |
parent | 4af6b12ad57aae1e9798df499e81e309c7f0bc26 (diff) |
drm: sti: add support of XBGR8888 for gdp plane
Use GDP capabilities to support DRM_FORMAT_XBGR8888 (XB24)
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
-rw-r--r-- | drivers/gpu/drm/sti/sti_gdp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c index f018bb1bb2b7..087906fd8846 100644 --- a/drivers/gpu/drm/sti/sti_gdp.c +++ b/drivers/gpu/drm/sti/sti_gdp.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #define GDP_RGB565 0x00 | 23 | #define GDP_RGB565 0x00 |
24 | #define GDP_RGB888 0x01 | 24 | #define GDP_RGB888 0x01 |
25 | #define GDP_RGB888_32 0x02 | 25 | #define GDP_RGB888_32 0x02 |
26 | #define GDP_XBGR8888 (GDP_RGB888_32 | BIGNOTLITTLE | ALPHASWITCH) | ||
26 | #define GDP_ARGB8565 0x04 | 27 | #define GDP_ARGB8565 0x04 |
27 | #define GDP_ARGB8888 0x05 | 28 | #define GDP_ARGB8888 0x05 |
28 | #define GDP_ABGR8888 (GDP_ARGB8888 | BIGNOTLITTLE | ALPHASWITCH) | 29 | #define GDP_ABGR8888 (GDP_ARGB8888 | BIGNOTLITTLE | ALPHASWITCH) |
@@ -106,6 +107,7 @@ struct sti_gdp { | |||
106 | 107 | ||
107 | static const uint32_t gdp_supported_formats[] = { | 108 | static const uint32_t gdp_supported_formats[] = { |
108 | DRM_FORMAT_XRGB8888, | 109 | DRM_FORMAT_XRGB8888, |
110 | DRM_FORMAT_XBGR8888, | ||
109 | DRM_FORMAT_ARGB8888, | 111 | DRM_FORMAT_ARGB8888, |
110 | DRM_FORMAT_ABGR8888, | 112 | DRM_FORMAT_ABGR8888, |
111 | DRM_FORMAT_ARGB4444, | 113 | DRM_FORMAT_ARGB4444, |
@@ -133,6 +135,8 @@ static int sti_gdp_fourcc2format(int fourcc) | |||
133 | switch (fourcc) { | 135 | switch (fourcc) { |
134 | case DRM_FORMAT_XRGB8888: | 136 | case DRM_FORMAT_XRGB8888: |
135 | return GDP_RGB888_32; | 137 | return GDP_RGB888_32; |
138 | case DRM_FORMAT_XBGR8888: | ||
139 | return GDP_XBGR8888; | ||
136 | case DRM_FORMAT_ARGB8888: | 140 | case DRM_FORMAT_ARGB8888: |
137 | return GDP_ARGB8888; | 141 | return GDP_ARGB8888; |
138 | case DRM_FORMAT_ABGR8888: | 142 | case DRM_FORMAT_ABGR8888: |