mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
drm/amdgpu: add to custom amdgpu_drm_release drm_dev_enter/exit
User queues are disabled before GEM objects are released (protecting against user app crashes). No races with PCI hot-unplug (because drm_dev_enter prevents cleanup if iewdevice is being removed). Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
1dd2fa0e00
commit
c31f486bc8
|
|
@ -2937,11 +2937,14 @@ static int amdgpu_drm_release(struct inode *inode, struct file *filp)
|
|||
{
|
||||
struct drm_file *file_priv = filp->private_data;
|
||||
struct amdgpu_fpriv *fpriv = file_priv->driver_priv;
|
||||
struct drm_device *dev = file_priv->minor->dev;
|
||||
int idx;
|
||||
|
||||
if (fpriv) {
|
||||
if (fpriv && drm_dev_enter(dev, &idx)) {
|
||||
fpriv->evf_mgr.fd_closing = true;
|
||||
amdgpu_eviction_fence_destroy(&fpriv->evf_mgr);
|
||||
amdgpu_userq_mgr_fini(&fpriv->userq_mgr);
|
||||
drm_dev_exit(idx);
|
||||
}
|
||||
|
||||
return drm_release(inode, filp);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user