Message ID | 20250220-dual-dsi-v2-1-6c0038d5a2ef@linaro.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | drm/msm/dsi: Add DSC support to 2 panels in dual DSI mode | expand |
On Thu, Feb 20, 2025 at 06:07:52PM +0800, Jun Nie wrote: > This change originates from the Qualcomm Android Linux driver. It is > essential to support a dual-DSI configuration with two panels in > some circumstances per testing. As the name suggests, this modification > may enhance the bandwidth robustness of a bus. Please start by describing the problem and the result of the changes. Otherwise it reads as it "may enhance or may worsen" the robustness. > > Co-developed-by: Jonathan Marek <jonathan@marek.ca> > Signed-off-by: Jonathan Marek <jonathan@marek.ca> > Signed-off-by: Jun Nie <jun.nie@linaro.org> > --- > drivers/gpu/drm/msm/dsi/dsi_host.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c > index 42e100a8adca09d7b55afce0e2553e76d898744f..f59c4cd6bc8cdb31c1302f8e3ff395486c0b4898 100644 > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c > @@ -2238,13 +2238,23 @@ int msm_dsi_host_cmd_rx(struct mipi_dsi_host *host, > return ret; > } > > +#define DSI_VBIF_CTRL (0x01CC - 4) > +#define DSI_VBIF_CTRL_PRIORITY 0x07 > + > void msm_dsi_host_cmd_xfer_commit(struct mipi_dsi_host *host, u32 dma_base, > u32 len) > { > struct msm_dsi_host *msm_host = to_msm_dsi_host(host); > + const struct msm_dsi_cfg_handler *cfg_hnd = msm_host->cfg_hnd; > + u32 reg; > > dsi_write(msm_host, REG_DSI_DMA_BASE, dma_base); > dsi_write(msm_host, REG_DSI_DMA_LEN, len); > + if (cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V2_8_0) { > + reg = dsi_read(msm_host, DSI_VBIF_CTRL); > + reg |= (DSI_VBIF_CTRL_PRIORITY & 0x7); > + dsi_write(msm_host, DSI_VBIF_CTRL, reg); > + } > dsi_write(msm_host, REG_DSI_TRIG_DMA, 1); > > /* Make sure trigger happens */ > > -- > 2.34.1 >
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 于2025年2月20日周四 18:27写道: > > On Thu, Feb 20, 2025 at 06:07:52PM +0800, Jun Nie wrote: > > This change originates from the Qualcomm Android Linux driver. It is > > essential to support a dual-DSI configuration with two panels in > > some circumstances per testing. As the name suggests, this modification > > may enhance the bandwidth robustness of a bus. > > Please start by describing the problem and the result of the changes. > Otherwise it reads as it "may enhance or may worsen" the robustness. OK, will re-test it with older branch. I remember it cause LCD to go to black without this patch, but not fully confident with my memory. With latest code, there is no difference to have this patch or not. > > > > > Co-developed-by: Jonathan Marek <jonathan@marek.ca> > > Signed-off-by: Jonathan Marek <jonathan@marek.ca> > > Signed-off-by: Jun Nie <jun.nie@linaro.org> > > --- > > drivers/gpu/drm/msm/dsi/dsi_host.c | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c > > index 42e100a8adca09d7b55afce0e2553e76d898744f..f59c4cd6bc8cdb31c1302f8e3ff395486c0b4898 100644 > > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c > > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c > > @@ -2238,13 +2238,23 @@ int msm_dsi_host_cmd_rx(struct mipi_dsi_host *host, > > return ret; > > } > > > > +#define DSI_VBIF_CTRL (0x01CC - 4) > > +#define DSI_VBIF_CTRL_PRIORITY 0x07 > > + > > void msm_dsi_host_cmd_xfer_commit(struct mipi_dsi_host *host, u32 dma_base, > > u32 len) > > { > > struct msm_dsi_host *msm_host = to_msm_dsi_host(host); > > + const struct msm_dsi_cfg_handler *cfg_hnd = msm_host->cfg_hnd; > > + u32 reg; > > > > dsi_write(msm_host, REG_DSI_DMA_BASE, dma_base); > > dsi_write(msm_host, REG_DSI_DMA_LEN, len); > > + if (cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V2_8_0) { > > + reg = dsi_read(msm_host, DSI_VBIF_CTRL); > > + reg |= (DSI_VBIF_CTRL_PRIORITY & 0x7); > > + dsi_write(msm_host, DSI_VBIF_CTRL, reg); > > + } > > dsi_write(msm_host, REG_DSI_TRIG_DMA, 1); > > > > /* Make sure trigger happens */ > > > > -- > > 2.34.1 > > > > -- > With best wishes > Dmitry
On Thu, Feb 20, 2025 at 11:45:18PM +0800, Jun Nie wrote: > Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 于2025年2月20日周四 18:27写道: > > > > On Thu, Feb 20, 2025 at 06:07:52PM +0800, Jun Nie wrote: > > > This change originates from the Qualcomm Android Linux driver. It is > > > essential to support a dual-DSI configuration with two panels in > > > some circumstances per testing. As the name suggests, this modification > > > may enhance the bandwidth robustness of a bus. > > > > Please start by describing the problem and the result of the changes. > > Otherwise it reads as it "may enhance or may worsen" the robustness. > > OK, will re-test it with older branch. I remember it cause LCD to go > to black without > this patch, but not fully confident with my memory. With latest code, > there is no > difference to have this patch or not. For the reference, this is the description from the display drivers techpack: disp: msm: dsi: Adjust DSI priority level Sets DSI priority level to 7 before any commands are triggered. This DSI priority setting is recommended by systems team as DSI and Lutdma uses same Xin for fetch. Maybe Abhinav can help with the proper problem description. Also, see below. > > > > > > > > Co-developed-by: Jonathan Marek <jonathan@marek.ca> > > > Signed-off-by: Jonathan Marek <jonathan@marek.ca> > > > Signed-off-by: Jun Nie <jun.nie@linaro.org> > > > --- > > > drivers/gpu/drm/msm/dsi/dsi_host.c | 10 ++++++++++ > > > 1 file changed, 10 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c > > > index 42e100a8adca09d7b55afce0e2553e76d898744f..f59c4cd6bc8cdb31c1302f8e3ff395486c0b4898 100644 > > > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c > > > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c > > > @@ -2238,13 +2238,23 @@ int msm_dsi_host_cmd_rx(struct mipi_dsi_host *host, > > > return ret; > > > } > > > > > > +#define DSI_VBIF_CTRL (0x01CC - 4) Register definition should go to the dsi.xml file. And anyway it should have used lower case hex. > > > +#define DSI_VBIF_CTRL_PRIORITY 0x07 > > > + > > > void msm_dsi_host_cmd_xfer_commit(struct mipi_dsi_host *host, u32 dma_base, > > > u32 len) > > > { > > > struct msm_dsi_host *msm_host = to_msm_dsi_host(host); > > > + const struct msm_dsi_cfg_handler *cfg_hnd = msm_host->cfg_hnd; > > > + u32 reg; > > > > > > dsi_write(msm_host, REG_DSI_DMA_BASE, dma_base); > > > dsi_write(msm_host, REG_DSI_DMA_LEN, len); > > > + if (cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V2_8_0) { > > > + reg = dsi_read(msm_host, DSI_VBIF_CTRL); > > > + reg |= (DSI_VBIF_CTRL_PRIORITY & 0x7); > > > + dsi_write(msm_host, DSI_VBIF_CTRL, reg); > > > + } > > > dsi_write(msm_host, REG_DSI_TRIG_DMA, 1); > > > > > > /* Make sure trigger happens */ > > > > > > -- > > > 2.34.1 > > > > > > > -- > > With best wishes > > Dmitry
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 42e100a8adca09d7b55afce0e2553e76d898744f..f59c4cd6bc8cdb31c1302f8e3ff395486c0b4898 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -2238,13 +2238,23 @@ int msm_dsi_host_cmd_rx(struct mipi_dsi_host *host, return ret; } +#define DSI_VBIF_CTRL (0x01CC - 4) +#define DSI_VBIF_CTRL_PRIORITY 0x07 + void msm_dsi_host_cmd_xfer_commit(struct mipi_dsi_host *host, u32 dma_base, u32 len) { struct msm_dsi_host *msm_host = to_msm_dsi_host(host); + const struct msm_dsi_cfg_handler *cfg_hnd = msm_host->cfg_hnd; + u32 reg; dsi_write(msm_host, REG_DSI_DMA_BASE, dma_base); dsi_write(msm_host, REG_DSI_DMA_LEN, len); + if (cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V2_8_0) { + reg = dsi_read(msm_host, DSI_VBIF_CTRL); + reg |= (DSI_VBIF_CTRL_PRIORITY & 0x7); + dsi_write(msm_host, DSI_VBIF_CTRL, reg); + } dsi_write(msm_host, REG_DSI_TRIG_DMA, 1); /* Make sure trigger happens */