From: Gerd Hoffmann <kraxel@redhat.com>
To: Alon Levy <alevy@redhat.com>
Cc: qemu-devel@nongnu.org, elmarco@redhat.com
Subject: Re: [Qemu-devel] [RFC 4/7] qxl: make qxl_render_update async
Date: Mon, 20 Feb 2012 12:10:38 +0100 [thread overview]
Message-ID: <4F422A2E.3020106@redhat.com> (raw)
In-Reply-To: <1329686886-6853-5-git-send-email-alevy@redhat.com>
Hi,
> +void qxl_render_update_area_done(PCIQXLDevice *qxl, QXLCookie *cookie)
> +{
This is called from spice server thread context, correct?
> - for (i = 0; i < ARRAY_SIZE(dirty); i++) {
> + for (i = 0; i < ARRAY_SIZE(data->dirty); i++) {
> if (qemu_spice_rect_is_empty(dirty+i)) {
> break;
> }
> @@ -151,6 +171,7 @@ void qxl_render_update(PCIQXLDevice *qxl)
dpy_update() call here. Calling that one isn't safe without grabbing
the qemu lock.
> dirty[i].right - dirty[i].left,
> dirty[i].bottom - dirty[i].top);
> }
> @@ -145,15 +145,19 @@ void qxl_spice_update_area(PCIQXLDevice *qxl, uint32_t surface_id,
> uint32_t clear_dirty_region,
> qxl_async_io async, QXLCookie *cookie)
> {
> + struct QXLRect *area_copy;
> 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) {
> + area_copy = g_malloc0(sizeof(*area_copy));
> + memcpy(area_copy, area, sizeof(*area));
> + area = area_copy;
> cookie = qxl_cookie_new(QXL_COOKIE_TYPE_IO,
> QXL_IO_UPDATE_AREA_ASYNC,
> - 0);
> + (uint64_t)area_copy);
I still think this is the wrong place.
Also: How about making removing QXLCookie->data and adding a union
instead? It's not like we have to transparently pass through a pointer
for someone else, it's our own state data, so this extra indirection
doesn't make sense at all.
cheers,
Gerd
next prev parent reply other threads:[~2012-02-20 11:11 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-19 21:27 [Qemu-devel] [RFC 0/7] qxl: fix hangs caused by qxl_render_update Alon Levy
2012-02-19 21:28 ` [Qemu-devel] [RFC 1/7] sdl: remove NULL check, g_malloc0 can't fail Alon Levy
2012-02-19 21:28 ` [Qemu-devel] [RFC 2/7] qxl: drop qxl_spice_update_area_async definition Alon Levy
2012-02-19 21:28 ` [Qemu-devel] [RFC 3/7] qxl: introduce QXLCookie Alon Levy
2012-02-20 10:56 ` Gerd Hoffmann
2012-02-20 12:31 ` Alon Levy
2012-02-20 12:39 ` Gerd Hoffmann
2012-02-19 21:28 ` [Qemu-devel] [RFC 4/7] qxl: make qxl_render_update async Alon Levy
2012-02-20 11:10 ` Gerd Hoffmann [this message]
2012-02-20 12:32 ` Alon Levy
2012-02-20 12:45 ` Gerd Hoffmann
2012-02-19 21:28 ` [Qemu-devel] [RFC 5/7] qxl-render: call ppm_save on callback Alon Levy
2012-02-20 11:32 ` Gerd Hoffmann
2012-02-20 12:36 ` Alon Levy
2012-02-20 12:49 ` Gerd Hoffmann
2012-02-20 21:29 ` Eric Blake
2012-02-21 8:19 ` Alon Levy
2012-02-21 16:15 ` Eric Blake
2012-02-21 17:40 ` Alon Levy
2012-02-22 13:17 ` Luiz Capitulino
2012-02-22 13:22 ` Alon Levy
2012-02-22 13:49 ` Luiz Capitulino
2012-02-22 14:22 ` Gerd Hoffmann
2012-02-22 14:29 ` Alon Levy
2012-02-22 15:55 ` Luiz Capitulino
2012-02-22 16:35 ` Alon Levy
2012-02-22 19:27 ` Luiz Capitulino
2012-02-22 14:28 ` Alon Levy
2012-02-22 14:47 ` Gerd Hoffmann
2012-02-22 15:26 ` Alon Levy
2012-02-19 21:28 ` [Qemu-devel] [RFC 6/7] qxl: use spice_qxl_update_area_dirty_async Alon Levy
2012-02-19 21:28 ` [Qemu-devel] [RFC 7/7] qxl: add allocator Alon Levy
2012-02-20 11:41 ` Gerd Hoffmann
2012-02-20 12:38 ` Alon Levy
2012-02-20 13:18 ` Gerd Hoffmann
2012-02-20 17:36 ` Alon Levy
2012-02-21 7:57 ` Gerd Hoffmann
2012-02-21 8:26 ` Alon Levy
2012-02-21 9:20 ` Gerd Hoffmann
2012-02-21 9:59 ` 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=4F422A2E.3020106@redhat.com \
--to=kraxel@redhat.com \
--cc=alevy@redhat.com \
--cc=elmarco@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).