From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Subject: Re: Questions about libdrm_intel and way to share physical memory between CPU and GPU Date: Sat, 4 Jun 2011 11:00:59 +0100 Message-ID: <20110604110059.0b7155fa@lxorguk.ukuu.org.uk> References: <5812F7DC54903547874AA228AE9C46AB7D8957F8@orsmsx504.amr.corp.intel.com> <20110602194203.7a72ea60@lxorguk.ukuu.org.uk> <8762ome0g6.fsf@eliezer.anholt.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from www.etchedpixels.co.uk (earthlight.etchedpixels.co.uk [81.2.110.250]) by gabe.freedesktop.org (Postfix) with ESMTP id 4636A9E74C for ; Sat, 4 Jun 2011 02:59:11 -0700 (PDT) In-Reply-To: <8762ome0g6.fsf@eliezer.anholt.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Eric Anholt Cc: "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org > I'd much rather be able to just hand that memory off to the kernel to > use along with everything else and have there be nothing magic about it. > But as I recall, the mtrr mappings of that memory was often goofy, so it > may take some work to clean it up. That also depends where it is located - you'd need to add memory hot plug, and in the general case (as opposed to the Intel i9xx case) that memory may not be main memory anyway. We can't go giving memory that is actually part of some other system complex on some of the non Intel devices to the CPU for example. So yes its a hack that works in limited cases for Intel to give the memory to the system but you need 3 level page tables, memory hot plug and PAT enabled to pull that off. Either way the two appear to be different things, and both have their uses. Alan