]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: fix build_coefficients() argument
authorArnd Bergmann <arnd@arndb.de>
Mon, 26 Oct 2020 21:00:32 +0000 (22:00 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Nov 2020 01:02:01 +0000 (20:02 -0500)
commit44fe4f1bf6ee524db5192e2dc2e1d25cfb0d07e4
tree91cf6e3994f3f8d74018c4d1d895e13191be4d8c
parentd9fee1642ece8098d5be16fb4096ada445808161
drm/amdgpu: fix build_coefficients() argument

gcc -Wextra warns about a function taking an enum argument
being called with a bool:

drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c: In function 'apply_degamma_for_user_regamma':
drivers/gpu/drm/amd/amdgpu/../display/modules/color/color_gamma.c:1617:29: warning: implicit conversion from 'enum <anonymous>' to 'enum dc_transfer_func_predefined' [-Wenum-conversion]
 1617 |  build_coefficients(&coeff, true);

It appears that a patch was added using the old calling conventions
after the type was changed, and the value should actually be 0
(TRANSFER_FUNCTION_SRGB) here instead of 1 (true).

Fixes: c32dff3be103 ("drm/amd/display: Add user_regamma to color module")
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/color/color_gamma.c