diff options
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_kms.c')
| -rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 03daefa73397..880e285d7578 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |||
| @@ -105,6 +105,10 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv, | |||
| 105 | struct vmw_dma_buffer *dmabuf = NULL; | 105 | struct vmw_dma_buffer *dmabuf = NULL; |
| 106 | int ret; | 106 | int ret; |
| 107 | 107 | ||
| 108 | /* A lot of the code assumes this */ | ||
| 109 | if (handle && (width != 64 || height != 64)) | ||
| 110 | return -EINVAL; | ||
| 111 | |||
| 108 | if (handle) { | 112 | if (handle) { |
| 109 | ret = vmw_user_surface_lookup_handle(dev_priv, tfile, | 113 | ret = vmw_user_surface_lookup_handle(dev_priv, tfile, |
| 110 | handle, &surface); | 114 | handle, &surface); |
| @@ -410,8 +414,9 @@ static int do_surface_dirty_sou(struct vmw_private *dev_priv, | |||
| 410 | top = clips->y1; | 414 | top = clips->y1; |
| 411 | bottom = clips->y2; | 415 | bottom = clips->y2; |
| 412 | 416 | ||
| 413 | clips_ptr = clips; | 417 | /* skip the first clip rect */ |
| 414 | for (i = 1; i < num_clips; i++, clips_ptr += inc) { | 418 | for (i = 1, clips_ptr = clips + inc; |
| 419 | i < num_clips; i++, clips_ptr += inc) { | ||
| 415 | left = min_t(int, left, (int)clips_ptr->x1); | 420 | left = min_t(int, left, (int)clips_ptr->x1); |
| 416 | right = max_t(int, right, (int)clips_ptr->x2); | 421 | right = max_t(int, right, (int)clips_ptr->x2); |
| 417 | top = min_t(int, top, (int)clips_ptr->y1); | 422 | top = min_t(int, top, (int)clips_ptr->y1); |
| @@ -1323,7 +1328,10 @@ int vmw_kms_close(struct vmw_private *dev_priv) | |||
| 1323 | * drm_encoder_cleanup which takes the lock we deadlock. | 1328 | * drm_encoder_cleanup which takes the lock we deadlock. |
| 1324 | */ | 1329 | */ |
| 1325 | drm_mode_config_cleanup(dev_priv->dev); | 1330 | drm_mode_config_cleanup(dev_priv->dev); |
| 1326 | vmw_kms_close_legacy_display_system(dev_priv); | 1331 | if (dev_priv->sou_priv) |
| 1332 | vmw_kms_close_screen_object_display(dev_priv); | ||
| 1333 | else | ||
| 1334 | vmw_kms_close_legacy_display_system(dev_priv); | ||
| 1327 | return 0; | 1335 | return 0; |
| 1328 | } | 1336 | } |
| 1329 | 1337 | ||
