Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MeTdj-0007oR-Tz for mharc-grub-devel@gnu.org; Fri, 21 Aug 2009 08:54:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MeTdf-0007nD-QR for grub-devel@gnu.org; Fri, 21 Aug 2009 08:54:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MeTda-0007k2-NW for grub-devel@gnu.org; Fri, 21 Aug 2009 08:54:39 -0400 Received: from [199.232.76.173] (port=41720 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeTda-0007jz-Fy for grub-devel@gnu.org; Fri, 21 Aug 2009 08:54:34 -0400 Received: from mail-bw0-f222.google.com ([209.85.218.222]:57214) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MeTdZ-0005KE-QS for grub-devel@gnu.org; Fri, 21 Aug 2009 08:54:34 -0400 Received: by bwz22 with SMTP id 22so571280bwz.42 for ; Fri, 21 Aug 2009 05:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ARyChQyLXdlqI0dnBcOhSdY6oGzGIjDGhzr7OZnpNa0=; b=uVrfovFqisji6xLy3jKXUAW3xAOyf1QGzkMfXE3rKRohd8VkPn8Tm0A9lEdTgr7X13 HXDwO+kRtEWkeccVF/Fu9to+6bewqyv7EKI7x/nbg3cBeGv/Dc+8GSNW/LHc1DQjTTZR 9xZ0C53o9llCxJDtw+r++PjyKNmVyZHCmZk/E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=CFFM1bmgG1xp4vMgv/PTAOFXR7Mfriy1EUwg8BZ0QSEHMcygWg120K6zEYM3kUDvWu tpcC9aTVT6GriKSUVv5xst0EPMp5mzRW/yoFnRWkEgl7PxtqICNsttVfdk6UyBwQ+ClB es7lzhfBgSceiO1n5iT5IAsZkGMYWqPg4FQvA= MIME-Version: 1.0 Received: by 10.204.7.204 with SMTP id e12mr883515bke.117.1250859272399; Fri, 21 Aug 2009 05:54:32 -0700 (PDT) In-Reply-To: <20090817135146.GN32551@thorin> References: <20090817135146.GN32551@thorin> Date: Fri, 21 Aug 2009 14:54:32 +0200 Message-ID: From: "Vladimir 'phcoder' Serbinenko" To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH 1/2] Replace hook-based with flag-based approach for choosing video mode X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Aug 2009 12:54:40 -0000 On Mon, Aug 17, 2009 at 3:51 PM, Robert Millan wrote: > On Sun, Aug 16, 2009 at 08:51:06PM +0200, Vladimir 'phcoder' Serbinenko w= rote: >> After discussion on IRC it revealed that hook-based approach is >> unpracticable because number of available modes grows exponentially >> with every parameter available. Here is the patch to change to >> flag-based approach > > Please can you ellaborate on this? =A0(if you still have a copy of the > discussion, it'd be useful to post it) > There was no discussion on this point. But current design is to call a hook with every available mode and see if it approves the mode. Unfortunately it doesn't work as expected because some modes aren't presented by driver unless explicitly requested. This may cause appropriate mode to be missed. Making driver iterate through a lot of modes will slow down mode switching. With flag-based approach driver knows which mode upper layer wants and so can present appropriate one. It has a drawback of limiting number of filtering possibilities but currently no subsystem needs more than is done with this patch. If it changes in the future interface can be extended to have new flags or parameters --=20 Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git