mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amd: Mark amdgpu.gttsize parameter as deprecated and show warnings on use
When not set `gttsize` module parameter by default will get the value to use for the GTT pool from the TTM page limit, which is set by a separate module parameter. This inevitably leads to people not sure which one to set when they want more addressable memory for the GPU, and you'll end up seeing instructions online saying to set both. Add some messages to try to guide people both who are using or misusing the parameters and mark the parameter as deprecated with the plan to drop it after the next LTS kernel release. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
196b68aa32
commit
50e30e3a0e
@@ -1964,10 +1964,19 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
|
||||
/* Compute GTT size, either based on TTM limit
|
||||
* or whatever the user passed on module init.
|
||||
*/
|
||||
if (amdgpu_gtt_size == -1)
|
||||
gtt_size = ttm_tt_pages_limit() << PAGE_SHIFT;
|
||||
else
|
||||
gtt_size = (uint64_t)amdgpu_gtt_size << 20;
|
||||
gtt_size = ttm_tt_pages_limit() << PAGE_SHIFT;
|
||||
if (amdgpu_gtt_size != -1) {
|
||||
uint64_t configured_size = (uint64_t)amdgpu_gtt_size << 20;
|
||||
|
||||
drm_warn(&adev->ddev,
|
||||
"Configuring gttsize via module parameter is deprecated, please use ttm.pages_limit\n");
|
||||
if (gtt_size != configured_size)
|
||||
drm_warn(&adev->ddev,
|
||||
"GTT size has been set as %llu but TTM size has been set as %llu, this is unusual\n",
|
||||
configured_size, gtt_size);
|
||||
|
||||
gtt_size = configured_size;
|
||||
}
|
||||
|
||||
/* Initialize GTT memory pool */
|
||||
r = amdgpu_gtt_mgr_init(adev, gtt_size);
|
||||
|
||||
Reference in New Issue
Block a user