From: Alexander Koskovich Date: Tue, 24 Mar 2026 11:48:17 +0000 (+0000) Subject: drm/meson: use default case for unsupported DSI pixel formats X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a780b7f6c8e52c3adb7dd63b1bbbbfae0f3e86c6;p=thirdparty%2Fkernel%2Fstable.git drm/meson: use default case for unsupported DSI pixel formats Use default instead of listing unsupported formats explicitly, so the switch statements don't need updating each time a new pixel format is added. Reviewed-by: Neil Armstrong Signed-off-by: Alexander Koskovich Patchwork: https://patchwork.freedesktop.org/patch/713715/ Link: https://lore.kernel.org/r/20260324-dsi-rgb101010-support-v5-2-ff6afc904115@pm.me Acked-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov --- diff --git a/drivers/gpu/drm/meson/meson_dw_mipi_dsi.c b/drivers/gpu/drm/meson/meson_dw_mipi_dsi.c index 66c73c512b0e6..4412bd6781086 100644 --- a/drivers/gpu/drm/meson/meson_dw_mipi_dsi.c +++ b/drivers/gpu/drm/meson/meson_dw_mipi_dsi.c @@ -119,8 +119,7 @@ static int dw_mipi_dsi_phy_init(void *priv_data) dpi_data_format = DPI_COLOR_18BIT_CFG_2; venc_data_width = VENC_IN_COLOR_18B; break; - case MIPI_DSI_FMT_RGB666_PACKED: - case MIPI_DSI_FMT_RGB565: + default: return -EINVAL; } @@ -232,8 +231,7 @@ static int meson_dw_mipi_dsi_host_attach(void *priv_data, break; case MIPI_DSI_FMT_RGB666: break; - case MIPI_DSI_FMT_RGB666_PACKED: - case MIPI_DSI_FMT_RGB565: + default: dev_err(mipi_dsi->dev, "invalid pixel format %d\n", device->format); return -EINVAL; }