mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
drm/amdgpu/mes11: fix set_hw_resources_1 calculation
It's GPU page size not CPU page size. In most cases they are the same, but not always. This can lead to overallocation on systems with larger pages. Cc: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Cc: Christian König <christian.koenig@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -732,7 +732,7 @@ static int mes_v11_0_set_hw_resources(struct amdgpu_mes *mes)
|
||||
|
||||
static int mes_v11_0_set_hw_resources_1(struct amdgpu_mes *mes)
|
||||
{
|
||||
int size = 128 * PAGE_SIZE;
|
||||
int size = 128 * AMDGPU_GPU_PAGE_SIZE;
|
||||
int ret = 0;
|
||||
struct amdgpu_device *adev = mes->adev;
|
||||
union MESAPI_SET_HW_RESOURCES_1 mes_set_hw_res_pkt;
|
||||
|
||||
Reference in New Issue
Block a user