From: Boram Park Date: Fri, 23 Feb 2018 00:05:24 +0000 (+0900) Subject: helper: add tdm_helper_output_vblank_timer_expired X-Git-Tag: submit/tizen/20180227.014049~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e7971e27e1a50142add6f46e71689f784989c58;p=platform%2Fcore%2Fuifw%2Flibtdm.git helper: add tdm_helper_output_vblank_timer_expired To check if output-vblank is expired Change-Id: I4c3339a62f970372c2749808f2a8d930dd211935 --- diff --git a/include/tdm_helper.h b/include/tdm_helper.h index fa82602..99fd638 100644 --- a/include/tdm_helper.h +++ b/include/tdm_helper.h @@ -236,6 +236,14 @@ tdm_helper_get_display_information(tdm_display *dpy, char *reply, int *len); int tdm_helper_output_commit_per_vblank_enabled(tdm_output *output); +/** + * @brief Get whether the vblank timer is expired or not for the output. + * @param[in] output An output the functionality has to be checked for + * @return -1 if error occurred, 1 if enabled, 0 if disabled. + */ +unsigned int +tdm_helper_output_vblank_timer_expired(tdm_output *output); + #ifdef __cplusplus } #endif diff --git a/src/tdm_helper.c b/src/tdm_helper.c index 6e2c5cf..0f6cd37 100644 --- a/src/tdm_helper.c +++ b/src/tdm_helper.c @@ -1087,3 +1087,12 @@ tdm_helper_output_commit_per_vblank_enabled(tdm_output *output) return !!private_output->commit_per_vblank; } +EXTERN unsigned int +tdm_helper_output_vblank_timer_expired(tdm_output *output) +{ + tdm_private_output *private_output = output; + + TDM_RETURN_VAL_IF_FAIL(private_output != NULL, -1); + + return private_output->vblank_timeout_timer_expired; +} \ No newline at end of file diff --git a/src/tdm_output.c b/src/tdm_output.c index 49b113b..53ea938 100644 --- a/src/tdm_output.c +++ b/src/tdm_output.c @@ -68,7 +68,12 @@ _tdm_output_vblank_timeout_cb(void *user_data) TDM_RETURN_VAL_IF_FAIL(private_output != NULL, TDM_ERROR_OPERATION_FAILED); - TDM_ERR("TDM output(%d) vblank TIMEOUT!!", private_output->pipe); + private_output->vblank_timeout_timer_expired++; + + TDM_ERR("TDM output(%d) vblank TIMEOUT!! (%d time%s)", + private_output->pipe, + private_output->vblank_timeout_timer_expired, + (private_output->vblank_timeout_timer_expired > 1) ? "s" : ""); LIST_FOR_EACH_ENTRY(v, &private_output->vblank_handler_list, link) { TDM_ERR("vblank_handler(%p) interval(%d) sync(%d) sent_to_frontend(%u) owner_tid(%d)", @@ -112,6 +117,7 @@ _tdm_output_vblank_timeout_update(tdm_private_output *private_output, int ms_del return; } TDM_INFO("output(%d) create vblank timeout timer", private_output->pipe); + private_output->vblank_timeout_timer_expired = 0; } ret = tdm_event_loop_source_timer_update(private_output->vblank_timeout_timer, ms_delay); diff --git a/src/tdm_private_types.h b/src/tdm_private_types.h index 099dae1..2b6d25d 100644 --- a/src/tdm_private_types.h +++ b/src/tdm_private_types.h @@ -208,6 +208,7 @@ struct _tdm_private_output { int layer_waiting_vblank; tdm_event_loop_source *vblank_timeout_timer; + unsigned int vblank_timeout_timer_expired; struct list_head change_handler_list;