mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-28 04:18:49 -04:00
drm/msm/dpu: Add support for AR30 format
Commit da7716a249 ("drm/msm/dpu: Add support for XR30 format") enabled
support for the 10-bit XR30 color format but missed enabling support for the
corresponding per-pixel alpha-blending AR30 color format.
Declaring only XR30 but not AR30 color format support can trigger bugs in
userspace. KDE KWin compositor versions prior to 5.27.3 for example prefer
10-bit color formats, rendering a 1cm^2 black box around the cursor due to
missing per-pixel alpha-blending.
Signed-off-by: Leonard Lausen <leonard@lausen.nl>
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Tested-by: Jessica Zhang <quic_jesszhan@quicinc.com> # Trogdor (sc7180)
Patchwork: https://patchwork.freedesktop.org/patch/527985/
Link: https://lore.kernel.org/r/6f33219dc848ccd7122bce6933338033aa18c33c@lausen.nl
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
committed by
Dmitry Baryshkov
parent
83a58b20c9
commit
ffbbed63e6
@@ -536,6 +536,16 @@ static const struct dpu_format dpu_format_map_ubwc[] = {
|
||||
true, 4, DPU_FORMAT_FLAG_DX | DPU_FORMAT_FLAG_COMPRESSED,
|
||||
DPU_FETCH_UBWC, 2, DPU_TILE_HEIGHT_UBWC),
|
||||
|
||||
/* XRGB2101010 and ARGB2101010 purposely have the same color
|
||||
* ordering. The hardware only supports ARGB2101010 UBWC
|
||||
* natively.
|
||||
*/
|
||||
INTERLEAVED_RGB_FMT_TILED(ARGB2101010,
|
||||
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_DX | DPU_FORMAT_FLAG_COMPRESSED,
|
||||
DPU_FETCH_UBWC, 2, DPU_TILE_HEIGHT_UBWC),
|
||||
|
||||
PSEUDO_YUV_FMT_TILED(NV12,
|
||||
0, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
||||
C1_B_Cb, C2_R_Cr,
|
||||
@@ -591,6 +601,7 @@ static int _dpu_format_get_media_color_ubwc(const struct dpu_format *fmt)
|
||||
{DRM_FORMAT_XBGR8888, COLOR_FMT_RGBA8888_UBWC},
|
||||
{DRM_FORMAT_XRGB8888, COLOR_FMT_RGBA8888_UBWC},
|
||||
{DRM_FORMAT_ABGR2101010, COLOR_FMT_RGBA1010102_UBWC},
|
||||
{DRM_FORMAT_ARGB2101010, COLOR_FMT_RGBA1010102_UBWC},
|
||||
{DRM_FORMAT_XRGB2101010, COLOR_FMT_RGBA1010102_UBWC},
|
||||
{DRM_FORMAT_XBGR2101010, COLOR_FMT_RGBA1010102_UBWC},
|
||||
{DRM_FORMAT_BGR565, COLOR_FMT_RGB565_UBWC},
|
||||
|
||||
@@ -192,6 +192,7 @@ static const uint32_t plane_formats[] = {
|
||||
DRM_FORMAT_RGBX8888,
|
||||
DRM_FORMAT_BGRX8888,
|
||||
DRM_FORMAT_XBGR8888,
|
||||
DRM_FORMAT_ARGB2101010,
|
||||
DRM_FORMAT_XRGB2101010,
|
||||
DRM_FORMAT_RGB888,
|
||||
DRM_FORMAT_BGR888,
|
||||
@@ -221,6 +222,7 @@ static const uint32_t plane_formats_yuv[] = {
|
||||
DRM_FORMAT_RGBA8888,
|
||||
DRM_FORMAT_BGRX8888,
|
||||
DRM_FORMAT_BGRA8888,
|
||||
DRM_FORMAT_ARGB2101010,
|
||||
DRM_FORMAT_XRGB2101010,
|
||||
DRM_FORMAT_XRGB8888,
|
||||
DRM_FORMAT_XBGR8888,
|
||||
|
||||
@@ -69,6 +69,7 @@ static const uint32_t qcom_compressed_supported_formats[] = {
|
||||
DRM_FORMAT_ARGB8888,
|
||||
DRM_FORMAT_XBGR8888,
|
||||
DRM_FORMAT_XRGB8888,
|
||||
DRM_FORMAT_ARGB2101010,
|
||||
DRM_FORMAT_XRGB2101010,
|
||||
DRM_FORMAT_BGR565,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user