From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L7as1-0006gB-8c for qemu-devel@nongnu.org; Tue, 02 Dec 2008 14:25:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L7arz-0006fX-AB for qemu-devel@nongnu.org; Tue, 02 Dec 2008 14:25:16 -0500 Received: from [199.232.76.173] (port=53551 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L7arz-0006fR-4D for qemu-devel@nongnu.org; Tue, 02 Dec 2008 14:25:15 -0500 Received: from rn-out-0910.google.com ([64.233.170.190]:1236) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L7ary-0008Be-Tj for qemu-devel@nongnu.org; Tue, 02 Dec 2008 14:25:15 -0500 Received: by rn-out-0910.google.com with SMTP id 56so1448171rnw.8 for ; Tue, 02 Dec 2008 11:25:13 -0800 (PST) Message-ID: <49358B96.7090106@codemonkey.ws> Date: Tue, 02 Dec 2008 13:25:10 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1 of 7] few more accessors References: <492D8B9D.1010001@eu.citrix.com> In-Reply-To: <492D8B9D.1010001@eu.citrix.com> Content-Type: text/plain; charset=UTF-8; format=flowed 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 Stefano Stabellini wrote: > This patch introduces few more DisplayState accessors in hw/sm501.c. > > Signed-off-by: Stefano Stabellini > > diff -r d8ccc2d27955 hw/sm501.c > --- a/hw/sm501.c Mon Nov 24 20:21:41 2008 +0000 > +++ b/hw/sm501.c Wed Nov 26 16:33:07 2008 +0000 > @@ -955,7 +955,7 @@ > > static inline int get_depth_index(DisplayState *s) > { > - switch(s->depth) { > + switch(ds_get_bits_per_pixel(s)) { > default: > case 8: > return 0; > @@ -985,7 +985,7 @@ > > uint8_t * src = s->local_mem; > int src_bpp = 0; > - int dst_bpp = s->ds->depth / 8 + (s->ds->depth % 8 ? 1 : 0); > + int dst_bpp = ds_get_bytes_per_pixel(s->ds) + (ds_get_bits_per_pixel(s->ds) % 8 ? 1 : 0); > There isn't a ds_get_bytes_per_pixel in console.h so this breaks the build. Is your patch missing something perhaps? Regards, Anthony Liguori