From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYsLd-0004J6-Sc for qemu-devel@nongnu.org; Tue, 30 Sep 2014 03:59:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYsLX-00083g-OW for qemu-devel@nongnu.org; Tue, 30 Sep 2014 03:59:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYsLX-000827-H1 for qemu-devel@nongnu.org; Tue, 30 Sep 2014 03:59:43 -0400 Message-ID: <1412063970.23471.9.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Tue, 30 Sep 2014 09:59:30 +0200 In-Reply-To: <20140930004350.GB7765@voom.fritz.box> References: <1411983073-13058-1-git-send-email-kraxel@redhat.com> <1411983073-13058-4-git-send-email-kraxel@redhat.com> <20140930004350.GB7765@voom.fritz.box> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 03/11] vga: Separate LE and BE conversion functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: David Gibson , qemu-devel@nongnu.org Hi, > > case 15: > > - v = VGA_DRAW_LINE15; > > + v = big_endian_fb ? VGA_DRAW_LINE15_BE : VGA_DRAW_LINE15_LE; > > bits = 16; > > break; > > case 16: > > - v = VGA_DRAW_LINE16; > > + v = big_endian_fb ? VGA_DRAW_LINE16_BE : VGA_DRAW_LINE16_LE; > > bits = 16; > > break; > > So, v1 changed both of these cases to bits = 15, which looked wrong > for case 16. v2 changes neither, which looks wrong for case 15. Or > is there a reason it should be 16 for case 15? It is correct. The '15' is the color depth, and 'bits' is the number of bits per pixel, which is 16 because the color format uses two bytes per pixel and one of the bits is unused. cheers, Gerd