Merge tag 'vmwgfx-next-2014-04-04' of git://people.freedesktop.org/~thomash/linux into drm-next

Pull request of 2014-04-04

The second vmwgfx pull request for the 3.15 merge window.
Contains a fbdev fix by Christopher Friedt, one fix for a locking order
violation introduced in 3.14 (hit when using queries) and finally a
removal of the DRM_AUTH requirement around some vmwgfx IOCTLS where the
caller is already required to have an open handle to the object.

* tag 'vmwgfx-next-2014-04-04' of git://people.freedesktop.org/~thomash/linux:
  drm/vmwgfx: correct fb_fix_screeninfo.line_length
  drm/vmwgfx: Remove authorization requirements around some more ioctls
  drm/vmwgfx: Fix query buffer locking order violation
This commit is contained in:
Dave Airlie 2014-04-05 16:08:27 +10:00
commit 14c6d5bdf7
3 changed files with 8 additions and 5 deletions

View File

@ -117,10 +117,10 @@ static void vmw_hw_context_destroy(struct vmw_resource *res)
(void) vmw_context_binding_state_kill (void) vmw_context_binding_state_kill
(&container_of(res, struct vmw_user_context, res)->cbs); (&container_of(res, struct vmw_user_context, res)->cbs);
(void) vmw_gb_context_destroy(res); (void) vmw_gb_context_destroy(res);
mutex_unlock(&dev_priv->binding_mutex);
if (dev_priv->pinned_bo != NULL && if (dev_priv->pinned_bo != NULL &&
!dev_priv->query_cid_valid) !dev_priv->query_cid_valid)
__vmw_execbuf_release_pinned_bo(dev_priv, NULL); __vmw_execbuf_release_pinned_bo(dev_priv, NULL);
mutex_unlock(&dev_priv->binding_mutex);
mutex_unlock(&dev_priv->cmdbuf_mutex); mutex_unlock(&dev_priv->cmdbuf_mutex);
return; return;
} }

View File

@ -171,10 +171,10 @@ static const struct drm_ioctl_desc vmw_ioctls[] = {
VMW_IOCTL_DEF(VMW_EXECBUF, vmw_execbuf_ioctl, VMW_IOCTL_DEF(VMW_EXECBUF, vmw_execbuf_ioctl,
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW), DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
VMW_IOCTL_DEF(VMW_FENCE_WAIT, vmw_fence_obj_wait_ioctl, VMW_IOCTL_DEF(VMW_FENCE_WAIT, vmw_fence_obj_wait_ioctl,
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW), DRM_UNLOCKED | DRM_RENDER_ALLOW),
VMW_IOCTL_DEF(VMW_FENCE_SIGNALED, VMW_IOCTL_DEF(VMW_FENCE_SIGNALED,
vmw_fence_obj_signaled_ioctl, vmw_fence_obj_signaled_ioctl,
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW), DRM_UNLOCKED | DRM_RENDER_ALLOW),
VMW_IOCTL_DEF(VMW_FENCE_UNREF, vmw_fence_obj_unref_ioctl, VMW_IOCTL_DEF(VMW_FENCE_UNREF, vmw_fence_obj_unref_ioctl,
DRM_UNLOCKED | DRM_RENDER_ALLOW), DRM_UNLOCKED | DRM_RENDER_ALLOW),
VMW_IOCTL_DEF(VMW_FENCE_EVENT, vmw_fence_event_ioctl, VMW_IOCTL_DEF(VMW_FENCE_EVENT, vmw_fence_event_ioctl,
@ -205,7 +205,7 @@ static const struct drm_ioctl_desc vmw_ioctls[] = {
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW), DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
VMW_IOCTL_DEF(VMW_SYNCCPU, VMW_IOCTL_DEF(VMW_SYNCCPU,
vmw_user_dmabuf_synccpu_ioctl, vmw_user_dmabuf_synccpu_ioctl,
DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW), DRM_UNLOCKED | DRM_RENDER_ALLOW),
}; };
static struct pci_device_id vmw_pci_id_list[] = { static struct pci_device_id vmw_pci_id_list[] = {

View File

@ -147,7 +147,7 @@ static int vmw_fb_check_var(struct fb_var_screeninfo *var,
} }
if (!vmw_kms_validate_mode_vram(vmw_priv, if (!vmw_kms_validate_mode_vram(vmw_priv,
info->fix.line_length, var->xres * var->bits_per_pixel/8,
var->yoffset + var->yres)) { var->yoffset + var->yres)) {
DRM_ERROR("Requested geom can not fit in framebuffer\n"); DRM_ERROR("Requested geom can not fit in framebuffer\n");
return -EINVAL; return -EINVAL;
@ -162,6 +162,8 @@ static int vmw_fb_set_par(struct fb_info *info)
struct vmw_private *vmw_priv = par->vmw_priv; struct vmw_private *vmw_priv = par->vmw_priv;
int ret; int ret;
info->fix.line_length = info->var.xres * info->var.bits_per_pixel/8;
ret = vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres, ret = vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres,
info->fix.line_length, info->fix.line_length,
par->bpp, par->depth); par->bpp, par->depth);
@ -177,6 +179,7 @@ static int vmw_fb_set_par(struct fb_info *info)
vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y, info->var.yoffset); vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y, info->var.yoffset);
vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, info->var.xres); vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, info->var.xres);
vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres); vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres);
vmw_write(vmw_priv, SVGA_REG_BYTES_PER_LINE, info->fix.line_length);
vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID); vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
} }