qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [RFC][PATCH] Add HPET emulation to qemu (v2)
Date: Sun, 10 Aug 2008 17:52:14 +0100	[thread overview]
Message-ID: <20080810165214.GC528@shareable.org> (raw)
In-Reply-To: <20080810110137.GB4569@implementation>

Samuel Thibault wrote:
> Jamie Lokier, le Sun 10 Aug 2008 02:19:01 +0100, a écrit :
> > Samuel Thibault wrote:
> > > Beth Kon wrote some time ago:
> > > > But for an idle guest in both cases (with and without HPET), the
> > > > number of wakeups per second was relatively low (28).
> > > 
> > > Oh, btw, did you try to reduce the qemu window? (or disconnect the VNC
> > > client if you are using VNC)  28 might be just because of the gui refresh
> > > rate.  Reducing the window will lower the gui refresh rate to 2Hz.
> > 
> > If the guest isn't drawing anything to video memory, and there are no
> > GUI events (e.g. redraw requests), why does the gui keep refreshing?
> 
> It needs to poll the keyboard activity at least, IIRC SDL doesn't
> provide the X FD to poll.

Apparently it does.

See http://listas.apesol.org/pipermail/sdl-libsdl.org/2008-May/065133.html
which says:

    > 2. add a new API call to SDL to access the low-level descriptor to
    >   talk directly with the graphic server (X11 or other).  This is
    >   powerful in that it opens the way to all sort of manipulations
    >   of the graphic server, however it requires backend-specific
    >   code in the SDL application to do what one needs;

    SDL_GetWMInfo() can get you the Xlib Display* (have a look at what
    else is there). Make sure to read the documentation about the
    SDL_VERSION() bit, it's quite important!

    You'll probably then have to enable SDL_SysWMEvent and handle them to
    get at the X11 events, if I understand this correctly (I haven't done
    the specific thing you want, I get the Display* and hack other
    things).

The followup message says "thanks, that worked".

It should work in Windows, too, except you'll get a Windows HANDLE
which you wait on in a different way than unix.

-- Jamie

      reply	other threads:[~2008-08-10 16:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 17:17 [Qemu-devel] Re: [RFC][PATCH] Add HPET emulation to qemu (v2) Samuel Thibault
2008-08-07 17:26 ` Samuel Thibault
2008-08-07 18:47 ` Anthony Liguori
2008-08-10  1:19 ` Jamie Lokier
2008-08-10 11:01   ` Samuel Thibault
2008-08-10 16:52     ` Jamie Lokier [this message]

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=20080810165214.GC528@shareable.org \
    --to=jamie@shareable.org \
    --cc=qemu-devel@nongnu.org \
    /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 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).