drm/amd/display: Implement dm_get_timestamp
authorHarry Wentland <harry.wentland@amd.com>
Fri, 23 Mar 2018 17:39:27 +0000 (13:39 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 11 Apr 2018 18:08:06 +0000 (13:08 -0500)
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>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c

index 89342b48be6b4a6f0b88974e95cce241570958e1..fe29125215b5c2cf47a76e8c5be054ae7af77c69 100644 (file)
 
 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)