diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3846-amdgpu-dc-inline-dml_round_to_multiple.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3846-amdgpu-dc-inline-dml_round_to_multiple.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3846-amdgpu-dc-inline-dml_round_to_multiple.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3846-amdgpu-dc-inline-dml_round_to_multiple.patch new file mode 100644 index 00000000..6ac16511 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3846-amdgpu-dc-inline-dml_round_to_multiple.patch @@ -0,0 +1,46 @@ +From 304fb7e208bba513a0120ada4226fda2135b2381 Mon Sep 17 00:00:00 2001 +From: Dave Airlie <airlied@redhat.com> +Date: Fri, 29 Sep 2017 17:13:31 +1000 +Subject: [PATCH 3846/4131] amdgpu/dc: inline dml_round_to_multiple + +turns out to be a win to inline this. + +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> +--- + drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h b/drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h +index 30aa184..c1aa947 100644 +--- a/drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h ++++ b/drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h +@@ -100,4 +100,24 @@ static inline double dml_log(double x, double base) + return (double) dcn_bw_log(x, base); + } + ++static inline unsigned int dml_round_to_multiple(unsigned int num, ++ unsigned int multiple, ++ bool up) ++{ ++ unsigned int remainder; ++ ++ if (multiple == 0) ++ return num; ++ ++ remainder = num % multiple; ++ ++ if (remainder == 0) ++ return num; ++ ++ if (up) ++ return (num + multiple - remainder); ++ else ++ return (num - remainder); ++} ++ + #endif +-- +2.7.4 + |