amdgpu: mostly revert "use the high VA range if possible v2"
This reverts commit 07ea20d5be
.
Unfortunately it turned out that this change broke some corner cases in
Mesa.
Revert it for now, but keep the high range in separate VA managers.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
main
parent
1384c08123
commit
cd8a80493b
|
@ -264,27 +264,29 @@ int amdgpu_device_initialize(int fd,
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dev->dev_info.high_va_offset && dev->dev_info.high_va_max) {
|
|
||||||
start = dev->dev_info.high_va_offset;
|
|
||||||
max = dev->dev_info.high_va_max;
|
|
||||||
} else {
|
|
||||||
start = dev->dev_info.virtual_address_offset;
|
start = dev->dev_info.virtual_address_offset;
|
||||||
max = dev->dev_info.virtual_address_max;
|
max = MIN2(dev->dev_info.virtual_address_max, 0x100000000ULL);
|
||||||
}
|
|
||||||
|
|
||||||
max = MIN2(max, (start & ~0xffffffffULL) + 0x100000000ULL);
|
|
||||||
amdgpu_vamgr_init(&dev->vamgr_32, start, max,
|
amdgpu_vamgr_init(&dev->vamgr_32, start, max,
|
||||||
dev->dev_info.virtual_address_alignment);
|
dev->dev_info.virtual_address_alignment);
|
||||||
dev->address32_hi = start >> 32;
|
dev->address32_hi = start >> 32;
|
||||||
|
|
||||||
start = max;
|
start = max;
|
||||||
if (dev->dev_info.high_va_offset && dev->dev_info.high_va_max)
|
max = MAX2(dev->dev_info.virtual_address_max, 0x100000000ULL);
|
||||||
max = dev->dev_info.high_va_max;
|
|
||||||
else
|
|
||||||
max = dev->dev_info.virtual_address_max;
|
|
||||||
amdgpu_vamgr_init(&dev->vamgr, start, max,
|
amdgpu_vamgr_init(&dev->vamgr, start, max,
|
||||||
dev->dev_info.virtual_address_alignment);
|
dev->dev_info.virtual_address_alignment);
|
||||||
|
|
||||||
|
start = dev->dev_info.high_va_offset;
|
||||||
|
max = MIN2(dev->dev_info.high_va_max, (start & ~0xffffffffULL) +
|
||||||
|
0x100000000ULL);
|
||||||
|
amdgpu_vamgr_init(&dev->vamgr_high_32, start, max,
|
||||||
|
dev->dev_info.virtual_address_alignment);
|
||||||
|
|
||||||
|
start = max;
|
||||||
|
max = MAX2(dev->dev_info.high_va_max, (start & ~0xffffffffULL) +
|
||||||
|
0x100000000ULL);
|
||||||
|
amdgpu_vamgr_init(&dev->vamgr_high, start, max,
|
||||||
|
dev->dev_info.virtual_address_alignment);
|
||||||
|
|
||||||
amdgpu_parse_asic_ids(dev);
|
amdgpu_parse_asic_ids(dev);
|
||||||
|
|
||||||
*major_version = dev->major_version;
|
*major_version = dev->major_version;
|
||||||
|
|
|
@ -84,10 +84,14 @@ struct amdgpu_device {
|
||||||
pthread_mutex_t bo_table_mutex;
|
pthread_mutex_t bo_table_mutex;
|
||||||
struct drm_amdgpu_info_device dev_info;
|
struct drm_amdgpu_info_device dev_info;
|
||||||
struct amdgpu_gpu_info info;
|
struct amdgpu_gpu_info info;
|
||||||
/** The global VA manager for the whole virtual address space */
|
/** The VA manager for the lower virtual address space */
|
||||||
struct amdgpu_bo_va_mgr vamgr;
|
struct amdgpu_bo_va_mgr vamgr;
|
||||||
/** The VA manager for the 32bit address space */
|
/** The VA manager for the 32bit address space */
|
||||||
struct amdgpu_bo_va_mgr vamgr_32;
|
struct amdgpu_bo_va_mgr vamgr_32;
|
||||||
|
/** The VA manager for the high virtual address space */
|
||||||
|
struct amdgpu_bo_va_mgr vamgr_high;
|
||||||
|
/** The VA manager for the 32bit high address space */
|
||||||
|
struct amdgpu_bo_va_mgr vamgr_high_32;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct amdgpu_bo {
|
struct amdgpu_bo {
|
||||||
|
|
Loading…
Reference in New Issue