From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vo6TR-0001v0-9K for qemu-devel@nongnu.org; Wed, 04 Dec 2013 02:02:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vo6TN-00070y-SG for qemu-devel@nongnu.org; Wed, 04 Dec 2013 02:02:17 -0500 Received: from mail-ea0-x233.google.com ([2a00:1450:4013:c01::233]:52420) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vo6TN-0006yO-LC for qemu-devel@nongnu.org; Wed, 04 Dec 2013 02:02:13 -0500 Received: by mail-ea0-f179.google.com with SMTP id r15so10521038ead.10 for ; Tue, 03 Dec 2013 23:02:12 -0800 (PST) MIME-Version: 1.0 Date: Wed, 4 Dec 2013 17:02:12 +1000 Message-ID: From: Dave Airlie Content-Type: text/plain; charset=ISO-8859-1 Subject: [Qemu-devel] gpu and console chicken and egg List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" So I've hit a bit of a init ordering issue that I'm not sure how best to solve, Just some background: In order for the virt GPU and the UI layer (SDL or GTK etc) to interact properly over OpenGL use, I have created and OpenGL provider in the console, and the UI layer can register callbacks for a single GL provider (only one makes sense really) when it starts up. This is mainly to be used for context management and swap buffers management. Now in the virtio GPU I'd was going to use a virtio feature to say whether the qemu hw can support the 3D renderer, dependant on whether it was linked with the virgl renderer and whether the current UI was GL capable. I also have the virtio gpu code checking in its update_display callback whether the first console has acquired a GL backend. Now the problem: The virtio hw is initialised before the console layers. So the feature bits are all set at that point, before the UI ever registers a GL interface layer. So is there a method to modify the advertised feature bits later in the setup sequence before the guest is started? Can I call something from the update display callback? Otherwise I was thinking I would need something in my config space on top of feature bits to say the hw is actually 3d capable. Dave.