Re: [PATCH v5 3/6] drm/mipi-dsi: Add flag to support dual-panel configurations

From: Dmitry Baryshkov

Date: Sun Oct 04 2026 - 22:03:16 EST


On Sun, Oct 04, 2026 at 09:58:04PM +0800, Jun Nie wrote:
> Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx> 于2026年10月1日周四 03:43写道:
> >
> > On Wed, Sep 30, 2026 at 09:52:48PM +0800, Jun Nie wrote:
> > > Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx> 于2026年9月30日周三 00:05写道:
> > > >
> > > > On Mon, Jul 27, 2026 at 04:08:42PM +0800, Jun Nie wrote:
> > > > > Some devices treat two independent physical DSI panels as a single
> > > > > logical panel from the CRTC's perspective. However, two separate DSI
> > > > > hosts are still required to drive the panels individually.
> > > > >
> > > > > Introduce a `dual_panel` flag to the `mipi_dsi_device` struct. This
> > > > > allows a panel driver to inform the DSI host that it is part of a
> > > > > dual-panel setup, enabling the host to coordinate both physical
> > > > > displays as one.
> > > > >
> > > > > This change does not force individual panel driver to manage
> > > > > system-level display topology if the driver does not intended to
> > > > > support dual panel topology. Only the driver that set the flag to
> > > > > true need to take care of panel topology.
> > > > >
> > > > > Signed-off-by: Jun Nie <jun.nie@xxxxxxxxxx>
> > > > > ---
> > > > > include/drm/drm_mipi_dsi.h | 2 ++
> > > > > 1 file changed, 2 insertions(+)
> > > >
> > > > Do you have a single MIPI DSI device, or are there two independent MIPI
> > > > DSI devices? In the latter case, the flag is wrongly placed.
> > >
> > > Yes, there are 2 mipi devices, and 2 mipi hosts. This flag is used for
> > > mipi device
> > > to notify host they are one of dual panels, so that horizontal
> > > configuration(width)
> > > in mipi host can be handled correctly. Where do you suggest to put this flag?
> > > Thanks!
> >
> > Into the msm DSI structures. We already have several Qualcomm-specific
> > flags. I'm thinking from the 'generic device' point of view. The
> > 'dual_panel' doesn't mean anything if the device has more than two DSI
> > hosts. You need to specify which hosts are mapped to L or R channels, etc.
>
> How about to add below 3 members regarding multiple physical panels in
> single logic panel. We have h*v panels in a panel wall. The index start from
> 0 when we iterate panel from left to right of the top array of panel wall. In
> XR case, we have num_panel_h = 2; num_panel_v = 1; and
> panel_index = 0 for left channel, panel_index = 1 for right channel. The
> original framebuffer is divided into width/num_panel_h and
> height/num_panel_v for each panel's DSI link.
>
> u32 num_panel_h;
> u32 num_panel_v;
> u32 panel_index;

You have seen drm_connector's tile-related fields used by
drm_connector_set_tile_property(), haven't you? If we are to use num_h
and num_v, I'd also use h_loc an v_loc instead of a single panel_index.

The driver needs to distinguish (for the DSC params) if it's a single
panel spanning two DSI links or if there are several DSI panels, bundled
together, so you also have to add h_size / v_size style of params.

But then the real question becomes, do we really need this complexity?
Will there be any use for it other than representing the XR vs non-XR
cases? This all doesn't concern userspace or uAPI, so, if anybody needs
actual DSI panel walls (maybe also using DSI subchannels to driver more
than two pannels), we can extend the solution on the kernel side.

If we take the dual-LVDS panels in mind, I can propose the following
API:

struct drm_panel {
/**
* @dual_channel: set for the DSI or LVDS panels which use two
* host interfaces to be driven
*/
bool dual_channel;
};

struct drm_bridge {
/**
* @dual_channel: set for the bridges which use two host
* interfaces to be driven, e.g. dual LVDS panel or bonded DSI
* bridge.
*/
bool dual_channel;
};

Devices like LT9611/LT9611UXC or panels like hx8279 will set that flag.
The DSI host driver can use it to determine whether to use width or
2*width in the DSI calculation.

At the same time, in your case, you won't set this flag. The DSI host
driver, fidning bonded DSI link and non-dual-channel bridge will
determine that it's a panel bifurcation case and handle it
appropriately.

What do you think?

--
With best wishes
Dmitry