tdm_display *dpy;
tdm_output *output;
tdm_output_conn_status connection;
- tdm_output_dpms dpms;
unsigned int vrefresh;
tdm_vblank_event_type last_type;
{
tdm_output *output = private_vblank->output;
tdm_output_conn_status connection = TDM_OUTPUT_CONN_STATUS_DISCONNECTED;
- tdm_output_dpms dpms = TDM_OUTPUT_DPMS_OFF;
unsigned int vrefresh = 0;
tdm_output_get_conn_status(output, &connection);
vrefresh = mode->vrefresh;
else
VWR("mode not setted!!!");
- tdm_output_get_dpms(output, &dpms);
}
if (vrefresh == 0) {
vrefresh = TDM_VBLANK_DEFAULT_VREFRESH;
}
- private_vblank->dpms = dpms;
private_vblank->connection = connection;
private_vblank->vrefresh = vrefresh;
private_vblank->HW_vblank_gap = 1.0 / private_vblank->vrefresh;
if (private_vblank->fps_changeable)
private_vblank->fps = vrefresh;
- VIN("dpms(%d) connection(%d) vrefresh(%d) fps(%d) fps_changeable(%d)",
- private_vblank->dpms, private_vblank->connection,
+ VIN("connection(%d) vrefresh(%d) fps(%d) fps_changeable(%d)",
+ private_vblank->connection,
private_vblank->vrefresh, private_vblank->fps, private_vblank->fps_changeable);
}
switch (type) {
case TDM_OUTPUT_CHANGE_DPMS:
- if (private_vblank->dpms == value.u32)
- break;
VIN("dpms %s", tdm_dpms_str(value.u32));
- _tdm_vblank_update_output_info(private_vblank);
private_vblank->check_HW_or_SW = 1;
- if (private_vblank->dpms != TDM_OUTPUT_DPMS_ON) {
+ if (value.u32 != TDM_OUTPUT_DPMS_ON) {
if (private_vblank->enable_fake)
_tdm_vblank_change_to_SW(private_vblank);
else
_tdm_vblank_valid_list_add(&private_vblank->valid_link, &valid_vblank_list);
- VIN("created. vrefresh(%d) dpms(%d) connection(%d)",
- private_vblank->vrefresh, private_vblank->dpms, private_vblank->connection);
+ VIN("created. vrefresh(%d) connection(%d)",
+ private_vblank->vrefresh, private_vblank->connection);
return (tdm_vblank *)private_vblank;
}
{
tdm_private_vblank *private_vblank = vblank;
tdm_vblank_wait_info *wait_info;
+ tdm_output_dpms dpms = TDM_OUTPUT_DPMS_OFF;
unsigned int fps;
tdm_error ret;
return TDM_ERROR_BAD_REQUEST;
}
+ tdm_output_get_dpms(private_vblank->output, &dpms);
+
if (!private_vblank->enable_fake) {
if (private_vblank->connection == TDM_OUTPUT_CONN_STATUS_DISCONNECTED) {
VER("can't wait a vblank: output disconnected");
return TDM_ERROR_OUTPUT_DISCONNECTED;
}
- if (private_vblank->dpms != TDM_OUTPUT_DPMS_ON) {
+ if (dpms != TDM_OUTPUT_DPMS_ON) {
VER("can't wait a vblank: DPMS off");
return TDM_ERROR_DPMS_OFF;
}
*/
if (private_vblank->vrefresh % fps)
wait_info->type = VBLANK_TYPE_SW;
- else if (private_vblank->dpms == TDM_OUTPUT_DPMS_OFF ||
+ else if (dpms == TDM_OUTPUT_DPMS_OFF ||
private_vblank->connection == TDM_OUTPUT_CONN_STATUS_DISCONNECTED)
wait_info->type = VBLANK_TYPE_SW_FAKE;
else if (private_vblank->offset == 0)