summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/basics/conversion.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-10-03 13:49:42 +1000
committerAlex Deucher <alexander.deucher@amd.com>2017-10-06 13:00:27 -0400
commit23d433fabef852e82053186b60710d138f727284 (patch)
tree0d42278c97594efbdca7a669e992f776c02c2c12 /drivers/gpu/drm/amd/display/dc/basics/conversion.h
parent4ee67c71b89948289eb5c55f1a19281be61178e5 (diff)
amdgpu/dc: use kernel ilog2 for log_2.
This should produce the same result. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/basics/conversion.h')
-rw-r--r--drivers/gpu/drm/amd/display/dc/basics/conversion.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/basics/conversion.h b/drivers/gpu/drm/amd/display/dc/basics/conversion.h
index 189325f68cfd..ade785c4fdc7 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/conversion.h
+++ b/drivers/gpu/drm/amd/display/dc/basics/conversion.h
@@ -38,6 +38,9 @@ void convert_float_matrix(
struct fixed31_32 *flt,
uint32_t buffer_size);
-unsigned int log_2(unsigned int num);
+static inline unsigned int log_2(unsigned int num)
+{
+ return ilog2(num);
+}
#endif