Commit 987ed8e938d11fcf4b90ab97cad71c7ffd272776

Authored by Kevin Wang
Committed by Alex Deucher
1 parent 59e7a8cc2d

drm/amdgpu: fix hpd bo size calculation error

the HPD bo size calculation error.
the "mem.size" can't present actual BO size all time.

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <Christian.Koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff

drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
... ... @@ -1113,7 +1113,7 @@
1113 1113 return r;
1114 1114 }
1115 1115  
1116   - memset(hpd, 0, adev->gfx.mec.hpd_eop_obj->tbo.mem.size);
  1116 + memset(hpd, 0, mec_hpd_size);
1117 1117  
1118 1118 amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);
1119 1119 amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
... ... @@ -1946,7 +1946,7 @@
1946 1946 return r;
1947 1947 }
1948 1948  
1949   - memset(hpd, 0, adev->gfx.mec.hpd_eop_obj->tbo.mem.size);
  1949 + memset(hpd, 0, mec_hpd_size);
1950 1950  
1951 1951 amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);
1952 1952 amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);