Skip to content

Commit 80bdb25

Browse files
6by9pelwell
authored andcommitted
drm/vc4: plane: Add support for RGB[AX]8888 and BGR[AX]8888 formats
The [AX]RGB8888 and [AX]BGR8888 formats were all in the translation list, but RGB[AX]8888 and BGR[AX]8888 weren't. Seeing as the writeback connector had them in the list of supported formats, that meant it could generate content that couldn't be input. Add the relevant translations. Whilst T-Format support should be possible, it has not been added at this stage. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 42bcead commit 80bdb25

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

drivers/gpu/drm/vc4/vc4_plane.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,30 @@ static const struct hvs_format {
6363
.pixel_order = HVS_PIXEL_ORDER_ARGB,
6464
.pixel_order_hvs5 = HVS_PIXEL_ORDER_ABGR,
6565
},
66+
{
67+
.drm = DRM_FORMAT_RGBX8888,
68+
.hvs = HVS_PIXEL_FORMAT_RGBA8888,
69+
.pixel_order = HVS_PIXEL_ORDER_RGBA,
70+
.pixel_order_hvs5 = HVS_PIXEL_ORDER_RGBA,
71+
},
72+
{
73+
.drm = DRM_FORMAT_RGBA8888,
74+
.hvs = HVS_PIXEL_FORMAT_RGBA8888,
75+
.pixel_order = HVS_PIXEL_ORDER_RGBA,
76+
.pixel_order_hvs5 = HVS_PIXEL_ORDER_RGBA,
77+
},
78+
{
79+
.drm = DRM_FORMAT_BGRX8888,
80+
.hvs = HVS_PIXEL_FORMAT_RGBA8888,
81+
.pixel_order = HVS_PIXEL_ORDER_BGRA,
82+
.pixel_order_hvs5 = HVS_PIXEL_ORDER_BGRA,
83+
},
84+
{
85+
.drm = DRM_FORMAT_BGRA8888,
86+
.hvs = HVS_PIXEL_FORMAT_RGBA8888,
87+
.pixel_order = HVS_PIXEL_ORDER_BGRA,
88+
.pixel_order_hvs5 = HVS_PIXEL_ORDER_BGRA,
89+
},
6690
{
6791
.drm = DRM_FORMAT_RGB565,
6892
.hvs = HVS_PIXEL_FORMAT_RGB565,

0 commit comments

Comments
 (0)