Skip to content

Commit

Permalink
OMAP: DSS2: DSI: remove auto-update perf measurement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomi Valkeinen committed Feb 24, 2010
1 parent b9eb5d7 commit 1bbb275
Showing 1 changed file with 9 additions and 72 deletions.
81 changes: 9 additions & 72 deletions drivers/video/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,6 @@ static struct
#ifdef DEBUG
ktime_t perf_setup_time;
ktime_t perf_start_time;
ktime_t perf_start_time_auto;
int perf_measure_frames;
#endif
int debug_read;
int debug_write;
Expand Down Expand Up @@ -338,12 +336,6 @@ static void dsi_perf_mark_start(void)
dsi.perf_start_time = ktime_get();
}

static void dsi_perf_mark_start_auto(void)
{
dsi.perf_measure_frames = 0;
dsi.perf_start_time_auto = ktime_get();
}

static void dsi_perf_show(const char *name)
{
ktime_t t, setup_time, trans_time;
Expand Down Expand Up @@ -374,72 +366,19 @@ static void dsi_perf_show(const char *name)
dsi.active_update_region.h *
dsi.active_update_region.device->ctrl.pixel_size / 8;

if (dsi.update_mode == OMAP_DSS_UPDATE_AUTO) {
static u32 s_total_trans_us, s_total_setup_us;
static u32 s_min_trans_us = 0xffffffff, s_min_setup_us;
static u32 s_max_trans_us, s_max_setup_us;
const int numframes = 100;
ktime_t total_time_auto;
u32 total_time_auto_us;

dsi.perf_measure_frames++;

if (setup_us < s_min_setup_us)
s_min_setup_us = setup_us;

if (setup_us > s_max_setup_us)
s_max_setup_us = setup_us;

s_total_setup_us += setup_us;

if (trans_us < s_min_trans_us)
s_min_trans_us = trans_us;

if (trans_us > s_max_trans_us)
s_max_trans_us = trans_us;

s_total_trans_us += trans_us;

if (dsi.perf_measure_frames < numframes)
return;

total_time_auto = ktime_sub(t, dsi.perf_start_time_auto);
total_time_auto_us = (u32)ktime_to_us(total_time_auto);

printk(KERN_INFO "DSI(%s): %u fps, setup %u/%u/%u, "
"trans %u/%u/%u\n",
name,
1000 * 1000 * numframes / total_time_auto_us,
s_min_setup_us,
s_max_setup_us,
s_total_setup_us / numframes,
s_min_trans_us,
s_max_trans_us,
s_total_trans_us / numframes);

s_total_setup_us = 0;
s_min_setup_us = 0xffffffff;
s_max_setup_us = 0;
s_total_trans_us = 0;
s_min_trans_us = 0xffffffff;
s_max_trans_us = 0;
dsi_perf_mark_start_auto();
} else {
printk(KERN_INFO "DSI(%s): %u us + %u us = %u us (%uHz), "
"%u bytes, %u kbytes/sec\n",
name,
setup_us,
trans_us,
total_us,
1000*1000 / total_us,
total_bytes,
total_bytes * 1000 / total_us);
}
printk(KERN_INFO "DSI(%s): %u us + %u us = %u us (%uHz), "
"%u bytes, %u kbytes/sec\n",
name,
setup_us,
trans_us,
total_us,
1000*1000 / total_us,
total_bytes,
total_bytes * 1000 / total_us);
}
#else
#define dsi_perf_mark_setup()
#define dsi_perf_mark_start()
#define dsi_perf_mark_start_auto()
#define dsi_perf_show(x)
#endif

Expand Down Expand Up @@ -2933,8 +2872,6 @@ static int dsi_set_update_mode(struct omap_dss_device *dssdev,

dsi_set_update_region(dssdev, 0, 0, w, h);

dsi_perf_mark_start_auto();

wake_up(&dsi.waitqueue);
}
}
Expand Down

0 comments on commit 1bbb275

Please sign in to comment.