Skip to content

Commit 66dbd30

Browse files
6by9popcornmix
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 f992ce0 commit 66dbd30

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

drivers/gpu/drm/vc4/vc4_plane.c

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

0 commit comments

Comments
 (0)