* [Qemu-devel] qemu vl.c vl.h @ 2007-06-08 1:57 Thiemo Seufer 2007-06-11 20:27 ` [Qemu-devel] [BUG] [PATCH] " Stefan Weil 0 siblings, 1 reply; 4+ messages in thread From: Thiemo Seufer @ 2007-06-08 1:57 UTC (permalink / raw) To: qemu-devel CVSROOT: /sources/qemu Module name: qemu Changes by: Thiemo Seufer <ths> 07/06/08 01:57:57 Modified files: . : vl.c vl.h Log message: Don't refresh a graphical screen when it isn't displayed, by Herve Poussineau. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemu&r1=1.304&r2=1.305 http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemu&r1=1.249&r2=1.250 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [BUG] [PATCH] qemu vl.c vl.h 2007-06-08 1:57 [Qemu-devel] qemu vl.c vl.h Thiemo Seufer @ 2007-06-11 20:27 ` Stefan Weil 2007-06-11 20:47 ` Stefan Weil 0 siblings, 1 reply; 4+ messages in thread From: Stefan Weil @ 2007-06-11 20:27 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 721 bytes --] Removing dumb_display_init introduced a bug for -nographic mode. QEMU crashs when dpy_update (or dpy_resize) is called, because the corresponding function pointers are zero. The patch adds dumb_display_init again (and declares it static because it is only used locally in vl.c). Stefan Thiemo Seufer schrieb: > CVSROOT: /sources/qemu > Module name: qemu > Changes by: Thiemo Seufer <ths> 07/06/08 01:57:57 > > Modified files: > . : vl.c vl.h > > Log message: > Don't refresh a graphical screen when it isn't displayed, by Herve > Poussineau. > > CVSWeb URLs: > http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemu&r1=1.304&r2=1.305 > http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemu&r1=1.249&r2=1.250 [-- Attachment #2: vl.patch --] [-- Type: text/x-diff, Size: 914 bytes --] Index: vl.c =================================================================== RCS file: /sources/qemu/qemu/vl.c,v retrieving revision 1.306 diff -u -b -B -r1.306 vl.c --- vl.c 10 Jun 2007 19:21:04 -0000 1.306 +++ vl.c 11 Jun 2007 20:20:41 -0000 @@ -4481,6 +4481,16 @@ "Empty"); } +static void dumb_display_init(DisplayState *ds) +{ + ds->data = NULL; + ds->linesize = 0; + ds->depth = 0; + ds->dpy_update = dumb_update; + ds->dpy_resize = dumb_resize; + ds->dpy_refresh = dumb_refresh; +} + /***********************************************************/ /* I/O handling */ @@ -4804,7 +4814,8 @@ int64_t qemu_fseek(QEMUFile *f, int64_t pos, int whence) { if (whence == SEEK_SET) { - /* nothing to do */ + /* nearly nothing to do */ + dumb_display_init(ds); } else if (whence == SEEK_CUR) { pos += qemu_ftell(f); } else { ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [BUG] [PATCH] qemu vl.c vl.h 2007-06-11 20:27 ` [Qemu-devel] [BUG] [PATCH] " Stefan Weil @ 2007-06-11 20:47 ` Stefan Weil 2007-06-11 21:04 ` Stefan Weil 0 siblings, 1 reply; 4+ messages in thread From: Stefan Weil @ 2007-06-11 20:47 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 882 bytes --] I'm sorry for sending a wrong patch. Here is a corrected version. Thank you, Thiemo, for your hint. Stefan Stefan Weil schrieb: > Removing dumb_display_init introduced a bug for -nographic mode. > QEMU crashs when dpy_update (or dpy_resize) is called, because > the corresponding function pointers are zero. > > The patch adds dumb_display_init again (and declares it static > because it is only used locally in vl.c). > > Stefan > > > Thiemo Seufer schrieb: >> CVSROOT: /sources/qemu >> Module name: qemu >> Changes by: Thiemo Seufer <ths> 07/06/08 01:57:57 >> >> Modified files: >> . : vl.c vl.h >> >> Log message: >> Don't refresh a graphical screen when it isn't displayed, by Herve >> Poussineau. >> >> CVSWeb URLs: >> http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemu&r1=1.304&r2=1.305 >> http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemu&r1=1.249&r2=1.25 [-- Attachment #2: vl.patch --] [-- Type: text/x-diff, Size: 938 bytes --] Index: vl.c =================================================================== RCS file: /sources/qemu/qemu/vl.c,v retrieving revision 1.306 diff -u -b -B -r1.306 vl.c --- vl.c 10 Jun 2007 19:21:04 -0000 1.306 +++ vl.c 11 Jun 2007 20:43:35 -0000 @@ -4481,6 +4481,16 @@ "Empty"); } +static void dumb_display_init(DisplayState *ds) +{ + ds->data = NULL; + ds->linesize = 0; + ds->depth = 0; + ds->dpy_update = dumb_update; + ds->dpy_resize = dumb_resize; + ds->dpy_refresh = dumb_refresh; +} + /***********************************************************/ /* I/O handling */ @@ -7877,7 +7887,8 @@ /* terminal init */ memset(&display_state, 0, sizeof(display_state)); if (nographic) { - /* nothing to do */ + /* nearly nothing to do */ + dumb_display_init(ds); } else if (vnc_display != NULL) { vnc_display_init(ds, vnc_display); } else { ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [BUG] [PATCH] qemu vl.c vl.h 2007-06-11 20:47 ` Stefan Weil @ 2007-06-11 21:04 ` Stefan Weil 0 siblings, 0 replies; 4+ messages in thread From: Stefan Weil @ 2007-06-11 21:04 UTC (permalink / raw) To: QEMU Developers [-- Attachment #1: Type: text/plain, Size: 997 bytes --] One more correction - I hope this is the last one. Stefan Stefan Weil schrieb: > I'm sorry for sending a wrong patch. Here is a corrected version. > Thank you, Thiemo, for your hint. > > Stefan > > Stefan Weil schrieb: >> Removing dumb_display_init introduced a bug for -nographic mode. >> QEMU crashs when dpy_update (or dpy_resize) is called, because >> the corresponding function pointers are zero. >> >> The patch adds dumb_display_init again (and declares it static >> because it is only used locally in vl.c). >> >> Stefan >> >> >> Thiemo Seufer schrieb: >>> CVSROOT: /sources/qemu >>> Module name: qemu >>> Changes by: Thiemo Seufer <ths> 07/06/08 01:57:57 >>> >>> Modified files: >>> . : vl.c vl.h >>> >>> Log message: >>> Don't refresh a graphical screen when it isn't displayed, by Herve >>> Poussineau. >>> >>> CVSWeb URLs: >>> http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemu&r1=1.304&r2=1.305 >>> http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemu&r1=1.249&r2=1.2 [-- Attachment #2: vl.patch --] [-- Type: text/x-diff, Size: 1271 bytes --] Index: vl.c =================================================================== RCS file: /sources/qemu/qemu/vl.c,v retrieving revision 1.306 diff -u -b -B -r1.306 vl.c --- vl.c 10 Jun 2007 19:21:04 -0000 1.306 +++ vl.c 11 Jun 2007 21:03:29 -0000 @@ -4482,6 +4482,34 @@ } /***********************************************************/ +/* dumb display */ + +static void dumb_update(DisplayState *ds, int x, int y, int w, int h) +{ +} + +static void dumb_resize(DisplayState *ds, int w, int h) +{ +} + +static void dumb_refresh(DisplayState *ds) +{ +#if defined(CONFIG_SDL) + vga_hw_update(); +#endif +} + +static void dumb_display_init(DisplayState *ds) +{ + ds->data = NULL; + ds->linesize = 0; + ds->depth = 0; + ds->dpy_update = dumb_update; + ds->dpy_resize = dumb_resize; + ds->dpy_refresh = dumb_refresh; +} + +/***********************************************************/ /* I/O handling */ #define MAX_IO_HANDLERS 64 @@ -7877,7 +7905,8 @@ /* terminal init */ memset(&display_state, 0, sizeof(display_state)); if (nographic) { - /* nothing to do */ + /* nearly nothing to do */ + dumb_display_init(ds); } else if (vnc_display != NULL) { vnc_display_init(ds, vnc_display); } else { ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-06-11 21:04 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-06-08 1:57 [Qemu-devel] qemu vl.c vl.h Thiemo Seufer 2007-06-11 20:27 ` [Qemu-devel] [BUG] [PATCH] " Stefan Weil 2007-06-11 20:47 ` Stefan Weil 2007-06-11 21:04 ` Stefan Weil
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).