From: Alon Levy <alevy@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, elmarco@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/2] qxl: introduce QXLCookie
Date: Fri, 17 Feb 2012 17:16:39 +0200 [thread overview]
Message-ID: <20120217151639.GM16163@garlic.redhat.com> (raw)
In-Reply-To: <4F3E520C.8030907@redhat.com>
On Fri, Feb 17, 2012 at 02:11:40PM +0100, Gerd Hoffmann wrote:
> On 02/17/12 09:44, Alon Levy wrote:
> > Will be used in the next patch.
> >
> > Signed-off-by: Alon Levy <alevy@redhat.com>
> > ---
> > hw/qxl-render.c | 2 +-
> > hw/qxl.c | 60 +++++++++++++++++++++++++++++++++++++--------------
> > hw/qxl.h | 2 +-
> > ui/spice-display.c | 26 ++++++++++++++++++++--
> > ui/spice-display.h | 12 ++++++++++
> > 5 files changed, 80 insertions(+), 22 deletions(-)
> >
> > diff --git a/hw/qxl-render.c b/hw/qxl-render.c
> > index 133d093..b238b96 100644
> > --- a/hw/qxl-render.c
> > +++ b/hw/qxl-render.c
> > @@ -133,7 +133,7 @@ void qxl_render_update(PCIQXLDevice *qxl)
> >
> > memset(dirty, 0, sizeof(dirty));
> > qxl_spice_update_area(qxl, 0, &update,
> > - dirty, ARRAY_SIZE(dirty), 1, QXL_SYNC);
> > + dirty, ARRAY_SIZE(dirty), 1, QXL_SYNC, NULL);
> > if (redraw) {
> > memset(dirty, 0, sizeof(dirty));
> > dirty[0] = update;
> > diff --git a/hw/qxl.c b/hw/qxl.c
> > index ac69125..02708e3 100644
> > --- a/hw/qxl.c
> > +++ b/hw/qxl.c
> > @@ -143,15 +143,20 @@ void qxl_spice_update_area(PCIQXLDevice *qxl, uint32_t surface_id,
> > struct QXLRect *area, struct QXLRect *dirty_rects,
> > uint32_t num_dirty_rects,
> > uint32_t clear_dirty_region,
> > - qxl_async_io async)
> > + qxl_async_io async, QXLCookie *cookie)
> > {
> > if (async == QXL_SYNC) {
> > qxl->ssd.worker->update_area(qxl->ssd.worker, surface_id, area,
> > dirty_rects, num_dirty_rects, clear_dirty_region);
> > } else {
> > #if SPICE_INTERFACE_QXL_MINOR >= 1
> > + if (cookie == NULL) {
> > + cookie = qxl_cookie_new(QXL_COOKIE_TYPE_IO,
> > + QXL_IO_UPDATE_AREA_ASYNC,
> > + 0);
> > + }
>
> Hmm, why that? If the callers want a cookie, then they should
> explicitly pass in what they want instead of expecting the function to
> magically do the correct thing. If the callers don't need a cookie,
> then use something like QXL_COOKIE_TYPE_UNUSED or simply pass on the
> NULL pointer.
I can move it to the users if it makes it a little less magic.
Note that I will be sending a revized version, since:
1) I forgot about my previous attempt (october 2010,
http://lists.gnu.org/archive/html/qemu-devel/2011-10/msg02758.html)
2) there are a few bugs with this approach, that I fixed correctly back
then: one is the async monitor command, which I will not send this time
since I don't want to get into the same argument.
3) the second is the dirty rectangles, for which I have to raise
SPICE_INTERFACE_QXL_MINOR.
>
> cheers,
> Gerd
>
next prev parent reply other threads:[~2012-02-17 15:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 23:11 [Qemu-devel] [PATCH 1/2] qxl: introduce QXLCookie Alon Levy
2012-02-16 23:11 ` [Qemu-devel] [PATCH 2/2] qxl: make qxl_render_update async Alon Levy
2012-02-17 8:39 ` [Qemu-devel] [PATCH 1/2] qxl: introduce QXLCookie Alon Levy
2012-02-17 8:44 ` [Qemu-devel] [PATCH v2 " Alon Levy
2012-02-17 8:45 ` [Qemu-devel] [PATCH v2 2/2] qxl: make qxl_render_update async Alon Levy
2012-02-17 12:49 ` [Qemu-devel] [PATCH v2 1/2] qxl: introduce QXLCookie Marc-André Lureau
2012-02-17 19:09 ` Alon Levy
2012-02-17 19:21 ` Alon Levy
2012-02-17 12:54 ` Marc-André Lureau
2012-02-17 13:11 ` Gerd Hoffmann
2012-02-17 15:16 ` Alon Levy [this message]
2012-02-17 13:20 ` Alon Levy
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=20120217151639.GM16163@garlic.redhat.com \
--to=alevy@redhat.com \
--cc=elmarco@redhat.com \
--cc=kraxel@redhat.com \
--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).