drm/qxl: fix framebuffer dirty rectangle tracking.
Commit "c0fe07a 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: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
f6702681a0
commit
60906529be
|
@ -144,14 +144,17 @@ static void qxl_dirty_update(struct qxl_fbdev *qfbdev,
|
||||||
|
|
||||||
spin_lock_irqsave(&qfbdev->dirty.lock, flags);
|
spin_lock_irqsave(&qfbdev->dirty.lock, flags);
|
||||||
|
|
||||||
if (qfbdev->dirty.y1 < y)
|
if ((qfbdev->dirty.y2 - qfbdev->dirty.y1) &&
|
||||||
y = qfbdev->dirty.y1;
|
(qfbdev->dirty.x2 - qfbdev->dirty.x1)) {
|
||||||
if (qfbdev->dirty.y2 > y2)
|
if (qfbdev->dirty.y1 < y)
|
||||||
y2 = qfbdev->dirty.y2;
|
y = qfbdev->dirty.y1;
|
||||||
if (qfbdev->dirty.x1 < x)
|
if (qfbdev->dirty.y2 > y2)
|
||||||
x = qfbdev->dirty.x1;
|
y2 = qfbdev->dirty.y2;
|
||||||
if (qfbdev->dirty.x2 > x2)
|
if (qfbdev->dirty.x1 < x)
|
||||||
x2 = qfbdev->dirty.x2;
|
x = qfbdev->dirty.x1;
|
||||||
|
if (qfbdev->dirty.x2 > x2)
|
||||||
|
x2 = qfbdev->dirty.x2;
|
||||||
|
}
|
||||||
|
|
||||||
qfbdev->dirty.x1 = x;
|
qfbdev->dirty.x1 = x;
|
||||||
qfbdev->dirty.x2 = x2;
|
qfbdev->dirty.x2 = x2;
|
||||||
|
|
Loading…
Reference in New Issue