Skip to content

Commit 987ed8e

Browse files
Kevin Wangalexdeucher
authored andcommitted
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 <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 59e7a8c commit 987ed8e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ static int gfx_v10_0_mec_init(struct amdgpu_device *adev)
11131113
return r;
11141114
}
11151115

1116-
memset(hpd, 0, adev->gfx.mec.hpd_eop_obj->tbo.mem.size);
1116+
memset(hpd, 0, mec_hpd_size);
11171117

11181118
amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);
11191119
amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1946,7 +1946,7 @@ static int gfx_v9_0_mec_init(struct amdgpu_device *adev)
19461946
return r;
19471947
}
19481948

1949-
memset(hpd, 0, adev->gfx.mec.hpd_eop_obj->tbo.mem.size);
1949+
memset(hpd, 0, mec_hpd_size);
19501950

19511951
amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);
19521952
amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);

0 commit comments

Comments
 (0)