diff options
author | Christian König <christian.koenig@amd.com> | 2018-03-06 08:56:00 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-03-07 16:10:11 -0500 |
commit | 586b9a4d7de9508ef714e5e913406376ba9c9623 (patch) | |
tree | 2d8a0a68a0dc6e319fba8682bf9496062c63c93d /drivers/gpu/drm | |
parent | bb03c9c4a917ed602a6b9b01824dbfde5f6b9248 (diff) |
drm/amd/pp: fix "Delete the wrapper layer of smu_allocate/free_memory"
For amdgpu_bo_create_kernel to work the handle must be NULL initialized,
otherwise we only try to pin and map the BO.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Rex Zhu <rezhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c index cf9ef7add56b..e2ee23ade5c5 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c | |||
@@ -327,10 +327,10 @@ static int rv_start_smu(struct pp_hwmgr *hwmgr) | |||
327 | 327 | ||
328 | static int rv_smu_init(struct pp_hwmgr *hwmgr) | 328 | static int rv_smu_init(struct pp_hwmgr *hwmgr) |
329 | { | 329 | { |
330 | struct amdgpu_bo *handle = NULL; | ||
330 | struct rv_smumgr *priv; | 331 | struct rv_smumgr *priv; |
331 | uint64_t mc_addr; | 332 | uint64_t mc_addr; |
332 | void *kaddr = NULL; | 333 | void *kaddr = NULL; |
333 | struct amdgpu_bo *handle; | ||
334 | int r; | 334 | int r; |
335 | 335 | ||
336 | priv = kzalloc(sizeof(struct rv_smumgr), GFP_KERNEL); | 336 | priv = kzalloc(sizeof(struct rv_smumgr), GFP_KERNEL); |
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c index b7be91e7235b..15e1afa28018 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | |||
@@ -377,11 +377,11 @@ static int vega10_verify_smc_interface(struct pp_hwmgr *hwmgr) | |||
377 | 377 | ||
378 | static int vega10_smu_init(struct pp_hwmgr *hwmgr) | 378 | static int vega10_smu_init(struct pp_hwmgr *hwmgr) |
379 | { | 379 | { |
380 | struct amdgpu_bo *handle = NULL; | ||
380 | struct vega10_smumgr *priv; | 381 | struct vega10_smumgr *priv; |
381 | uint64_t mc_addr; | 382 | uint64_t mc_addr; |
382 | void *kaddr = NULL; | 383 | void *kaddr = NULL; |
383 | unsigned long tools_size; | 384 | unsigned long tools_size; |
384 | struct amdgpu_bo *handle; | ||
385 | int ret; | 385 | int ret; |
386 | struct cgs_firmware_info info = {0}; | 386 | struct cgs_firmware_info info = {0}; |
387 | 387 | ||