Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261367AbTHZPnG (ORCPT ); Tue, 26 Aug 2003 11:43:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262116AbTHZPnG (ORCPT ); Tue, 26 Aug 2003 11:43:06 -0400 Received: from pc1-cwma1-5-cust4.swan.cable.ntl.com ([80.5.120.4]:7325 "EHLO dhcp23.swansea.linux.org.uk") by vger.kernel.org with ESMTP id S261367AbTHZPnD (ORCPT ); Tue, 26 Aug 2003 11:43:03 -0400 Subject: Re: vesafb mtrr setup question From: Alan Cox To: Arvind Sankar Cc: Linux Kernel Mailing List In-Reply-To: <20030825194304.GA14893@m66-080-17.mit.edu> References: <20030825194304.GA14893@m66-080-17.mit.edu> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1061912542.20846.50.camel@dhcp23.swansea.linux.org.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 (1.4.3-3) Date: 26 Aug 2003 16:42:23 +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 996 Lines: 25 On Llu, 2003-08-25 at 20:43, Arvind Sankar wrote: > In the first place, the power of two computation computes the largest > power of 2 that is _smaller_ than video_size, so it looks like an > off-by-1 bug. Not a bug - we don't know what lives above it so we can't extend the mtrr safely > > /* Try and find a power of two to add */ > > while (temp_size && mtrr_add(video_base, temp_size, MTRR_TYPE_WRCOMB, 1)==-EINVAL) { > > temp_size >>= 1; > > } > > } > > Secondly, what's the point of requesting a smaller write-combining > segment that won't cover all the video memory being used? Generally we don't use all the videoram. Its a heuristic rather than perfection. You might want to play with improvements - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/