Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: add amdgpu_irq_gpu_reset_resume_helper

irq need to update when gpu reset happens.

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Chunming Zhou and committed by
Alex Deucher
0eaeb070 505bc983

+14
+1
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 1973 1973 /* bad news, how to tell it to userspace ? */ 1974 1974 dev_info(adev->dev, "GPU reset failed\n"); 1975 1975 } 1976 + amdgpu_irq_gpu_reset_resume_helper(adev); 1976 1977 1977 1978 return r; 1978 1979 }
+12
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
··· 383 383 return r; 384 384 } 385 385 386 + void amdgpu_irq_gpu_reset_resume_helper(struct amdgpu_device *adev) 387 + { 388 + int i, j; 389 + for (i = 0; i < AMDGPU_MAX_IRQ_SRC_ID; i++) { 390 + struct amdgpu_irq_src *src = adev->irq.sources[i]; 391 + if (!src) 392 + continue; 393 + for (j = 0; j < src->num_types; j++) 394 + amdgpu_irq_update(adev, src, j); 395 + } 396 + } 397 + 386 398 /** 387 399 * amdgpu_irq_get - enable interrupt 388 400 *
+1
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.h
··· 94 94 unsigned type); 95 95 bool amdgpu_irq_enabled(struct amdgpu_device *adev, struct amdgpu_irq_src *src, 96 96 unsigned type); 97 + void amdgpu_irq_gpu_reset_resume_helper(struct amdgpu_device *adev); 97 98 98 99 int amdgpu_irq_add_domain(struct amdgpu_device *adev); 99 100 void amdgpu_irq_remove_domain(struct amdgpu_device *adev);