aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-04-05 02:08:27 -0400
committerDave Airlie <airlied@redhat.com>2014-04-05 02:08:27 -0400
commit14c6d5bdf759274868c6a3534e56f1991118df63 (patch)
tree4a2a9843532a922a1eadc4d702414cc6f23cb366
parent8d51a977a4961d3ed6df699aea50bc2dd6bbc5cc (diff)
parentaa6de142c901cd2d90ef08db30ae87da214bedcc (diff)
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
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_context.c2
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.c6
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_fb.c5
3 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c
index 701d5207def6..8bb26dcd9eae 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_context.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_context.c
@@ -117,10 +117,10 @@ static void vmw_hw_context_destroy(struct vmw_resource *res)
117 (void) vmw_context_binding_state_kill 117 (void) vmw_context_binding_state_kill
118 (&container_of(res, struct vmw_user_context, res)->cbs); 118 (&container_of(res, struct vmw_user_context, res)->cbs);
119 (void) vmw_gb_context_destroy(res); 119 (void) vmw_gb_context_destroy(res);
120 mutex_unlock(&dev_priv->binding_mutex);
120 if (dev_priv->pinned_bo != NULL && 121 if (dev_priv->pinned_bo != NULL &&
121 !dev_priv->query_cid_valid) 122 !dev_priv->query_cid_valid)
122 __vmw_execbuf_release_pinned_bo(dev_priv, NULL); 123 __vmw_execbuf_release_pinned_bo(dev_priv, NULL);
123 mutex_unlock(&dev_priv->binding_mutex);
124 mutex_unlock(&dev_priv->cmdbuf_mutex); 124 mutex_unlock(&dev_priv->cmdbuf_mutex);
125 return; 125 return;
126 } 126 }
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index c7009581bb23..4a223bbea3b3 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -171,10 +171,10 @@ static const struct drm_ioctl_desc vmw_ioctls[] = {
171 VMW_IOCTL_DEF(VMW_EXECBUF, vmw_execbuf_ioctl, 171 VMW_IOCTL_DEF(VMW_EXECBUF, vmw_execbuf_ioctl,
172 DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW), 172 DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
173 VMW_IOCTL_DEF(VMW_FENCE_WAIT, vmw_fence_obj_wait_ioctl, 173 VMW_IOCTL_DEF(VMW_FENCE_WAIT, vmw_fence_obj_wait_ioctl,
174 DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW), 174 DRM_UNLOCKED | DRM_RENDER_ALLOW),
175 VMW_IOCTL_DEF(VMW_FENCE_SIGNALED, 175 VMW_IOCTL_DEF(VMW_FENCE_SIGNALED,
176 vmw_fence_obj_signaled_ioctl, 176 vmw_fence_obj_signaled_ioctl,
177 DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW), 177 DRM_UNLOCKED | DRM_RENDER_ALLOW),
178 VMW_IOCTL_DEF(VMW_FENCE_UNREF, vmw_fence_obj_unref_ioctl, 178 VMW_IOCTL_DEF(VMW_FENCE_UNREF, vmw_fence_obj_unref_ioctl,
179 DRM_UNLOCKED | DRM_RENDER_ALLOW), 179 DRM_UNLOCKED | DRM_RENDER_ALLOW),
180 VMW_IOCTL_DEF(VMW_FENCE_EVENT, vmw_fence_event_ioctl, 180 VMW_IOCTL_DEF(VMW_FENCE_EVENT, vmw_fence_event_ioctl,
@@ -205,7 +205,7 @@ static const struct drm_ioctl_desc vmw_ioctls[] = {
205 DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW), 205 DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW),
206 VMW_IOCTL_DEF(VMW_SYNCCPU, 206 VMW_IOCTL_DEF(VMW_SYNCCPU,
207 vmw_user_dmabuf_synccpu_ioctl, 207 vmw_user_dmabuf_synccpu_ioctl,
208 DRM_AUTH | DRM_UNLOCKED | DRM_RENDER_ALLOW), 208 DRM_UNLOCKED | DRM_RENDER_ALLOW),
209}; 209};
210 210
211static struct pci_device_id vmw_pci_id_list[] = { 211static struct pci_device_id vmw_pci_id_list[] = {
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
index 9699bd174ae4..a89ad938eacf 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
@@ -147,7 +147,7 @@ static int vmw_fb_check_var(struct fb_var_screeninfo *var,
147 } 147 }
148 148
149 if (!vmw_kms_validate_mode_vram(vmw_priv, 149 if (!vmw_kms_validate_mode_vram(vmw_priv,
150 info->fix.line_length, 150 var->xres * var->bits_per_pixel/8,
151 var->yoffset + var->yres)) { 151 var->yoffset + var->yres)) {
152 DRM_ERROR("Requested geom can not fit in framebuffer\n"); 152 DRM_ERROR("Requested geom can not fit in framebuffer\n");
153 return -EINVAL; 153 return -EINVAL;
@@ -162,6 +162,8 @@ static int vmw_fb_set_par(struct fb_info *info)
162 struct vmw_private *vmw_priv = par->vmw_priv; 162 struct vmw_private *vmw_priv = par->vmw_priv;
163 int ret; 163 int ret;
164 164
165 info->fix.line_length = info->var.xres * info->var.bits_per_pixel/8;
166
165 ret = vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres, 167 ret = vmw_kms_write_svga(vmw_priv, info->var.xres, info->var.yres,
166 info->fix.line_length, 168 info->fix.line_length,
167 par->bpp, par->depth); 169 par->bpp, par->depth);
@@ -177,6 +179,7 @@ static int vmw_fb_set_par(struct fb_info *info)
177 vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y, info->var.yoffset); 179 vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y, info->var.yoffset);
178 vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, info->var.xres); 180 vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, info->var.xres);
179 vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres); 181 vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres);
182 vmw_write(vmw_priv, SVGA_REG_BYTES_PER_LINE, info->fix.line_length);
180 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID); 183 vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID);
181 } 184 }
182 185