From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmgVw-0001Zd-4W for qemu-devel@nongnu.org; Wed, 12 Jun 2013 04:34:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmgVu-00087B-C7 for qemu-devel@nongnu.org; Wed, 12 Jun 2013 04:34:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44999) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmgVu-00086u-50 for qemu-devel@nongnu.org; Wed, 12 Jun 2013 04:34:42 -0400 Message-ID: <51B8329E.7090406@redhat.com> Date: Wed, 12 Jun 2013 10:34:38 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1370533048-19229-1-git-send-email-kraxel@redhat.com> <87mwr3ghk0.fsf@codemonkey.ws> <51B6BFD5.10005@redhat.com> In-Reply-To: <51B6BFD5.10005@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] fbdev: add linux framebuffer display driver. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On 06/11/13 08:12, Gerd Hoffmann wrote: > Hi, > >>> +static QEMUCursor *ptr_cursor; >>> +static pixman_image_t *ptr_image; >>> +static int ptr_refresh; >>> +static int px, py, pw, ph; >>> +static int mx, my, mon; >>> + >>> +/* options */ >>> +static int use_scale; >>> +static pixman_filter_t pfilter = PIXMAN_FILTER_GOOD; >> >> Should stick all of this within a structure and pass it around where >> possible. > > Don't see what this buys us as there can be only a single framebuffer > display anyway. Can do that though. While looking into it: I can't get rid of global variables _anyway_. fbdev needs signal handlers to work. Absolutely required for console switching. Nice to have for catching fatal signals and restoring console state. Still want me move this into a struct? cheers, Gerd