From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLHeG-0003HC-UZ for qemu-devel@nongnu.org; Tue, 01 Nov 2011 12:57:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLHeF-0001rf-MK for qemu-devel@nongnu.org; Tue, 01 Nov 2011 12:57:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLHeF-0001rX-FO for qemu-devel@nongnu.org; Tue, 01 Nov 2011 12:57:15 -0400 Message-ID: <4EB024E7.8040400@redhat.com> Date: Tue, 01 Nov 2011 17:57:11 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <4EAB0169.8090408@virtualcomputer.com> <4EAFB49A.2040004@redhat.com> <2F227323-6B37-4F64-843A-91C3291A9254@virtualcomputer.com> In-Reply-To: <2F227323-6B37-4F64-843A-91C3291A9254@virtualcomputer.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] Allow 1366x768 as a valid VGA resolution List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Baboval Cc: qemu-devel@nongnu.org On 11/01/11 14:39, John Baboval wrote: > I don't know of any reason for it. I'd guess it is alignment, probably not important for all color depts. Maybe it is a good idea to do all sanity checks in the VBE_DISPI_INDEX_ENABLE branch where the actual mode switch happens. Then you already know xres, yres and depth when applying the checks. You can calculate the scanline length, then check the scanline alignment instead of being overly strict on xres in high color modes to satisfy alignment requirements in low color modes. You can also simply calculate how much memory the video mode needs and check that against the configured video ram instead of pulling xres and yres limits out of thin air. cheers, Gerd