aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2010-01-11 09:41:10 -0500
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-02-24 07:31:26 -0500
commit1bbb275e261eb204795d4a48b3e485f2ad3d627c (patch)
tree200596965a1c7530ce617de74d535a986330c8b1 /drivers/video/omap2
parentb9eb5d7d0b9bf7c6430374333e4b9dae73bbba20 (diff)
OMAP: DSS2: DSI: remove auto-update perf measurement
Remove performance measurement for auto-update. Auto-update and thus performance measurement cannot be supported after the driver change where the control is moved to display drivers. This is part of a larger patch-set, which moves the control from omapdss driver to the display driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/dss/dsi.c81
1 files changed, 9 insertions, 72 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 53fc0f8cb1a0..65c062f2862c 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -261,8 +261,6 @@ static struct
261#ifdef DEBUG 261#ifdef DEBUG
262 ktime_t perf_setup_time; 262 ktime_t perf_setup_time;
263 ktime_t perf_start_time; 263 ktime_t perf_start_time;
264 ktime_t perf_start_time_auto;
265 int perf_measure_frames;
266#endif 264#endif
267 int debug_read; 265 int debug_read;
268 int debug_write; 266 int debug_write;
@@ -338,12 +336,6 @@ static void dsi_perf_mark_start(void)
338 dsi.perf_start_time = ktime_get(); 336 dsi.perf_start_time = ktime_get();
339} 337}
340 338
341static void dsi_perf_mark_start_auto(void)
342{
343 dsi.perf_measure_frames = 0;
344 dsi.perf_start_time_auto = ktime_get();
345}
346
347static void dsi_perf_show(const char *name) 339static void dsi_perf_show(const char *name)
348{ 340{
349 ktime_t t, setup_time, trans_time; 341 ktime_t t, setup_time, trans_time;
@@ -374,72 +366,19 @@ static void dsi_perf_show(const char *name)
374 dsi.active_update_region.h * 366 dsi.active_update_region.h *
375 dsi.active_update_region.device->ctrl.pixel_size / 8; 367 dsi.active_update_region.device->ctrl.pixel_size / 8;
376 368
377 if (dsi.update_mode == OMAP_DSS_UPDATE_AUTO) { 369 printk(KERN_INFO "DSI(%s): %u us + %u us = %u us (%uHz), "
378 static u32 s_total_trans_us, s_total_setup_us; 370 "%u bytes, %u kbytes/sec\n",
379 static u32 s_min_trans_us = 0xffffffff, s_min_setup_us; 371 name,
380 static u32 s_max_trans_us, s_max_setup_us; 372 setup_us,
381 const int numframes = 100; 373 trans_us,
382 ktime_t total_time_auto; 374 total_us,
383 u32 total_time_auto_us; 375 1000*1000 / total_us,
384 376 total_bytes,
385 dsi.perf_measure_frames++; 377 total_bytes * 1000 / total_us);
386
387 if (setup_us < s_min_setup_us)
388 s_min_setup_us = setup_us;
389
390 if (setup_us > s_max_setup_us)
391 s_max_setup_us = setup_us;
392
393 s_total_setup_us += setup_us;
394
395 if (trans_us < s_min_trans_us)
396 s_min_trans_us = trans_us;
397
398 if (trans_us > s_max_trans_us)
399 s_max_trans_us = trans_us;
400
401 s_total_trans_us += trans_us;
402
403 if (dsi.perf_measure_frames < numframes)
404 return;
405
406 total_time_auto = ktime_sub(t, dsi.perf_start_time_auto);
407 total_time_auto_us = (u32)ktime_to_us(total_time_auto);
408
409 printk(KERN_INFO "DSI(%s): %u fps, setup %u/%u/%u, "
410 "trans %u/%u/%u\n",
411 name,
412 1000 * 1000 * numframes / total_time_auto_us,
413 s_min_setup_us,
414 s_max_setup_us,
415 s_total_setup_us / numframes,
416 s_min_trans_us,
417 s_max_trans_us,
418 s_total_trans_us / numframes);
419
420 s_total_setup_us = 0;
421 s_min_setup_us = 0xffffffff;
422 s_max_setup_us = 0;
423 s_total_trans_us = 0;
424 s_min_trans_us = 0xffffffff;
425 s_max_trans_us = 0;
426 dsi_perf_mark_start_auto();
427 } else {
428 printk(KERN_INFO "DSI(%s): %u us + %u us = %u us (%uHz), "
429 "%u bytes, %u kbytes/sec\n",
430 name,
431 setup_us,
432 trans_us,
433 total_us,
434 1000*1000 / total_us,
435 total_bytes,
436 total_bytes * 1000 / total_us);
437 }
438} 378}
439#else 379#else
440#define dsi_perf_mark_setup() 380#define dsi_perf_mark_setup()
441#define dsi_perf_mark_start() 381#define dsi_perf_mark_start()
442#define dsi_perf_mark_start_auto()
443#define dsi_perf_show(x) 382#define dsi_perf_show(x)
444#endif 383#endif
445 384
@@ -2933,8 +2872,6 @@ static int dsi_set_update_mode(struct omap_dss_device *dssdev,
2933 2872
2934 dsi_set_update_region(dssdev, 0, 0, w, h); 2873 dsi_set_update_region(dssdev, 0, 0, w, h);
2935 2874
2936 dsi_perf_mark_start_auto();
2937
2938 wake_up(&dsi.waitqueue); 2875 wake_up(&dsi.waitqueue);
2939 } 2876 }
2940 } 2877 }