aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss
diff options
context:
space:
mode:
authorH. Nikolaus Schaller <hns@goldelico.com>2016-12-26 14:23:19 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-01-04 06:57:47 -0500
commit7e6d80ddb29d7254cbf699075fc4f752f10cacc6 (patch)
tree792f3060948b55a97ae3b96a0559011124214ed1 /drivers/gpu/drm/omapdrm/dss
parent2f1fed12c65383ca4d760cc6141da265afcaa439 (diff)
drm/omap: dsi: fix compile errors when enabling debug prints
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>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dsi.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index f060bda31235..f74615d005a8 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -4336,7 +4336,7 @@ static void print_dsi_vm(const char *str,
4336 4336
4337 wc = DIV_ROUND_UP(t->hact * t->bitspp, 8); 4337 wc = DIV_ROUND_UP(t->hact * t->bitspp, 8);
4338 pps = DIV_ROUND_UP(wc + 6, t->ndl); /* pixel packet size */ 4338 pps = DIV_ROUND_UP(wc + 6, t->ndl); /* pixel packet size */
4339 bl = t->hss + t->hsa + t->hse + t->hbp + t->hfront_porch; 4339 bl = t->hss + t->hsa + t->hse + t->hbp + t->hfp;
4340 tot = bl + pps; 4340 tot = bl + pps;
4341 4341
4342#define TO_DSI_T(x) ((u32)div64_u64((u64)x * 1000000000llu, byteclk)) 4342#define TO_DSI_T(x) ((u32)div64_u64((u64)x * 1000000000llu, byteclk))
@@ -4345,14 +4345,14 @@ static void print_dsi_vm(const char *str,
4345 "%u/%u/%u/%u/%u/%u = %u + %u = %u\n", 4345 "%u/%u/%u/%u/%u/%u = %u + %u = %u\n",
4346 str, 4346 str,
4347 byteclk, 4347 byteclk,
4348 t->hss, t->hsa, t->hse, t->hbp, pps, t->hfront_porch, 4348 t->hss, t->hsa, t->hse, t->hbp, pps, t->hfp,
4349 bl, pps, tot, 4349 bl, pps, tot,
4350 TO_DSI_T(t->hss), 4350 TO_DSI_T(t->hss),
4351 TO_DSI_T(t->hsa), 4351 TO_DSI_T(t->hsa),
4352 TO_DSI_T(t->hse), 4352 TO_DSI_T(t->hse),
4353 TO_DSI_T(t->hbp), 4353 TO_DSI_T(t->hbp),
4354 TO_DSI_T(pps), 4354 TO_DSI_T(pps),
4355 TO_DSI_T(t->hfront_porch), 4355 TO_DSI_T(t->hfp),
4356 4356
4357 TO_DSI_T(bl), 4357 TO_DSI_T(bl),
4358 TO_DSI_T(pps), 4358 TO_DSI_T(pps),
@@ -4367,7 +4367,7 @@ static void print_dispc_vm(const char *str, const struct videomode *vm)
4367 int hact, bl, tot; 4367 int hact, bl, tot;
4368 4368
4369 hact = vm->hactive; 4369 hact = vm->hactive;
4370 bl = vm->hsync_len + vm->hbp + vm->hfront_porch; 4370 bl = vm->hsync_len + vm->hback_porch + vm->hfront_porch;
4371 tot = hact + bl; 4371 tot = hact + bl;
4372 4372
4373#define TO_DISPC_T(x) ((u32)div64_u64((u64)x * 1000000000llu, pck)) 4373#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)
4376 "%u/%u/%u/%u = %u + %u = %u\n", 4376 "%u/%u/%u/%u = %u + %u = %u\n",
4377 str, 4377 str,
4378 pck, 4378 pck,
4379 vm->hsync_len, vm->hbp, hact, vm->hfront_porch, 4379 vm->hsync_len, vm->hback_porch, hact, vm->hfront_porch,
4380 bl, hact, tot, 4380 bl, hact, tot,
4381 TO_DISPC_T(vm->hsync_len), 4381 TO_DISPC_T(vm->hsync_len),
4382 TO_DISPC_T(vm->hbp), 4382 TO_DISPC_T(vm->hback_porch),
4383 TO_DISPC_T(hact), 4383 TO_DISPC_T(hact),
4384 TO_DISPC_T(vm->hfront_porch), 4384 TO_DISPC_T(vm->hfront_porch),
4385 TO_DISPC_T(bl), 4385 TO_DISPC_T(bl),
@@ -4401,12 +4401,12 @@ static void print_dsi_dispc_vm(const char *str,
4401 dsi_tput = (u64)byteclk * t->ndl * 8; 4401 dsi_tput = (u64)byteclk * t->ndl * 8;
4402 pck = (u32)div64_u64(dsi_tput, t->bitspp); 4402 pck = (u32)div64_u64(dsi_tput, t->bitspp);
4403 dsi_hact = DIV_ROUND_UP(DIV_ROUND_UP(t->hact * t->bitspp, 8) + 6, t->ndl); 4403 dsi_hact = DIV_ROUND_UP(DIV_ROUND_UP(t->hact * t->bitspp, 8) + 6, t->ndl);
4404 dsi_htot = t->hss + t->hsa + t->hse + t->hbp + dsi_hact + t->hfront_porch; 4404 dsi_htot = t->hss + t->hsa + t->hse + t->hbp + dsi_hact + t->hfp;
4405 4405
4406 vm.pixelclock = pck; 4406 vm.pixelclock = pck;
4407 vm.hsync_len = div64_u64((u64)(t->hsa + t->hse) * pck, byteclk); 4407 vm.hsync_len = div64_u64((u64)(t->hsa + t->hse) * pck, byteclk);
4408 vm.hbp = div64_u64((u64)t->hbp * pck, byteclk); 4408 vm.hback_porch = div64_u64((u64)t->hbp * pck, byteclk);
4409 vm.hfront_porch = div64_u64((u64)t->hfront_porch * pck, byteclk); 4409 vm.hfront_porch = div64_u64((u64)t->hfp * pck, byteclk);
4410 vm.hactive = t->hact; 4410 vm.hactive = t->hact;
4411 4411
4412 print_dispc_vm(str, &vm); 4412 print_dispc_vm(str, &vm);