Skip to content

Commit

Permalink
amdgpu: display: use modern ktime accessors
Browse files Browse the repository at this point in the history
getrawmonotonic64() is deprecated because of the nonstandard naming.

The replacement functions ktime_get_raw_ns() also simplifies the callers.

Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Harry Wentland <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
  • Loading branch information
arndb authored and alexdeucher committed Jun 19, 2018
1 parent 4daa4fb commit eeb2c3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 0 additions & 8 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@
#include "amdgpu_dm_irq.h"
#include "amdgpu_pm.h"

unsigned long long dm_get_timestamp(struct dc_context *ctx)
{
struct timespec64 time;

getrawmonotonic64(&time);
return timespec64_to_ns(&time);
}

unsigned long long dm_get_elapse_time_in_ns(struct dc_context *ctx,
unsigned long long current_time_stamp,
unsigned long long last_time_stamp)
Expand Down
5 changes: 4 additions & 1 deletion drivers/gpu/drm/amd/display/dc/dm_services.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,10 @@ bool dm_dmcu_set_pipe(struct dc_context *ctx, unsigned int controller_id);
#define dm_log_to_buffer(buffer, size, fmt, args)\
vsnprintf(buffer, size, fmt, args)

unsigned long long dm_get_timestamp(struct dc_context *ctx);
static inline unsigned long long dm_get_timestamp(struct dc_context *ctx)
{
return ktime_get_raw_ns();
}

unsigned long long dm_get_elapse_time_in_ns(struct dc_context *ctx,
unsigned long long current_time_stamp,
Expand Down

0 comments on commit eeb2c3c

Please sign in to comment.