drm/msm/dpu: Add UBWC support for RGB8888 formats
Hardware only natively supports BGR8888 UBWC. UBWC support for RGB8888 can be had by pretending that the buffer is BGR. Signed-off-by: Fritz Koenig <frkoenig@google.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Rob Clark <robdclark@chromium.org>
This commit is contained in:
parent
abda0d925f
commit
cb929b8f5f
|
@ -489,12 +489,28 @@ static const struct dpu_format dpu_format_map_ubwc[] = {
|
||||||
true, 4, DPU_FORMAT_FLAG_COMPRESSED,
|
true, 4, DPU_FORMAT_FLAG_COMPRESSED,
|
||||||
DPU_FETCH_UBWC, 2, DPU_TILE_HEIGHT_UBWC),
|
DPU_FETCH_UBWC, 2, DPU_TILE_HEIGHT_UBWC),
|
||||||
|
|
||||||
|
/* ARGB8888 and ABGR8888 purposely have the same color
|
||||||
|
* ordering. The hardware only supports ABGR8888 UBWC
|
||||||
|
* natively.
|
||||||
|
*/
|
||||||
|
INTERLEAVED_RGB_FMT_TILED(ARGB8888,
|
||||||
|
COLOR_8BIT, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
||||||
|
C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA, 4,
|
||||||
|
true, 4, DPU_FORMAT_FLAG_COMPRESSED,
|
||||||
|
DPU_FETCH_UBWC, 2, DPU_TILE_HEIGHT_UBWC),
|
||||||
|
|
||||||
INTERLEAVED_RGB_FMT_TILED(XBGR8888,
|
INTERLEAVED_RGB_FMT_TILED(XBGR8888,
|
||||||
COLOR_8BIT, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
COLOR_8BIT, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
||||||
C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA, 4,
|
C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA, 4,
|
||||||
false, 4, DPU_FORMAT_FLAG_COMPRESSED,
|
false, 4, DPU_FORMAT_FLAG_COMPRESSED,
|
||||||
DPU_FETCH_UBWC, 2, DPU_TILE_HEIGHT_UBWC),
|
DPU_FETCH_UBWC, 2, DPU_TILE_HEIGHT_UBWC),
|
||||||
|
|
||||||
|
INTERLEAVED_RGB_FMT_TILED(XRGB8888,
|
||||||
|
COLOR_8BIT, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
||||||
|
C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA, 4,
|
||||||
|
false, 4, DPU_FORMAT_FLAG_COMPRESSED,
|
||||||
|
DPU_FETCH_UBWC, 2, DPU_TILE_HEIGHT_UBWC),
|
||||||
|
|
||||||
INTERLEAVED_RGB_FMT_TILED(ABGR2101010,
|
INTERLEAVED_RGB_FMT_TILED(ABGR2101010,
|
||||||
COLOR_8BIT, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
COLOR_8BIT, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
||||||
C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA, 4,
|
C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA, 4,
|
||||||
|
@ -550,7 +566,9 @@ static int _dpu_format_get_media_color_ubwc(const struct dpu_format *fmt)
|
||||||
{
|
{
|
||||||
static const struct dpu_media_color_map dpu_media_ubwc_map[] = {
|
static const struct dpu_media_color_map dpu_media_ubwc_map[] = {
|
||||||
{DRM_FORMAT_ABGR8888, COLOR_FMT_RGBA8888_UBWC},
|
{DRM_FORMAT_ABGR8888, COLOR_FMT_RGBA8888_UBWC},
|
||||||
|
{DRM_FORMAT_ARGB8888, COLOR_FMT_RGBA8888_UBWC},
|
||||||
{DRM_FORMAT_XBGR8888, COLOR_FMT_RGBA8888_UBWC},
|
{DRM_FORMAT_XBGR8888, COLOR_FMT_RGBA8888_UBWC},
|
||||||
|
{DRM_FORMAT_XRGB8888, COLOR_FMT_RGBA8888_UBWC},
|
||||||
{DRM_FORMAT_ABGR2101010, COLOR_FMT_RGBA1010102_UBWC},
|
{DRM_FORMAT_ABGR2101010, COLOR_FMT_RGBA1010102_UBWC},
|
||||||
{DRM_FORMAT_XBGR2101010, COLOR_FMT_RGBA1010102_UBWC},
|
{DRM_FORMAT_XBGR2101010, COLOR_FMT_RGBA1010102_UBWC},
|
||||||
{DRM_FORMAT_BGR565, COLOR_FMT_RGB565_UBWC},
|
{DRM_FORMAT_BGR565, COLOR_FMT_RGB565_UBWC},
|
||||||
|
|
|
@ -6,7 +6,9 @@
|
||||||
|
|
||||||
static const uint32_t qcom_compressed_supported_formats[] = {
|
static const uint32_t qcom_compressed_supported_formats[] = {
|
||||||
DRM_FORMAT_ABGR8888,
|
DRM_FORMAT_ABGR8888,
|
||||||
|
DRM_FORMAT_ARGB8888,
|
||||||
DRM_FORMAT_XBGR8888,
|
DRM_FORMAT_XBGR8888,
|
||||||
|
DRM_FORMAT_XRGB8888,
|
||||||
DRM_FORMAT_BGR565,
|
DRM_FORMAT_BGR565,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue