Commit 60906529 authored by Gerd Hoffmann's avatar Gerd Hoffmann Committed by Dave Airlie

drm/qxl: fix framebuffer dirty rectangle tracking.

Commit "c0fe07aa drm/qxl: rewrite framebuffer support" has a bug in the
dirty rectangle tracking:  Instead of ignoring an empty dirty rectangle
when adding a new dirty region the dirty region gets extended to the
upper left corner.  Fix it.

Cc: linux-stable@vger.kernel.org
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent f6702681
......@@ -144,6 +144,8 @@ static void qxl_dirty_update(struct qxl_fbdev *qfbdev,
spin_lock_irqsave(&qfbdev->dirty.lock, flags);
if ((qfbdev->dirty.y2 - qfbdev->dirty.y1) &&
(qfbdev->dirty.x2 - qfbdev->dirty.x1)) {
if (qfbdev->dirty.y1 < y)
y = qfbdev->dirty.y1;
if (qfbdev->dirty.y2 > y2)
......@@ -152,6 +154,7 @@ static void qxl_dirty_update(struct qxl_fbdev *qfbdev,
x = qfbdev->dirty.x1;
if (qfbdev->dirty.x2 > x2)
x2 = qfbdev->dirty.x2;
}
qfbdev->dirty.x1 = x;
qfbdev->dirty.x2 = x2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment