double vblank_gap;
unsigned int quotient;
+ int last_interval;
unsigned int last_seq;
double last_time;
tdm_output_remove_vblank_handler_internal(private_vblank->output, _tdm_vblank_cb_vblank_HW, w);
tdm_display_unlock(private_vblank->dpy);
+ VDB("wait(%p) last(%.6f) sequence(%u) done (error:%d, call_cb:%u)",
+ w, 0, w->target_seq, error, call_cb);
+
if (call_cb && w->func)
w->func(private_vblank, error, 0, 0, 0, w->user_data);
private_vblank->output = output;
private_vblank->check_HW_or_SW = 1;
private_vblank->fps_changeable = 1;
+ private_vblank->last_interval = -1;
_tdm_vblank_update_output_info(private_vblank);
VIN("Create SW timer");
}
+ private_vblank->last_interval = ms_delay;
+
ret = tdm_event_loop_source_timer_update(private_vblank->SW_timer, ms_delay);
if (ret != TDM_ERROR_NONE) {
tdm_display_unlock(private_vblank->dpy);
skip, hw_interval, wait_info->target_seq);
}
+ private_vblank->last_interval = hw_interval;
+
if (private_vblank->add_front)
ret = tdm_output_wait_vblank_add_front(private_vblank->output, hw_interval, 0,
_tdm_vblank_cb_vblank_HW, wait_info);
return private_vblank->stamp;
}
+static unsigned int
+_tdm_vblank_get_waiting_count(tdm_private_vblank *private_vblank)
+{
+ tdm_vblank_wait_info *wait_info = NULL;
+ unsigned int count = 0;
+
+ LIST_FOR_EACH_ENTRY(wait_info, &private_vblank->HW_wait_list, link) {
+ count++;
+ }
+
+ LIST_FOR_EACH_ENTRY(wait_info, &private_vblank->SW_wait_list, link) {
+ count++;
+ }
+
+ return count;
+}
+
INTERN void
tdm_vblank_get_vblank_list_information(tdm_display *dpy, char *reply, int *len)
{
tdm_private_vblank *v = NULL;
+ tdm_output_dpms dpms = TDM_OUTPUT_DPMS_OFF;
+ tdm_output *output = tdm_display_get_output(dpy, 0, NULL);
+
+ if (output)
+ tdm_output_get_dpms(output, &dpms);
TDM_SNPRINTF(reply, len, "[Client Vblank List]\n");
+ TDM_SNPRINTF(reply, len, "* DPMS: %s\n", tdm_dpms_str(dpms));
TDM_SNPRINTF(reply, len, "* global fps: %u\n", vblank_global_fps);
- TDM_SNPRINTF(reply, len, "---------------------------------------------------------------\n");
- TDM_SNPRINTF(reply, len, "name fps ignore offset fake process\n");
- TDM_SNPRINTF(reply, len, "---------------------------------------------------------------\n");
+ TDM_SNPRINTF(reply, len, "----------------------------------------------------------------------------------\n");
+ TDM_SNPRINTF(reply, len, "Name Type Wait Interval Sequence Fps Ignore Offset Fake Process\n");
+ TDM_SNPRINTF(reply, len, "----------------------------------------------------------------------------------\n");
pthread_mutex_lock(&valid_list_lock);
LIST_FOR_EACH_ENTRY(v, &valid_vblank_list, valid_link) {
const char *proc_name = NULL;
pid_t pid = 0;
+ unsigned int count;
if (v->resource) {
struct wl_client *client = wl_resource_get_client(v->resource);
}
}
- TDM_SNPRINTF(reply, len, "%-12s %u %u %d %u %s (pid: %u)\n",
- v->name, v->fps, v->ignore_global_fps, v->offset, v->enable_fake,
- (proc_name) ? proc_name : "Unknown", pid);
+ count = _tdm_vblank_get_waiting_count(v);
+
+ TDM_SNPRINTF(reply, len, "%-8s(%p) ", v->name, v);
+ TDM_SNPRINTF(reply, len, "%-4s ", (v->last_type == VBLANK_EVENT_TYPE_HW) ? "HW" : "SW");
+ TDM_SNPRINTF(reply, len, "%-4s ", (count > 0) ? "O" : " ");
+ TDM_SNPRINTF(reply, len, "%-8d ", v->last_interval);
+ TDM_SNPRINTF(reply, len, "%-8u ", v->last_seq);
+ TDM_SNPRINTF(reply, len, "%-3u ", v->fps);
+ TDM_SNPRINTF(reply, len, "%-6u ", v->ignore_global_fps);
+ TDM_SNPRINTF(reply, len, "%-6d ", v->offset);
+ TDM_SNPRINTF(reply, len, "%-4u ", v->enable_fake);
+ TDM_SNPRINTF(reply, len, "%s(pid:%d)\n", (proc_name) ? proc_name : "Unknown", pid);
}
pthread_mutex_unlock(&valid_list_lock);