Skip to content

Commit

Permalink
drm: using mul_u32_u32() requires linux/math64.h
Browse files Browse the repository at this point in the history
Some pending include file cleanups produced this error:

In file included from include/linux/kernel.h:27,
                 from drivers/gpu/ipu-v3/ipu-dp.c:7:
include/drm/drm_color_mgmt.h: In function 'drm_color_lut_extract':
include/drm/drm_color_mgmt.h:45:46: error: implicit declaration of function 'mul_u32_u32' [-Werror=implicit-function-declaration]
   45 |                 return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1),
      |                                              ^~~~~~~~~~~

Fixes: c6fbb6b ("drm: Fix color LUT rounding")
Signed-off-by: Stephen Rothwell <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
sfrothwell authored and vsyrjala committed Dec 19, 2023
1 parent 6914968 commit 933a2a3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/drm/drm_color_mgmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define __DRM_COLOR_MGMT_H__

#include <linux/ctype.h>
#include <linux/math64.h>
#include <drm/drm_property.h>

struct drm_crtc;
Expand Down

0 comments on commit 933a2a3

Please sign in to comment.