Skip to content

Commit 763d1ea

Browse files
6by9popcornmix
authored andcommitted
drm: vc4: txp: Do not allow 24bpp formats when transposing
The hardware doesn't support transposing to 24bpp (RGB888/BGR888) formats. There's no way to advertise this through DRM, so block it from atomic_check instead. Signed-off-by: Dave Stevenson <[email protected]>
1 parent eab2419 commit 763d1ea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/gpu/drm/vc4/vc4_txp.c

+7
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,13 @@ static int vc4_txp_connector_atomic_check(struct drm_connector *conn,
272272
return -EINVAL;
273273
}
274274

275+
if (conn_state->rotation & DRM_MODE_TRANSPOSE &&
276+
(fb->format->format == DRM_FORMAT_RGB888 ||
277+
fb->format->format == DRM_FORMAT_BGR888)) {
278+
DRM_DEBUG_KMS("24bpp formats not supported when transposing\n");
279+
return -EINVAL;
280+
}
281+
275282
for (i = 0; i < ARRAY_SIZE(drm_fmts); i++) {
276283
if (fb->format->format == drm_fmts[i])
277284
break;

0 commit comments

Comments
 (0)