aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/vce_v4_0.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
index 433a741d0762..e5a6db6beab7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c
@@ -302,7 +302,7 @@ int amdgpu_uvd_sw_fini(struct amdgpu_device *adev)
302 for (j = 0; j < adev->uvd.num_uvd_inst; ++j) { 302 for (j = 0; j < adev->uvd.num_uvd_inst; ++j) {
303 if (adev->uvd.harvest_config & (1 << j)) 303 if (adev->uvd.harvest_config & (1 << j))
304 continue; 304 continue;
305 kfree(adev->uvd.inst[j].saved_bo); 305 kvfree(adev->uvd.inst[j].saved_bo);
306 306
307 amdgpu_bo_free_kernel(&adev->uvd.inst[j].vcpu_bo, 307 amdgpu_bo_free_kernel(&adev->uvd.inst[j].vcpu_bo,
308 &adev->uvd.inst[j].gpu_addr, 308 &adev->uvd.inst[j].gpu_addr,
@@ -368,7 +368,7 @@ int amdgpu_uvd_suspend(struct amdgpu_device *adev)
368 size = amdgpu_bo_size(adev->uvd.inst[j].vcpu_bo); 368 size = amdgpu_bo_size(adev->uvd.inst[j].vcpu_bo);
369 ptr = adev->uvd.inst[j].cpu_addr; 369 ptr = adev->uvd.inst[j].cpu_addr;
370 370
371 adev->uvd.inst[j].saved_bo = kmalloc(size, GFP_KERNEL); 371 adev->uvd.inst[j].saved_bo = kvmalloc(size, GFP_KERNEL);
372 if (!adev->uvd.inst[j].saved_bo) 372 if (!adev->uvd.inst[j].saved_bo)
373 return -ENOMEM; 373 return -ENOMEM;
374 374
@@ -394,7 +394,7 @@ int amdgpu_uvd_resume(struct amdgpu_device *adev)
394 394
395 if (adev->uvd.inst[i].saved_bo != NULL) { 395 if (adev->uvd.inst[i].saved_bo != NULL) {
396 memcpy_toio(ptr, adev->uvd.inst[i].saved_bo, size); 396 memcpy_toio(ptr, adev->uvd.inst[i].saved_bo, size);
397 kfree(adev->uvd.inst[i].saved_bo); 397 kvfree(adev->uvd.inst[i].saved_bo);
398 adev->uvd.inst[i].saved_bo = NULL; 398 adev->uvd.inst[i].saved_bo = NULL;
399 } else { 399 } else {
400 const struct common_firmware_header *hdr; 400 const struct common_firmware_header *hdr;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index 290d5583135b..fd654a4406db 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -130,7 +130,7 @@ int amdgpu_vcn_sw_fini(struct amdgpu_device *adev)
130{ 130{
131 int i; 131 int i;
132 132
133 kfree(adev->vcn.saved_bo); 133 kvfree(adev->vcn.saved_bo);
134 134
135 amdgpu_bo_free_kernel(&adev->vcn.vcpu_bo, 135 amdgpu_bo_free_kernel(&adev->vcn.vcpu_bo,
136 &adev->vcn.gpu_addr, 136 &adev->vcn.gpu_addr,
@@ -161,7 +161,7 @@ int amdgpu_vcn_suspend(struct amdgpu_device *adev)
161 size = amdgpu_bo_size(adev->vcn.vcpu_bo); 161 size = amdgpu_bo_size(adev->vcn.vcpu_bo);
162 ptr = adev->vcn.cpu_addr; 162 ptr = adev->vcn.cpu_addr;
163 163
164 adev->vcn.saved_bo = kmalloc(size, GFP_KERNEL); 164 adev->vcn.saved_bo = kvmalloc(size, GFP_KERNEL);
165 if (!adev->vcn.saved_bo) 165 if (!adev->vcn.saved_bo)
166 return -ENOMEM; 166 return -ENOMEM;
167 167
@@ -183,7 +183,7 @@ int amdgpu_vcn_resume(struct amdgpu_device *adev)
183 183
184 if (adev->vcn.saved_bo != NULL) { 184 if (adev->vcn.saved_bo != NULL) {
185 memcpy_toio(ptr, adev->vcn.saved_bo, size); 185 memcpy_toio(ptr, adev->vcn.saved_bo, size);
186 kfree(adev->vcn.saved_bo); 186 kvfree(adev->vcn.saved_bo);
187 adev->vcn.saved_bo = NULL; 187 adev->vcn.saved_bo = NULL;
188 } else { 188 } else {
189 const struct common_firmware_header *hdr; 189 const struct common_firmware_header *hdr;
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
index 6faeb17fc71c..2e4d1b5f6243 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
@@ -439,7 +439,7 @@ static int vce_v4_0_sw_init(void *handle)
439 const struct common_firmware_header *hdr; 439 const struct common_firmware_header *hdr;
440 unsigned size = amdgpu_bo_size(adev->vce.vcpu_bo); 440 unsigned size = amdgpu_bo_size(adev->vce.vcpu_bo);
441 441
442 adev->vce.saved_bo = kmalloc(size, GFP_KERNEL); 442 adev->vce.saved_bo = kvmalloc(size, GFP_KERNEL);
443 if (!adev->vce.saved_bo) 443 if (!adev->vce.saved_bo)
444 return -ENOMEM; 444 return -ENOMEM;
445 445
@@ -496,7 +496,7 @@ static int vce_v4_0_sw_fini(void *handle)
496 amdgpu_virt_free_mm_table(adev); 496 amdgpu_virt_free_mm_table(adev);
497 497
498 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) { 498 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
499 kfree(adev->vce.saved_bo); 499 kvfree(adev->vce.saved_bo);
500 adev->vce.saved_bo = NULL; 500 adev->vce.saved_bo = NULL;
501 } 501 }
502 502