drm/omap: dsi: fix compile errors when enabling debug prints
authorH. Nikolaus Schaller <hns@goldelico.com>
Mon, 26 Dec 2016 19:23:19 +0000 (20:23 +0100)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 4 Jan 2017 11:57:47 +0000 (13:57 +0200)
dsi.c compile fails if PRINT_VERBOSE_VM_TIMINGS is enabled, as the
video timings were not converted in the code behind that ifdef. Note
that PRINT_VERBOSE_VM_TIMINGS has to be enabled by hand, there's no
config option for it.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
[tomi.valkeinen@ti.com: fixed the patch description]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/dss/dsi.c

index f060bda31235fb4e9443639f2620f47fb5dbb3ef..f74615d005a8fe29dabda24c406389a832f0050f 100644 (file)
@@ -4336,7 +4336,7 @@ static void print_dsi_vm(const char *str,
 
        wc = DIV_ROUND_UP(t->hact * t->bitspp, 8);
        pps = DIV_ROUND_UP(wc + 6, t->ndl); /* pixel packet size */
-       bl = t->hss + t->hsa + t->hse + t->hbp + t->hfront_porch;
+       bl = t->hss + t->hsa + t->hse + t->hbp + t->hfp;
        tot = bl + pps;
 
 #define TO_DSI_T(x) ((u32)div64_u64((u64)x * 1000000000llu, byteclk))
@@ -4345,14 +4345,14 @@ static void print_dsi_vm(const char *str,
                        "%u/%u/%u/%u/%u/%u = %u + %u = %u\n",
                        str,
                        byteclk,
-                       t->hss, t->hsa, t->hse, t->hbp, pps, t->hfront_porch,
+                       t->hss, t->hsa, t->hse, t->hbp, pps, t->hfp,
                        bl, pps, tot,
                        TO_DSI_T(t->hss),
                        TO_DSI_T(t->hsa),
                        TO_DSI_T(t->hse),
                        TO_DSI_T(t->hbp),
                        TO_DSI_T(pps),
-                       TO_DSI_T(t->hfront_porch),
+                       TO_DSI_T(t->hfp),
 
                        TO_DSI_T(bl),
                        TO_DSI_T(pps),
@@ -4367,7 +4367,7 @@ static void print_dispc_vm(const char *str, const struct videomode *vm)
        int hact, bl, tot;
 
        hact = vm->hactive;
-       bl = vm->hsync_len + vm->hbp + vm->hfront_porch;
+       bl = vm->hsync_len + vm->hback_porch + vm->hfront_porch;
        tot = hact + bl;
 
 #define TO_DISPC_T(x) ((u32)div64_u64((u64)x * 1000000000llu, pck))
@@ -4376,10 +4376,10 @@ static void print_dispc_vm(const char *str, const struct videomode *vm)
                        "%u/%u/%u/%u = %u + %u = %u\n",
                        str,
                        pck,
-                       vm->hsync_len, vm->hbp, hact, vm->hfront_porch,
+                       vm->hsync_len, vm->hback_porch, hact, vm->hfront_porch,
                        bl, hact, tot,
                        TO_DISPC_T(vm->hsync_len),
-                       TO_DISPC_T(vm->hbp),
+                       TO_DISPC_T(vm->hback_porch),
                        TO_DISPC_T(hact),
                        TO_DISPC_T(vm->hfront_porch),
                        TO_DISPC_T(bl),
@@ -4401,12 +4401,12 @@ static void print_dsi_dispc_vm(const char *str,
        dsi_tput = (u64)byteclk * t->ndl * 8;
        pck = (u32)div64_u64(dsi_tput, t->bitspp);
        dsi_hact = DIV_ROUND_UP(DIV_ROUND_UP(t->hact * t->bitspp, 8) + 6, t->ndl);
-       dsi_htot = t->hss + t->hsa + t->hse + t->hbp + dsi_hact + t->hfront_porch;
+       dsi_htot = t->hss + t->hsa + t->hse + t->hbp + dsi_hact + t->hfp;
 
        vm.pixelclock = pck;
        vm.hsync_len = div64_u64((u64)(t->hsa + t->hse) * pck, byteclk);
-       vm.hbp = div64_u64((u64)t->hbp * pck, byteclk);
-       vm.hfront_porch = div64_u64((u64)t->hfront_porch * pck, byteclk);
+       vm.hback_porch = div64_u64((u64)t->hbp * pck, byteclk);
+       vm.hfront_porch = div64_u64((u64)t->hfp * pck, byteclk);
        vm.hactive = t->hact;
 
        print_dispc_vm(str, &vm);