mirror of
https://github.com/torvalds/linux
synced 2024-10-23 03:37:40 +00:00
Merge tag 'vmwgfx-next-15-09-01' of git://people.freedesktop.org/~thomash/linux into drm-next
Pull request of 2015-09-01 A single commit. Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1227193 * tag 'vmwgfx-next-15-09-01' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Allow dropped masters render-node like access on legacy nodes v2
This commit is contained in:
commit
41e8a0a304
|
@ -1052,10 +1052,15 @@ static struct vmw_master *vmw_master_check(struct drm_device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if we were previously master, but now dropped.
|
* Check if we were previously master, but now dropped. In that
|
||||||
|
* case, allow at least render node functionality.
|
||||||
*/
|
*/
|
||||||
if (vmw_fp->locked_master) {
|
if (vmw_fp->locked_master) {
|
||||||
mutex_unlock(&dev->master_mutex);
|
mutex_unlock(&dev->master_mutex);
|
||||||
|
|
||||||
|
if (flags & DRM_RENDER_ALLOW)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
DRM_ERROR("Dropped master trying to access ioctl that "
|
DRM_ERROR("Dropped master trying to access ioctl that "
|
||||||
"requires authentication.\n");
|
"requires authentication.\n");
|
||||||
return ERR_PTR(-EACCES);
|
return ERR_PTR(-EACCES);
|
||||||
|
|
|
@ -911,6 +911,12 @@ vmw_surface_handle_reference(struct vmw_private *dev_priv,
|
||||||
"surface reference.\n");
|
"surface reference.\n");
|
||||||
return -EACCES;
|
return -EACCES;
|
||||||
}
|
}
|
||||||
|
if (ACCESS_ONCE(vmw_fpriv(file_priv)->locked_master)) {
|
||||||
|
DRM_ERROR("Locked master refused legacy "
|
||||||
|
"surface reference.\n");
|
||||||
|
return -EACCES;
|
||||||
|
}
|
||||||
|
|
||||||
handle = u_handle;
|
handle = u_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue