mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
drm/amdgpu: Add helper to set gart size
Add a helper to make any adjustments to gart size based on other parameters or conditions. Suggested-by: Christian König <christian.koenig@amd.com> Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
d12d05c4bc
commit
035542d9fe
|
|
@ -280,6 +280,15 @@ void amdgpu_gmc_sysvm_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc
|
|||
mc->gart_size >> 20, mc->gart_start, mc->gart_end);
|
||||
}
|
||||
|
||||
void amdgpu_gmc_set_gart_size(struct amdgpu_device *adev, u64 default_size)
|
||||
{
|
||||
if (amdgpu_gart_size == -1)
|
||||
adev->gmc.gart_size =
|
||||
default_size + adev->pm.smu_prv_buffer_size;
|
||||
else
|
||||
adev->gmc.gart_size = (u64)amdgpu_gart_size << 20;
|
||||
}
|
||||
|
||||
/**
|
||||
* amdgpu_gmc_gart_location - try to find GART location
|
||||
*
|
||||
|
|
|
|||
|
|
@ -486,4 +486,6 @@ void amdgpu_gmc_init_sw_mem_ranges(struct amdgpu_device *adev,
|
|||
struct amdgpu_mem_partition_info *mem_ranges);
|
||||
int amdgpu_gmc_get_vram_info(struct amdgpu_device *adev,
|
||||
int *vram_width, int *vram_type, int *vram_vendor);
|
||||
|
||||
void amdgpu_gmc_set_gart_size(struct amdgpu_device *adev, u64 default_size);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user