OrangePi_CM5/drivers/gpu/drm/amd
David Gow 0a4fddc95c drm/amd/display: fix overflow on MIN_I64 definition
[ Upstream commit 6ae0632d17759852c07e2d1e0a31c728eb6ba246 ]

The definition of MIN_I64 in bw_fixed.c can cause gcc to whinge about
integer overflow, because it is treated as a positive value, which is
then negated. The temporary positive value is not necessarily
representable.

This causes the following warning:
../drivers/gpu/drm/amd/amdgpu/../display/dc/dml/calcs/bw_fixed.c:30:19:
warning: integer overflow in expression ‘-9223372036854775808’ of type
‘long long int’ results in ‘-9223372036854775808’ [-Woverflow]
  30 |         (int64_t)(-(1LL << 63))
     |                   ^

Writing out (-MAX_I64 - 1) works instead.

Signed-off-by: David Gow <davidgow@google.com>
Signed-off-by: Tales Aparecida <tales.aparecida@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 13:25:48 +02:00
..
acp drm: amd/acp: fix broken menu structure 2020-03-13 11:52:35 -04:00
amdgpu drm/amdgpu: use dirty framebuffer helper 2022-09-28 11:10:39 +02:00
amdkfd drm/amdkfd: Fix GWS queue count 2022-05-09 09:05:05 +02:00
display drm/amd/display: fix overflow on MIN_I64 definition 2022-10-26 13:25:48 +02:00
include drm/amdgpu: add support for IP discovery gc_info table v2 2022-01-05 12:40:32 +01:00
pm drm/amd/pm: add missing ->fini_microcode interface for Sienna Cichlid 2022-09-05 10:28:57 +02:00