Add video and command mode destination format mappings for RGB101010,
and extend the VID_CFG0 DST_FORMAT bitfield to 3 bits to accommodate
the new format value.
Make sure this is guarded behind MSM_DSI_6G_VER >= V2.1.0 as anything
older does not support this.
Required for 10 bit panels such as the BOE BF068MWM-TD0.
Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 10 ++++++++++
drivers/gpu/drm/msm/registers/display/dsi.xml | 5 ++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 6fad9a612d4d..65c5b0e904ee 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -757,6 +757,7 @@ static inline enum dsi_vid_dst_format
dsi_get_vid_fmt(const enum mipi_dsi_pixel_format mipi_fmt)
{
switch (mipi_fmt) {
+ case MIPI_DSI_FMT_RGB101010: return VID_DST_FORMAT_RGB101010;
case MIPI_DSI_FMT_RGB888: return VID_DST_FORMAT_RGB888;
case MIPI_DSI_FMT_RGB666: return VID_DST_FORMAT_RGB666_LOOSE;
case MIPI_DSI_FMT_RGB666_PACKED: return VID_DST_FORMAT_RGB666;
@@ -769,6 +770,7 @@ static inline enum dsi_cmd_dst_format
dsi_get_cmd_fmt(const enum mipi_dsi_pixel_format mipi_fmt)
{
switch (mipi_fmt) {
+ case MIPI_DSI_FMT_RGB101010: return CMD_DST_FORMAT_RGB101010;
case MIPI_DSI_FMT_RGB888: return CMD_DST_FORMAT_RGB888;
case MIPI_DSI_FMT_RGB666_PACKED:
case MIPI_DSI_FMT_RGB666: return CMD_DST_FORMAT_RGB666;
@@ -1705,6 +1707,14 @@ static int dsi_host_attach(struct mipi_dsi_host *host,
if (dsi->lanes > msm_host->num_data_lanes)
return -EINVAL;
+ if (dsi->format == MIPI_DSI_FMT_RGB101010 &&
+ !msm_dsi_host_version_ge(msm_host, MSM_DSI_VER_MAJOR_6G,
+ MSM_DSI_6G_VER_MINOR_V2_1_0)) {
+ DRM_DEV_ERROR(&msm_host->pdev->dev,
+ "RGB101010 not supported on this DSI controller\n");
+ return -EINVAL;
+ }
+
msm_host->channel = dsi->channel;
msm_host->lanes = dsi->lanes;
msm_host->format = dsi->format;
diff --git a/drivers/gpu/drm/msm/registers/display/dsi.xml b/drivers/gpu/drm/msm/registers/display/dsi.xml
index c7a7b633d747..e40125f75175 100644
--- a/drivers/gpu/drm/msm/registers/display/dsi.xml
+++ b/drivers/gpu/drm/msm/registers/display/dsi.xml
@@ -15,6 +15,7 @@ xsi:schemaLocation="https://gitlab.freedesktop.org/freedreno/ rules-fd.xsd">
<value name="VID_DST_FORMAT_RGB666" value="1"/>
<value name="VID_DST_FORMAT_RGB666_LOOSE" value="2"/>
<value name="VID_DST_FORMAT_RGB888" value="3"/>
+ <value name="VID_DST_FORMAT_RGB101010" value="4"/>
</enum>
<enum name="dsi_rgb_swap">
<value name="SWAP_RGB" value="0"/>
@@ -39,6 +40,7 @@ xsi:schemaLocation="https://gitlab.freedesktop.org/freedreno/ rules-fd.xsd">
<value name="CMD_DST_FORMAT_RGB565" value="6"/>
<value name="CMD_DST_FORMAT_RGB666" value="7"/>
<value name="CMD_DST_FORMAT_RGB888" value="8"/>
+ <value name="CMD_DST_FORMAT_RGB101010" value="9"/>
</enum>
<enum name="dsi_lane_swap">
<value name="LANE_SWAP_0123" value="0"/>
@@ -142,7 +144,8 @@ xsi:schemaLocation="https://gitlab.freedesktop.org/freedreno/ rules-fd.xsd">
</reg32>
<reg32 offset="0x0000c" name="VID_CFG0">
<bitfield name="VIRT_CHANNEL" low="0" high="1" type="uint"/> <!-- always zero? -->
- <bitfield name="DST_FORMAT" low="4" high="5" type="dsi_vid_dst_format"/>
+ <!-- high was 5 before DSI 6G 2.1.0 -->
+ <bitfield name="DST_FORMAT" low="4" high="6" type="dsi_vid_dst_format"/>
<bitfield name="TRAFFIC_MODE" low="8" high="9" type="dsi_traffic_mode"/>
<bitfield name="BLLP_POWER_STOP" pos="12" type="boolean"/>
<bitfield name="EOF_BLLP_POWER_STOP" pos="15" type="boolean"/>
--
2.53.0
Hi Alexander,
kernel test robot noticed the following build errors:
[auto build test ERROR on f338e77383789c0cae23ca3d48adcc5e9e137e3c]
url: https://github.com/intel-lab-lkp/linux/commits/Alexander-Koskovich/drm-msm-dsi-rename-MSM8998-DSI-version-from-V2_2_0-to-V2_0_0/20260320-011528
base: f338e77383789c0cae23ca3d48adcc5e9e137e3c
patch link: https://lore.kernel.org/r/20260319-dsi-rgb101010-support-v3-3-85b99df2d090%40pm.me
patch subject: [PATCH v3 3/4] drm/msm/dsi: Add support for RGB101010 pixel format
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20260321/202603210139.i7hnShAJ-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260321/202603210139.i7hnShAJ-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/202603210139.i7hnShAJ-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/gpu/drm/msm/dsi/dsi_host.c: In function 'dsi_get_vid_fmt':
>> drivers/gpu/drm/msm/dsi/dsi_host.c:760:14: error: 'MIPI_DSI_FMT_RGB101010' undeclared (first use in this function); did you mean 'MIPI_DSI_FMT_RGB565'?
760 | case MIPI_DSI_FMT_RGB101010: return VID_DST_FORMAT_RGB101010;
| ^~~~~~~~~~~~~~~~~~~~~~
| MIPI_DSI_FMT_RGB565
drivers/gpu/drm/msm/dsi/dsi_host.c:760:14: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/drm/msm/dsi/dsi_host.c: In function 'dsi_get_cmd_fmt':
drivers/gpu/drm/msm/dsi/dsi_host.c:773:14: error: 'MIPI_DSI_FMT_RGB101010' undeclared (first use in this function); did you mean 'MIPI_DSI_FMT_RGB565'?
773 | case MIPI_DSI_FMT_RGB101010: return CMD_DST_FORMAT_RGB101010;
| ^~~~~~~~~~~~~~~~~~~~~~
| MIPI_DSI_FMT_RGB565
drivers/gpu/drm/msm/dsi/dsi_host.c: In function 'dsi_host_attach':
drivers/gpu/drm/msm/dsi/dsi_host.c:1710:28: error: 'MIPI_DSI_FMT_RGB101010' undeclared (first use in this function); did you mean 'MIPI_DSI_FMT_RGB565'?
1710 | if (dsi->format == MIPI_DSI_FMT_RGB101010 &&
| ^~~~~~~~~~~~~~~~~~~~~~
| MIPI_DSI_FMT_RGB565
vim +760 drivers/gpu/drm/msm/dsi/dsi_host.c
755
756 static inline enum dsi_vid_dst_format
757 dsi_get_vid_fmt(const enum mipi_dsi_pixel_format mipi_fmt)
758 {
759 switch (mipi_fmt) {
> 760 case MIPI_DSI_FMT_RGB101010: return VID_DST_FORMAT_RGB101010;
761 case MIPI_DSI_FMT_RGB888: return VID_DST_FORMAT_RGB888;
762 case MIPI_DSI_FMT_RGB666: return VID_DST_FORMAT_RGB666_LOOSE;
763 case MIPI_DSI_FMT_RGB666_PACKED: return VID_DST_FORMAT_RGB666;
764 case MIPI_DSI_FMT_RGB565: return VID_DST_FORMAT_RGB565;
765 default: return VID_DST_FORMAT_RGB888;
766 }
767 }
768
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Alexander,
kernel test robot noticed the following build errors:
[auto build test ERROR on f338e77383789c0cae23ca3d48adcc5e9e137e3c]
url: https://github.com/intel-lab-lkp/linux/commits/Alexander-Koskovich/drm-msm-dsi-rename-MSM8998-DSI-version-from-V2_2_0-to-V2_0_0/20260320-011528
base: f338e77383789c0cae23ca3d48adcc5e9e137e3c
patch link: https://lore.kernel.org/r/20260319-dsi-rgb101010-support-v3-3-85b99df2d090%40pm.me
patch subject: [PATCH v3 3/4] drm/msm/dsi: Add support for RGB101010 pixel format
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20260320/202603201719.MxZJCZoY-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 4abb927bacf37f18f6359a41639a6d1b3bffffb5)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260320/202603201719.MxZJCZoY-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/202603201719.MxZJCZoY-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/msm/dsi/dsi_host.c:760:7: error: use of undeclared identifier 'MIPI_DSI_FMT_RGB101010'
760 | case MIPI_DSI_FMT_RGB101010: return VID_DST_FORMAT_RGB101010;
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/dsi/dsi_host.c:773:7: error: use of undeclared identifier 'MIPI_DSI_FMT_RGB101010'
773 | case MIPI_DSI_FMT_RGB101010: return CMD_DST_FORMAT_RGB101010;
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/dsi/dsi_host.c:1710:21: error: use of undeclared identifier 'MIPI_DSI_FMT_RGB101010'
1710 | if (dsi->format == MIPI_DSI_FMT_RGB101010 &&
| ^~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
vim +/MIPI_DSI_FMT_RGB101010 +760 drivers/gpu/drm/msm/dsi/dsi_host.c
755
756 static inline enum dsi_vid_dst_format
757 dsi_get_vid_fmt(const enum mipi_dsi_pixel_format mipi_fmt)
758 {
759 switch (mipi_fmt) {
> 760 case MIPI_DSI_FMT_RGB101010: return VID_DST_FORMAT_RGB101010;
761 case MIPI_DSI_FMT_RGB888: return VID_DST_FORMAT_RGB888;
762 case MIPI_DSI_FMT_RGB666: return VID_DST_FORMAT_RGB666_LOOSE;
763 case MIPI_DSI_FMT_RGB666_PACKED: return VID_DST_FORMAT_RGB666;
764 case MIPI_DSI_FMT_RGB565: return VID_DST_FORMAT_RGB565;
765 default: return VID_DST_FORMAT_RGB888;
766 }
767 }
768
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
On Thu, Mar 19, 2026 at 11:57:56AM +0000, Alexander Koskovich wrote: > Add video and command mode destination format mappings for RGB101010, > and extend the VID_CFG0 DST_FORMAT bitfield to 3 bits to accommodate > the new format value. > > Make sure this is guarded behind MSM_DSI_6G_VER >= V2.1.0 as anything > older does not support this. > > Required for 10 bit panels such as the BOE BF068MWM-TD0. > > Signed-off-by: Alexander Koskovich <akoskovich@pm.me> > --- > drivers/gpu/drm/msm/dsi/dsi_host.c | 10 ++++++++++ > drivers/gpu/drm/msm/registers/display/dsi.xml | 5 ++++- > 2 files changed, 14 insertions(+), 1 deletion(-) For the patch itself: Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Note, you've dropped the patch adding RGB101010 to include/drm/drm_mipi_dsi.h without declaring a dependency on any external patchset, so this can't be merged. Also, there was a report from LKP that you need to fix the meson driver while adding new MIPI define (we should not be introducing known warnings to the kernel). -- With best wishes Dmitry
On Thursday, March 19th, 2026 at 3:00 PM, Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> wrote: > On Thu, Mar 19, 2026 at 11:57:56AM +0000, Alexander Koskovich wrote: > > Add video and command mode destination format mappings for RGB101010, > > and extend the VID_CFG0 DST_FORMAT bitfield to 3 bits to accommodate > > the new format value. > > > > Make sure this is guarded behind MSM_DSI_6G_VER >= V2.1.0 as anything > > older does not support this. > > > > Required for 10 bit panels such as the BOE BF068MWM-TD0. > > > > Signed-off-by: Alexander Koskovich <akoskovich@pm.me> > > --- > > drivers/gpu/drm/msm/dsi/dsi_host.c | 10 ++++++++++ > > drivers/gpu/drm/msm/registers/display/dsi.xml | 5 ++++- > > 2 files changed, 14 insertions(+), 1 deletion(-) > > For the patch itself: > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > > Note, you've dropped the patch adding RGB101010 to > include/drm/drm_mipi_dsi.h without declaring a dependency on any > external patchset, so this can't be merged. Oops, guess I skipped over that while rebasing. Will address in v4. > > Also, there was a report from LKP that you need to fix the meson driver > while adding new MIPI define (we should not be introducing known > warnings to the kernel). Will address that > > -- > With best wishes > Dmitry > > Thanks, Alex
On 3/19/26 12:57 PM, Alexander Koskovich wrote: > Add video and command mode destination format mappings for RGB101010, > and extend the VID_CFG0 DST_FORMAT bitfield to 3 bits to accommodate > the new format value. > > Make sure this is guarded behind MSM_DSI_6G_VER >= V2.1.0 as anything > older does not support this. > > Required for 10 bit panels such as the BOE BF068MWM-TD0. > > Signed-off-by: Alexander Koskovich <akoskovich@pm.me> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Konrad
© 2016 - 2026 Red Hat, Inc.