[PATCH 03/17] drm/tegra: dsi: Make FIFO depths host parameters

Thierry Reding thierry.reding at gmail.com
Tue Nov 4 07:45:25 PST 2014


On Mon, Nov 03, 2014 at 12:20:24PM -0500, Sean Paul wrote:
> On Mon, Nov 3, 2014 at 4:27 AM, Thierry Reding <thierry.reding at gmail.com> wrote:
> > From: Thierry Reding <treding at nvidia.com>
> >
> > Rather than hardcoding them as macros, make the host and video FIFO
> > depths parameters so that they can be more easily adjusted if a new
> > generation of the Tegra SoC changes them.
> >
> > Signed-off-by: Thierry Reding <treding at nvidia.com>
> > ---
> >  drivers/gpu/drm/tegra/dsi.c | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
> > index f7874458926a..584b771d8b2f 100644
> > --- a/drivers/gpu/drm/tegra/dsi.c
> > +++ b/drivers/gpu/drm/tegra/dsi.c
> > @@ -26,9 +26,6 @@
> >  #include "dsi.h"
> >  #include "mipi-phy.h"
> >
> > -#define DSI_VIDEO_FIFO_DEPTH (1920 / 4)
> > -#define DSI_HOST_FIFO_DEPTH 64
> > -
> >  struct tegra_dsi {
> >         struct host1x_client client;
> >         struct tegra_output output;
> > @@ -54,6 +51,9 @@ struct tegra_dsi {
> >
> >         struct regulator *vdd;
> >         bool enabled;
> > +
> > +       unsigned int video_fifo_depth;
> > +       unsigned int host_fifo_depth;
> >  };
> >
> >  static inline struct tegra_dsi *
> > @@ -467,7 +467,7 @@ static int tegra_output_dsi_enable(struct tegra_output *output)
> >                 DSI_CONTROL_SOURCE(dc->pipe);
> >         tegra_dsi_writel(dsi, value, DSI_CONTROL);
> >
> > -       tegra_dsi_writel(dsi, DSI_VIDEO_FIFO_DEPTH, DSI_MAX_THRESHOLD);
> > +       tegra_dsi_writel(dsi, dsi->video_fifo_depth, DSI_MAX_THRESHOLD);
> >
> >         value = DSI_HOST_CONTROL_HS | DSI_HOST_CONTROL_CS |
> >                 DSI_HOST_CONTROL_ECC;
> > @@ -843,6 +843,8 @@ static int tegra_dsi_probe(struct platform_device *pdev)
> >                 return -ENOMEM;
> >
> >         dsi->output.dev = dsi->dev = &pdev->dev;
> > +       dsi->video_fifo_depth = 1920;
> 
> This is not functionally equivalent to what was previously being set
> (1920/4). Perhaps calling that out in the commit message might be
> appropriate?

Done.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141104/dcaea4bc/attachment.sig>


More information about the dri-devel mailing list