Add MIPI_DSI_FMT_RGB101010 for 30 bit (10,10,10 RGB) pixel format,
corresponding to the packed 30 bit pixel stream defined in MIPI DSI
v1.3 Section 8.8.17.
Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
---
include/drm/drm_mipi_dsi.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index 3aba7b380c8d..a822e9e876af 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -140,6 +140,7 @@ struct mipi_dsi_host *of_find_mipi_dsi_host_by_node(struct device_node *node);
#define MIPI_DSI_HS_PKT_END_ALIGNED BIT(12)
enum mipi_dsi_pixel_format {
+ MIPI_DSI_FMT_RGB101010,
MIPI_DSI_FMT_RGB888,
MIPI_DSI_FMT_RGB666,
MIPI_DSI_FMT_RGB666_PACKED,
@@ -235,6 +236,9 @@ extern const struct bus_type mipi_dsi_bus_type;
static inline int mipi_dsi_pixel_format_to_bpp(enum mipi_dsi_pixel_format fmt)
{
switch (fmt) {
+ case MIPI_DSI_FMT_RGB101010:
+ return 30;
+
case MIPI_DSI_FMT_RGB888:
case MIPI_DSI_FMT_RGB666:
return 24;
--
2.53.0
Hi Alexander,
kernel test robot noticed the following build warnings:
[auto build test WARNING on f338e77383789c0cae23ca3d48adcc5e9e137e3c]
url: https://github.com/intel-lab-lkp/linux/commits/Alexander-Koskovich/drm-mipi-dsi-add-RGB101010-pixel-format/20260318-220726
base: f338e77383789c0cae23ca3d48adcc5e9e137e3c
patch link: https://lore.kernel.org/r/20260318-dsi-rgb101010-support-v1-1-6021eb79e796%40pm.me
patch subject: [PATCH 1/3] drm/mipi-dsi: add RGB101010 pixel format
config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20260319/202603190805.7UiuBASq-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260319/202603190805.7UiuBASq-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603190805.7UiuBASq-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c: In function 'dw_mipi_dsi_phy_init':
>> drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:113:9: warning: enumeration value 'MIPI_DSI_FMT_RGB101010' not handled in switch [-Wswitch]
113 | switch (mipi_dsi->dsi_device->format) {
| ^~~~~~
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c: In function 'meson_dw_mipi_dsi_host_attach':
drivers/gpu/drm/meson/meson_dw_mipi_dsi.c:230:9: warning: enumeration value 'MIPI_DSI_FMT_RGB101010' not handled in switch [-Wswitch]
230 | switch (device->format) {
| ^~~~~~
vim +/MIPI_DSI_FMT_RGB101010 +113 drivers/gpu/drm/meson/meson_dw_mipi_dsi.c
77d9e1e6b8468f Neil Armstrong 2023-05-30 74
77d9e1e6b8468f Neil Armstrong 2023-05-30 75 static int dw_mipi_dsi_phy_init(void *priv_data)
77d9e1e6b8468f Neil Armstrong 2023-05-30 76 {
77d9e1e6b8468f Neil Armstrong 2023-05-30 77 struct meson_dw_mipi_dsi *mipi_dsi = priv_data;
77d9e1e6b8468f Neil Armstrong 2023-05-30 78 unsigned int dpi_data_format, venc_data_width;
77d9e1e6b8468f Neil Armstrong 2023-05-30 79 int ret;
77d9e1e6b8468f Neil Armstrong 2023-05-30 80
77d9e1e6b8468f Neil Armstrong 2023-05-30 81 /* Set the bit clock rate to hs_clk_rate */
77d9e1e6b8468f Neil Armstrong 2023-05-30 82 ret = clk_set_rate(mipi_dsi->bit_clk,
77d9e1e6b8468f Neil Armstrong 2023-05-30 83 mipi_dsi->phy_opts.mipi_dphy.hs_clk_rate);
77d9e1e6b8468f Neil Armstrong 2023-05-30 84 if (ret) {
77d9e1e6b8468f Neil Armstrong 2023-05-30 85 dev_err(mipi_dsi->dev, "Failed to set DSI Bit clock rate %lu (ret %d)\n",
77d9e1e6b8468f Neil Armstrong 2023-05-30 86 mipi_dsi->phy_opts.mipi_dphy.hs_clk_rate, ret);
77d9e1e6b8468f Neil Armstrong 2023-05-30 87 return ret;
77d9e1e6b8468f Neil Armstrong 2023-05-30 88 }
77d9e1e6b8468f Neil Armstrong 2023-05-30 89
77d9e1e6b8468f Neil Armstrong 2023-05-30 90 /* Make sure the rate of the bit clock is not modified by someone else */
77d9e1e6b8468f Neil Armstrong 2023-05-30 91 ret = clk_rate_exclusive_get(mipi_dsi->bit_clk);
77d9e1e6b8468f Neil Armstrong 2023-05-30 92 if (ret) {
77d9e1e6b8468f Neil Armstrong 2023-05-30 93 dev_err(mipi_dsi->dev,
77d9e1e6b8468f Neil Armstrong 2023-05-30 94 "Failed to set the exclusivity on the bit clock rate (ret %d)\n", ret);
77d9e1e6b8468f Neil Armstrong 2023-05-30 95 return ret;
77d9e1e6b8468f Neil Armstrong 2023-05-30 96 }
77d9e1e6b8468f Neil Armstrong 2023-05-30 97
5c9837374ecf55 Neil Armstrong 2024-04-03 98 clk_disable_unprepare(mipi_dsi->px_clk);
77d9e1e6b8468f Neil Armstrong 2023-05-30 99 ret = clk_set_rate(mipi_dsi->px_clk, mipi_dsi->mode->clock * 1000);
77d9e1e6b8468f Neil Armstrong 2023-05-30 100
77d9e1e6b8468f Neil Armstrong 2023-05-30 101 if (ret) {
77d9e1e6b8468f Neil Armstrong 2023-05-30 102 dev_err(mipi_dsi->dev, "Failed to set DSI Pixel clock rate %u (%d)\n",
77d9e1e6b8468f Neil Armstrong 2023-05-30 103 mipi_dsi->mode->clock * 1000, ret);
77d9e1e6b8468f Neil Armstrong 2023-05-30 104 return ret;
77d9e1e6b8468f Neil Armstrong 2023-05-30 105 }
77d9e1e6b8468f Neil Armstrong 2023-05-30 106
5c9837374ecf55 Neil Armstrong 2024-04-03 107 ret = clk_prepare_enable(mipi_dsi->px_clk);
5c9837374ecf55 Neil Armstrong 2024-04-03 108 if (ret) {
5c9837374ecf55 Neil Armstrong 2024-04-03 109 dev_err(mipi_dsi->dev, "Failed to enable DSI Pixel clock (ret %d)\n", ret);
5c9837374ecf55 Neil Armstrong 2024-04-03 110 return ret;
5c9837374ecf55 Neil Armstrong 2024-04-03 111 }
5c9837374ecf55 Neil Armstrong 2024-04-03 112
77d9e1e6b8468f Neil Armstrong 2023-05-30 @113 switch (mipi_dsi->dsi_device->format) {
77d9e1e6b8468f Neil Armstrong 2023-05-30 114 case MIPI_DSI_FMT_RGB888:
77d9e1e6b8468f Neil Armstrong 2023-05-30 115 dpi_data_format = DPI_COLOR_24BIT;
77d9e1e6b8468f Neil Armstrong 2023-05-30 116 venc_data_width = VENC_IN_COLOR_24B;
77d9e1e6b8468f Neil Armstrong 2023-05-30 117 break;
77d9e1e6b8468f Neil Armstrong 2023-05-30 118 case MIPI_DSI_FMT_RGB666:
77d9e1e6b8468f Neil Armstrong 2023-05-30 119 dpi_data_format = DPI_COLOR_18BIT_CFG_2;
77d9e1e6b8468f Neil Armstrong 2023-05-30 120 venc_data_width = VENC_IN_COLOR_18B;
77d9e1e6b8468f Neil Armstrong 2023-05-30 121 break;
77d9e1e6b8468f Neil Armstrong 2023-05-30 122 case MIPI_DSI_FMT_RGB666_PACKED:
77d9e1e6b8468f Neil Armstrong 2023-05-30 123 case MIPI_DSI_FMT_RGB565:
77d9e1e6b8468f Neil Armstrong 2023-05-30 124 return -EINVAL;
e96f099c8544a5 Yang Li 2023-06-02 125 }
77d9e1e6b8468f Neil Armstrong 2023-05-30 126
77d9e1e6b8468f Neil Armstrong 2023-05-30 127 /* Configure color format for DPI register */
77d9e1e6b8468f Neil Armstrong 2023-05-30 128 writel_relaxed(FIELD_PREP(MIPI_DSI_TOP_DPI_COLOR_MODE, dpi_data_format) |
77d9e1e6b8468f Neil Armstrong 2023-05-30 129 FIELD_PREP(MIPI_DSI_TOP_IN_COLOR_MODE, venc_data_width) |
77d9e1e6b8468f Neil Armstrong 2023-05-30 130 FIELD_PREP(MIPI_DSI_TOP_COMP2_SEL, 2) |
77d9e1e6b8468f Neil Armstrong 2023-05-30 131 FIELD_PREP(MIPI_DSI_TOP_COMP1_SEL, 1) |
77d9e1e6b8468f Neil Armstrong 2023-05-30 132 FIELD_PREP(MIPI_DSI_TOP_COMP0_SEL, 0),
77d9e1e6b8468f Neil Armstrong 2023-05-30 133 mipi_dsi->base + MIPI_DSI_TOP_CNTL);
77d9e1e6b8468f Neil Armstrong 2023-05-30 134
77d9e1e6b8468f Neil Armstrong 2023-05-30 135 return phy_configure(mipi_dsi->phy, &mipi_dsi->phy_opts);
77d9e1e6b8468f Neil Armstrong 2023-05-30 136 }
77d9e1e6b8468f Neil Armstrong 2023-05-30 137
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
On Wed, Mar 18, 2026 at 09:41:00AM +0000, Alexander Koskovich wrote: > Add MIPI_DSI_FMT_RGB101010 for 30 bit (10,10,10 RGB) pixel format, > corresponding to the packed 30 bit pixel stream defined in MIPI DSI > v1.3 Section 8.8.17. > > Signed-off-by: Alexander Koskovich <akoskovich@pm.me> > --- > include/drm/drm_mipi_dsi.h | 4 ++++ > 1 file changed, 4 insertions(+) > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> -- With best wishes Dmitry
© 2016 - 2026 Red Hat, Inc.