return TDM_ERROR_NOT_IMPLEMENTED;
}
- /* TODO: this is ugly. But before using tdm_output_get_dpms_internal, we have
- * to check if all backends's DPMS operation has no problem.
- */
- if (private_output->commit_per_vblank)
- tdm_output_get_dpms_internal(output, &dpms_value);
- else
- dpms_value = private_output->current_dpms_value;
+ ret = tdm_output_get_dpms_internal(output, &dpms_value);
+ TDM_RETURN_VAL_IF_FAIL(ret == TDM_ERROR_NONE, ret);
if (dpms_value == TDM_OUTPUT_DPMS_ON) {
if (func) {
TDM_RETURN_VAL_IF_FAIL(private_output != NULL, TDM_ERROR_INVALID_PARAMETER);
+ /* TODO: this is ugly. But before calling backend's output_get_dpms(), we have
+ * to check if all backends's DPMS operation has no problem. In future, we'd
+ * better use new env instead of using commit_per_vblank variable to distinguish
+ * whether we use the stored value or backend's output_get_dpms.
+ */
+ if (!private_output->commit_per_vblank) {
+ *dpms_value = private_output->current_dpms_value;
+ return TDM_ERROR_NONE;
+ }
+
func_output = &private_display->func_output;
if (!func_output->output_get_dpms) {