summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHarry Wentland <harry.wentland@amd.com>2018-03-23 13:39:27 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-04-11 13:08:06 -0500
commit4c61af8afe855fcf65a09d47c8e330bb1fd1fb4a (patch)
tree107431343a08b9843dec9f07471b6056f7ad9598 /drivers
parent01fe3e4876d3799b37e6c712dcfed7cc2cafa3f0 (diff)
drm/amd/display: Implement dm_get_timestamp
We use this to ensure we wait at least 500ms in between eDP disable/enable. Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
index 89342b48be6b..fe29125215b5 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
@@ -37,8 +37,10 @@
unsigned long long dm_get_timestamp(struct dc_context *ctx)
{
- /* TODO: return actual timestamp */
- return 0;
+ struct timespec64 time;
+
+ getrawmonotonic64(&time);
+ return timespec64_to_ns(&time);
}
void dm_perf_trace_timestamp(const char *func_name, unsigned int line)