]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/amd/pp: fix "Delete the wrapper layer of smu_allocate/free_memory"
authorChristian König <christian.koenig@amd.com>
Tue, 6 Mar 2018 13:56:00 +0000 (14:56 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 Mar 2018 21:10:11 +0000 (16:10 -0500)
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>
drivers/gpu/drm/amd/powerplay/smumgr/rv_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c

index cf9ef7add56b354f9ebb4e5e5f4944bbe9b85ea9..e2ee23ade5c555cf5741e00812e77fea9c561075 100644 (file)
@@ -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);
index b7be91e7235b3cc233ce640434fabbeabc2f2e74..15e1afa2801810471735bcf8068fc1be711d99bc 100644 (file)
@@ -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};