diff --git a/drivers/gpu/drm/vc4/vc4_txp.c b/drivers/gpu/drm/vc4/vc4_txp.c index d46f205d15a30..e9f213dd91334 100644 --- a/drivers/gpu/drm/vc4/vc4_txp.c +++ b/drivers/gpu/drm/vc4/vc4_txp.c @@ -272,6 +272,13 @@ static int vc4_txp_connector_atomic_check(struct drm_connector *conn, return -EINVAL; } + if (conn_state->rotation == (DRM_MODE_ROTATE_0 | DRM_MODE_TRANSPOSE) && + (fb->format->format == DRM_FORMAT_RGB888 || + fb->format->format == DRM_FORMAT_BGR888)) { + DRM_DEBUG_KMS("24bpp formats not supported when tranposing\n"); + return -EINVAL; + } + for (i = 0; i < ARRAY_SIZE(drm_fmts); i++) { if (fb->format->format == drm_fmts[i]) break;