Skip to contentSkip to conversation

vmwgfx fixes

PATCH New Thomas Hellstrom 1 participant 4 messages Nov 9, 2011

Subsystems (3)
lore
Share & tools
lore
#1 lore raw

PATCH 1/3 vmwgfx: Close screen object system

From: Jakob Bornecrantz <[email protected]>

---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +4 -1
index 03daefa..f3ab1fe 100644
@@ -1323,7 +1323,10 @@ int vmw_kms_close(struct vmw_private *dev_priv)
 	 * drm_encoder_cleanup which takes the lock we deadlock.
 	 */
 	drm_mode_config_cleanup(dev_priv->dev);
-	vmw_kms_close_legacy_display_system(dev_priv);
+	if (dev_priv->sou_priv)
+		vmw_kms_close_screen_object_display(dev_priv);
+	else
+		vmw_kms_close_legacy_display_system(dev_priv);
 	return 0;
 }
 
Signature · 1 line
1.7.4.4
#2 lore raw

PATCH 2/3 vmwgfx: Initialize clip rect loop correctly in surface dirty

In reply to Thomas Hellstrom

From: Jakob Bornecrantz <[email protected]>

---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +3 -2
index f3ab1fe..40c7e61 100644
@@ -410,8 +410,9 @@ static int do_surface_dirty_sou(struct vmw_private *dev_priv,
 	top = clips->y1;
 	bottom = clips->y2;
 
-	clips_ptr = clips;
-	for (i = 1; i < num_clips; i++, clips_ptr += inc) {
+	/* skip the first clip rect */
+	for (i = 1, clips_ptr = clips + inc;
+	     i < num_clips; i++, clips_ptr += inc) {
 		left = min_t(int, left, (int)clips_ptr->x1);
 		right = max_t(int, right, (int)clips_ptr->x2);
 		top = min_t(int, top, (int)clips_ptr->y1);
Signature · 1 line
1.7.4.4
#3 lore raw

PATCH 3/3 vmwgfx: Only allow 64x64 cursors

In reply to Thomas Hellstrom

From: Jakob Bornecrantz <[email protected]>

Snooping code expects this to be the case.

---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +4 -0
index 40c7e61..880e285 100644
@@ -105,6 +105,10 @@ int vmw_du_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
 	struct vmw_dma_buffer *dmabuf = NULL;
 	int ret;
 
+	/* A lot of the code assumes this */
+	if (handle && (width != 64 || height != 64))
+		return -EINVAL;
+
 	if (handle) {
 		ret = vmw_user_surface_lookup_handle(dev_priv, tfile,
 						     handle, &surface);
Signature · 1 line
1.7.4.4