From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0BL8-0007W3-PE for qemu-devel@nongnu.org; Wed, 22 Feb 2012 07:30:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0BL3-0003JJ-Ua for qemu-devel@nongnu.org; Wed, 22 Feb 2012 07:30:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:18243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0BL3-0003JF-Gy for qemu-devel@nongnu.org; Wed, 22 Feb 2012 07:30:29 -0500 Date: Wed, 22 Feb 2012 13:30:20 +0100 From: Alon Levy Message-ID: <20120222123020.GD607@garlic.redhat.com> References: <1329860377-6284-1-git-send-email-alevy@redhat.com> <1329860377-6284-9-git-send-email-alevy@redhat.com> <4F44D44D.3090508@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F44D44D.3090508@redhat.com> Subject: Re: [Qemu-devel] [RFC v4 8/9] qxl: make qxl_render_update async List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: elmarco@redhat.com, yhalperi@redhat.com, qemu-devel@nongnu.org, spice-devel@freedesktop.org On Wed, Feb 22, 2012 at 12:41:01PM +0100, Gerd Hoffmann wrote: > Hi, > > > + qxl->render_update_redraw_area.left = 0; > > + qxl->render_update_redraw_area.right = > > + qxl->guest_primary.surface.width; > > + qxl->render_update_redraw_area.top = 0; > > + qxl->render_update_redraw_area.bottom = > > + qxl->guest_primary.surface.height; > > Are there cases where render_update_redraw_area != full screen? I don't think so. I'll drop the area after making sure. > > > + qemu_mutex_lock(&qxl->ssd.lock); > > + if (qxl->render_update_redraw) { > > + /* don't bother copying them over since we will ignore them */ > > + qxl->num_dirty_rects += num_updated_rects; > > + dprint(qxl, 1, "%s: scheduling update_area_bh, #dirty %d\n", > > + __func__, qxl->num_dirty_rects); > > + qemu_bh_schedule(qxl->update_area_bh); > > + qemu_mutex_unlock(&qxl->ssd.lock); > > + return; > > + } > > + if (qxl->num_dirty_rects + num_updated_rects > QXL_NUM_DIRTY_RECTS) { > > + /* > > + * overflow - merge all remaining rects. Hoping this is not > > + * common so doesn't need to be optimized > > + */ > > + } > > Another easy way out is to simply set qxl->render_update_redraw = 1. Yes, I agree, wasn't sure what is better. It would avoid a lot of code. I'll do it. > > cheers, > Gerd