On Sat, 2012-01-14 at 01:30 +0530, Archit wrote:
> Hi,
> 
> On Friday 13 January 2012 05:16 PM, Tomi Valkeinen wrote:
> > Move fifo threshold calculation into dispc.c, as the thresholds are
> > really dispc internal thing.
> >
> > Signed-off-by: Tomi Valkeinen<[email protected]>
> 
> <snip>
> 
> > diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
> > index 511ae2a..1cbb7a5 100644
> > --- a/drivers/video/omap2/dss/dsi.c
> > +++ b/drivers/video/omap2/dss/dsi.c
> > @@ -4524,14 +4524,6 @@ int omapdss_dsi_enable_te(struct omap_dss_device 
> > *dssdev, bool enable)
> >   }
> >   EXPORT_SYMBOL(omapdss_dsi_enable_te);
> >
> > -void dsi_get_overlay_fifo_thresholds(enum omap_plane plane,
> > -           u32 fifo_size, u32 burst_size,
> > -           u32 *fifo_low, u32 *fifo_high)
> > -{
> > -   *fifo_high = fifo_size - burst_size;
> > -   *fifo_low = fifo_size - burst_size * 2;
> > -}
> 
> We are removing the special treatment for overlays connected to DSI done 
> before. Won't this cause the issues you saw with DSI in OMAP3?

I added a FEAT_OMAP3_DSI_FIFO_BUG flag for OMAP3s, and changed the
dispc's fifo config function to:

void dispc_ovl_compute_fifo_thresholds(enum omap_plane plane,
                u32 *fifo_low, u32 *fifo_high, bool use_fifomerge)
{
        /*
         * All sizes are in bytes. Both the buffer and burst are made of
         * buffer_units, and the fifo thresholds must be buffer_unit aligned.
         */

        unsigned buf_unit = dss_feat_get_buffer_size_unit();
        unsigned ovl_fifo_size, total_fifo_size, burst_size;
        int i;

        burst_size = dispc_ovl_get_burst_size(plane);
        ovl_fifo_size = dispc_ovl_get_fifo_size(plane);

        if (use_fifomerge) {
                total_fifo_size = 0;
                for (i = 0; i < omap_dss_get_num_overlays(); ++i)
                        total_fifo_size += dispc_ovl_get_fifo_size(i);
        } else {
                total_fifo_size = ovl_fifo_size;
        }

        /*
         * We use the same low threshold for both fifomerge and non-fifomerge
         * cases, but for fifomerge we calculate the high threshold using the
         * combined fifo size
         */

        if (dss_has_feature(FEAT_OMAP3_DSI_FIFO_BUG)) {
                *fifo_low = ovl_fifo_size - burst_size * 2;
                *fifo_high = total_fifo_size - burst_size;
        } else {
                *fifo_low = ovl_fifo_size - burst_size;
                *fifo_high = total_fifo_size - buf_unit;
        }
}

 Tomi

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to