From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L26aC-0005Cs-Ro for qemu-devel@nongnu.org; Mon, 17 Nov 2008 11:04:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L26aB-0005Cf-Mh for qemu-devel@nongnu.org; Mon, 17 Nov 2008 11:04:11 -0500 Received: from [199.232.76.173] (port=56030 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L26aB-0005Cc-H1 for qemu-devel@nongnu.org; Mon, 17 Nov 2008 11:04:11 -0500 Received: from smtp.eu.citrix.com ([62.200.22.115]:53930) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L26aA-0001fu-I1 for qemu-devel@nongnu.org; Mon, 17 Nov 2008 11:04:10 -0500 Message-ID: <492196D4.3030301@eu.citrix.com> Date: Mon, 17 Nov 2008 16:07:48 +0000 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] DisplayState interface change References: <49216748.2000109@eu.citrix.com> <49218195.8080005@codemonkey.ws> In-Reply-To: <49218195.8080005@codemonkey.ws> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Anthony Liguori wrote: > If we're going to change DisplayState, and I think it's long over due > that we do, then I think we should try to make sure we get it right. > > What I would like to see is the buffer information extracted into a > separate structure. That buffer should also describe the pixel format > in a much more thorough way. There should be, in the very least, an > endianness flag, information about the per-color shift and per-color > mask, the bits per pixel, the bytes per pixel, the width and the height. That should be pretty easy to do, since we already have all those informations. > We should also have generic conversion functions to convert from one > buffer to another. This would allow us to simplify a lot of things > (like screen shot). It also ties in better to other display tool kits. > Right now we have too many assumptions about what the pixel layout is > from the depth. Those functions right now are in vga_template.h I tried not to change it in this patch. > The other thing to consider is that we do need some level of > bidirectional communication. vmware VGA supports the ability to tell > the guest what resolution/depth it ought to be using. You really want > to get that information from SDL (at least the depth bits) so that we > can avoid blitting. With KVM, we can pretty trivially directly map the > SDL buffer directly into the guest's physical memory provided it uses > the right format. > I agree that it be nice, we could probably do something like that on xen too. Please don't ask me to make these big changes (generic functions, bidirectional communication) on top of this patch in order for it to get applied. This patch is already too long, it would be difficult to accomplish all the things you suggested in a single shot without breaking anything. I think it is best to do this incrementally and work together on the features suggested after this patch gets applied.