From: Markus Armbruster <armbru@redhat.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH 1/2][PVFB][TOOLS] PVFB frontend can send bogus screen updates
Date: Tue, 13 Nov 2007 17:44:07 +0100 [thread overview]
Message-ID: <87wssmqenc.fsf@pike.pond.sub.org> (raw)
In-Reply-To: <871waurt8t.fsf@pike.pond.sub.org> (Markus Armbruster's message of "Tue\, 13 Nov 2007 17\:43\:30 +0100")
The PVFB frontend can get confused and send a screen update to the
backend when the screen is actually clean. Such an update asks for
the impossible rectangle (x1, x2, y1, y2) = (INT_MAX, 0, INT_MAX, 0).
Fix by setting the dirty flag in the obvious place: when the dirty
rectangle is grown.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
diff -r cf8b6cafa2f0 drivers/xen/fbfront/xenfb.c
--- a/drivers/xen/fbfront/xenfb.c Thu Nov 08 18:26:08 2007 +0000
+++ b/drivers/xen/fbfront/xenfb.c Tue Nov 13 17:32:48 2007 +0100
@@ -201,6 +201,11 @@ static void xenfb_update_screen(struct x
mutex_unlock(&info->mm_lock);
+ if (x2 < x1 || y2 < y1) {
+ printk("xenfb_update_screen bogus rect %d %d %d %d\n",
+ x1, x2, y1, y2);
+ WARN_ON(1);
+ }
xenfb_do_update(info, x1, y1, x2 - x1, y2 - y1);
}
@@ -252,7 +257,6 @@ static void xenfb_timer(unsigned long da
static void xenfb_timer(unsigned long data)
{
struct xenfb_info *info = (struct xenfb_info *)data;
- info->dirty = 1;
wake_up(&info->wq);
}
@@ -272,6 +276,7 @@ static void __xenfb_refresh(struct xenfb
info->x1 = x1;
if (info->x2 < x2)
info->x2 = x2;
+ info->dirty = 1;
if (timer_pending(&info->refresh))
return;
next prev parent reply other threads:[~2007-11-13 16:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-13 16:43 [PATCH 0/2][PVFB][TOOLS] Bogus screen updates Markus Armbruster
2007-11-13 16:44 ` Markus Armbruster [this message]
2007-11-13 16:44 ` [PATCH 2/2][PVFB][TOOLS] PVFB SDL backend chokes on bogus " Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wssmqenc.fsf@pike.pond.sub.org \
--to=armbru@redhat.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.