Skip to contentSkip to conversation

drm/amd/pp: fix "Delete the wrapper layer of smu_allocate/free_memory"

PATCH In review Christian König 2 participants 2 messages Mar 6, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c     | 2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c +1 -1
index cf9ef7add56b..e2ee23ade5c5 100644
@@ -327,10 +327,10 @@ static int rv_start_smu(struct pp_hwmgr *hwmgr)
 
 static int rv_smu_init(struct pp_hwmgr *hwmgr)
 {
+	struct amdgpu_bo *handle = NULL;
 	struct rv_smumgr *priv;
 	uint64_t mc_addr;
 	void *kaddr = NULL;
-	struct amdgpu_bo *handle;
 	int r;
 
 	priv = kzalloc(sizeof(struct rv_smumgr), GFP_KERNEL);
drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c +1 -1
index b7be91e7235b..15e1afa28018 100644
@@ -377,11 +377,11 @@ static int vega10_verify_smc_interface(struct pp_hwmgr *hwmgr)
 
 static int vega10_smu_init(struct pp_hwmgr *hwmgr)
 {
+	struct amdgpu_bo *handle = NULL;
 	struct vega10_smumgr *priv;
 	uint64_t mc_addr;
 	void *kaddr = NULL;
 	unsigned long tools_size;
-	struct amdgpu_bo *handle;
 	int ret;
 	struct cgs_firmware_info info = {0};
 
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20180306135811.2147-1-christian.koenig-5C7GfCeVMHo@public.gmane.org

Reviewed-by Rex Zhu
#2 lore raw

Best Regards
Rex

________________________________
From: Christian König <[email protected]>
Sent: Tuesday, March 6, 2018 9:58 PM
To: Zhu, Rex; [email protected]
Subject: [PATCH] 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.

---
 drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c     | 2 +-
 drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c +1 -1
index cf9ef7add56b..e2ee23ade5c5 100644
@@ -327,10 +327,10 @@ static int rv_start_smu(struct pp_hwmgr *hwmgr)
 
 static int rv_smu_init(struct pp_hwmgr *hwmgr)
 {
+       struct amdgpu_bo *handle = NULL;
         struct rv_smumgr *priv;
         uint64_t mc_addr;
         void *kaddr = NULL;
-       struct amdgpu_bo *handle;
         int r;
 
         priv = kzalloc(sizeof(struct rv_smumgr), GFP_KERNEL);
drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c +1 -1
index b7be91e7235b..15e1afa28018 100644
@@ -377,11 +377,11 @@ static int vega10_verify_smc_interface(struct pp_hwmgr *hwmgr)
 
 static int vega10_smu_init(struct pp_hwmgr *hwmgr)
 {
+       struct amdgpu_bo *handle = NULL;
         struct vega10_smumgr *priv;
         uint64_t mc_addr;
         void *kaddr = NULL;
         unsigned long tools_size;
-       struct amdgpu_bo *handle;
         int ret;
         struct cgs_firmware_info info = {0};
 

--
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx