diff options
| author | Mateusz Jończyk <[email protected]> | 2022-07-06 20:01:44 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-07-07 19:55:44 +0000 |
| commit | 9da2902609f7519c48eda84f953f72fee53f2b71 (patch) | |
| tree | cece28a1fffb28a2a801442a7031ba6adbb9ee2b /drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | |
| parent | drm/amd/display: remove repeated includes (diff) | |
| download | kernel-9da2902609f7519c48eda84f953f72fee53f2b71.tar.gz kernel-9da2902609f7519c48eda84f953f72fee53f2b71.zip | |
drm/radeon: avoid bogus "vram limit (0) must be a power of 2" warning
I was getting the following message on boot on Linux 5.19-rc5:
radeon 0000:01:05.0: vram limit (0) must be a power of 2
(I didn't use any radeon.vramlimit commandline parameter).
This is caused by
commit 8c2d34eb53b9 ("drm/radeon: use kernel is_power_of_2 rather than local version")
which removed radeon_check_pot_argument() and converted its users to
is_power_of_2(). The two functions differ in its handling of 0, which is
the default value of radeon_vram_limit: radeon_check_pot_argument()
"incorrectly" considered it a power of 2, while is_power_of_2() does not.
An appropriate conditional silences the warning message.
It is not necessary to add a similar test to other callers of
is_power_of_2() in radeon_device.c. The matching commit in amdgpu:
commit 761175078466 ("drm/amdgpu: use kernel is_power_of_2 rather than local version")
is unaffected by this bug.
Tested on Radeon HD 3200.
Not ccing stable, this is not serious enough.
Fixes: 8c2d34eb53b9 ("drm/radeon: use kernel is_power_of_2 rather than local version")
Cc: Alex Deucher <[email protected]>
Cc: Christian König <[email protected]>
Cc: "Pan, Xinhui" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Jonathan Gray <[email protected]>
Signed-off-by: Mateusz Jończyk <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h')
0 files changed, 0 insertions, 0 deletions
