OMAPDSS: DISPC: Remove hardcoded use of PPL in five tap clock calculation
authorArchit Taneja <archit@ti.com>
Thu, 8 Sep 2011 07:21:10 +0000 (12:51 +0530)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 30 Sep 2011 13:17:26 +0000 (16:17 +0300)
The function calc_fclk_five_taps() uses a fixed value of pixels per line which
is used in calculations to get the minimum fclk needed for scaling with five
taps to work.

Remove this by providing the width of the panel connected to the manager.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dispc.c

index 57074b33f02481e305d50088ee9613c2cb82b6a5..829be3bbafcc4683012aa965b1d1abeadcd7509d 100644 (file)
@@ -1630,8 +1630,8 @@ static unsigned long calc_fclk_five_taps(enum omap_channel channel, u16 width,
        u64 tmp, pclk = dispc_mgr_pclk_rate(channel);
 
        if (height > out_height) {
-               /* FIXME get real display PPL */
-               unsigned int ppl = 800;
+               struct omap_dss_device *dssdev = dispc_mgr_get_device(channel);
+               unsigned int ppl = dssdev->panel.timings.x_res;
 
                tmp = pclk * height * out_width;
                do_div(tmp, 2 * out_height * ppl);