]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/meson: use default case for unsupported DSI pixel formats
authorAlexander Koskovich <akoskovich@pm.me>
Tue, 24 Mar 2026 11:48:17 +0000 (11:48 +0000)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Wed, 25 Mar 2026 12:06:10 +0000 (14:06 +0200)
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 <neil.armstrong@linaro.org>
Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
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 <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c

index 66c73c512b0e68ff0e9dbbfaba5f8bf2d347e6b1..4412bd6781086c645ef15ea4458fc8c01d25da96 100644 (file)
@@ -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;
        }