Commit 4af6b12a authored by Benjamin Gaignard's avatar Benjamin Gaignard

drm: sti: add support of ABGR8888 for gdp plane

Use GDP capabilities to support DRM_FORMAT_ABGR8888 (AB24)
Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
parent 17ba9810
...@@ -14,7 +14,9 @@ ...@@ -14,7 +14,9 @@
#include "sti_layer.h" #include "sti_layer.h"
#include "sti_vtg.h" #include "sti_vtg.h"
#define ALPHASWITCH BIT(6)
#define ENA_COLOR_FILL BIT(8) #define ENA_COLOR_FILL BIT(8)
#define BIGNOTLITTLE BIT(23)
#define WAIT_NEXT_VSYNC BIT(31) #define WAIT_NEXT_VSYNC BIT(31)
/* GDP color formats */ /* GDP color formats */
...@@ -23,6 +25,7 @@ ...@@ -23,6 +25,7 @@
#define GDP_RGB888_32 0x02 #define GDP_RGB888_32 0x02
#define GDP_ARGB8565 0x04 #define GDP_ARGB8565 0x04
#define GDP_ARGB8888 0x05 #define GDP_ARGB8888 0x05
#define GDP_ABGR8888 (GDP_ARGB8888 | BIGNOTLITTLE | ALPHASWITCH)
#define GDP_ARGB1555 0x06 #define GDP_ARGB1555 0x06
#define GDP_ARGB4444 0x07 #define GDP_ARGB4444 0x07
#define GDP_CLUT8 0x0B #define GDP_CLUT8 0x0B
...@@ -104,6 +107,7 @@ struct sti_gdp { ...@@ -104,6 +107,7 @@ struct sti_gdp {
static const uint32_t gdp_supported_formats[] = { static const uint32_t gdp_supported_formats[] = {
DRM_FORMAT_XRGB8888, DRM_FORMAT_XRGB8888,
DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB8888,
DRM_FORMAT_ABGR8888,
DRM_FORMAT_ARGB4444, DRM_FORMAT_ARGB4444,
DRM_FORMAT_ARGB1555, DRM_FORMAT_ARGB1555,
DRM_FORMAT_RGB565, DRM_FORMAT_RGB565,
...@@ -131,6 +135,8 @@ static int sti_gdp_fourcc2format(int fourcc) ...@@ -131,6 +135,8 @@ static int sti_gdp_fourcc2format(int fourcc)
return GDP_RGB888_32; return GDP_RGB888_32;
case DRM_FORMAT_ARGB8888: case DRM_FORMAT_ARGB8888:
return GDP_ARGB8888; return GDP_ARGB8888;
case DRM_FORMAT_ABGR8888:
return GDP_ABGR8888;
case DRM_FORMAT_ARGB4444: case DRM_FORMAT_ARGB4444:
return GDP_ARGB4444; return GDP_ARGB4444;
case DRM_FORMAT_ARGB1555: case DRM_FORMAT_ARGB1555:
...@@ -157,6 +163,7 @@ static int sti_gdp_get_alpharange(int format) ...@@ -157,6 +163,7 @@ static int sti_gdp_get_alpharange(int format)
case GDP_ARGB8565: case GDP_ARGB8565:
case GDP_ARGB8888: case GDP_ARGB8888:
case GDP_AYCBR8888: case GDP_AYCBR8888:
case GDP_ABGR8888:
return GAM_GDP_ALPHARANGE_255; return GAM_GDP_ALPHARANGE_255;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment