Re: [PATCH 1/2] drm: bridge: dw-mipi-dsi: Handle NO_EOT_PACKET mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 24 Jan 2023 at 01:49, Sam Ravnborg <sam@xxxxxxxxxxxx> wrote:
>
> Hi Jagan.
>
> One small drive-by comment.
>
> On Tue, Jan 24, 2023 at 12:16:46AM +0530, Jagan Teki wrote:
> > Many downstream bridges or panels followed by dw-mipi-dsi were
> > using MIPI_DSI_MODE_NO_EOT_PACKET.
> >
> > So, handle the EOTP bits accordingly in the dw-mipi-dsi host.
> >
> > Signed-off-by: Jagan Teki <jagan@xxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> > index b2efecf7d160..47bd69d5ac99 100644
> > --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> > +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> > @@ -664,7 +664,13 @@ static void dw_mipi_dsi_dpi_config(struct dw_mipi_dsi *dsi,
> >
> >  static void dw_mipi_dsi_packet_handler_config(struct dw_mipi_dsi *dsi)
> >  {
> > -     dsi_write(dsi, DSI_PCKHDL_CFG, CRC_RX_EN | ECC_RX_EN | BTA_EN);
> > +     u32 val;
> > +
> > +     val = CRC_RX_EN | ECC_RX_EN | BTA_EN | EOTP_TX_EN;
> > +     if (dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET)
> > +             val &= ~EOTP_TX_EN;
>
> I had to look twice because the bit is set, and then maybe cleared.
>
>         val = CRC_RX_EN | ECC_RX_EN | BTA_EN | EOTP_TX_EN;
>         if (!(dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET))
>                 val |= EOTP_TX_EN;
> ?

What I understand is if NO_EOT means we need to disable EOTP_TX_EN bit
so the logic in the patch does the same. Enable the EOTP_TX_EN by
default and disable it if NO_EOT mode set.

Jagan.



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux