aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2011-11-09 04:25:27 -0500
committerDave Airlie <airlied@redhat.com>2011-11-11 05:57:59 -0500
commitf0c8a6524dca1d37ab7b0247aa7681e490af1ee4 (patch)
tree8e4801a4ccfa110b5bc7449dd369f3e6206483cf
parentc0d18316ae99e1f19738f9cb5e0a2a9dc57dd8cd (diff)
vmwgfx: Initialize clip rect loop correctly in surface dirty
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_kms.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index f3ab1fee60e1..40c7e617e28b 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -410,8 +410,9 @@ static int do_surface_dirty_sou(struct vmw_private *dev_priv,
410 top = clips->y1; 410 top = clips->y1;
411 bottom = clips->y2; 411 bottom = clips->y2;
412 412
413 clips_ptr = clips; 413 /* skip the first clip rect */
414 for (i = 1; i < num_clips; i++, clips_ptr += inc) { 414 for (i = 1, clips_ptr = clips + inc;
415 i < num_clips; i++, clips_ptr += inc) {
415 left = min_t(int, left, (int)clips_ptr->x1); 416 left = min_t(int, left, (int)clips_ptr->x1);
416 right = max_t(int, right, (int)clips_ptr->x2); 417 right = max_t(int, right, (int)clips_ptr->x2);
417 top = min_t(int, top, (int)clips_ptr->y1); 418 top = min_t(int, top, (int)clips_ptr->y1);