From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: Account for TSEG size when determining 865G stolen base Date: Thu, 11 Aug 2016 19:38:24 +0300 Message-ID: <20160811163824.GR4329@intel.com> References: <1470653919-27251-1-git-send-email-ville.syrjala@linux.intel.com> <20160809085347.GA21147@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: <20160809085347.GA21147@nuc-i3427.alporthouse.com> Sender: stable-owner@vger.kernel.org To: Chris Wilson , intel-gfx@lists.freedesktop.org, Taketo Kabe , Daniel Vetter , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, stable@vger.kernel.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Aug 09, 2016 at 09:53:47AM +0100, Chris Wilson wrote: > On Mon, Aug 08, 2016 at 01:58:39PM +0300, ville.syrjala@linux.intel.com wrote: > > From: Ville Syrjälä > > > > Looks like the TSEG lives just above TOUD, stolen comes after TSEG. > > > > The spec seems somewhat self-contradictory in places, in the ESMRAMC > > register desctription it says: > > TSEG Size: > > 10=(TOUD + 512 KB) to TOUD > > 11 =(TOUD + 1 MB) to TOUD > > > > so that agrees with TSEG being at TOUD. But the example given > > elsehwere in the spec says: > > > > TOUD equals 62.5 MB = 03E7FFFFh > > TSEG selected as 512 KB in size, > > Graphics local memory selected as 1 MB in size > > General System RAM available in system = 62.5 MB > > General system RAM range00000000h to 03E7FFFFh > > TSEG address range03F80000h to 03FFFFFFh > > TSEG pre-allocated from03F80000h to 03FFFFFFh > > Graphics local memory pre-allocated from03E80000h to 03F7FFFFh > > Found that example: > > """ > Notes on Pre-Allocated Memory for Graphics > > These register bits control the use of memory from main memory space as > graphics local memory. The memory for TSEG is pre-allocated first and > then the graphics local memory is pre-allocated. > """ > > > so here we have TSEG above stolen. > > > > Real world evidence agrees with the TOUD->TSEG->stolen order however, so > > let's fix up the code to account for the TSEG size. > > > > Cc: Taketo Kabe > > Cc: Chris Wilson > > Cc: Daniel Vetter > > Cc: Thomas Gleixner > > Cc: Ingo Molnar > > Cc: "H. Peter Anvin" > > Cc: x86@kernel.org > > Cc: stable@vger.kernel.org > > Fixes: 0ad98c74e093 ("drm/i915: Determine the stolen memory base address on gen2") > > Fixes: a4dff76924fe ("x86/gpu: Add Intel graphics stolen memory quirk for gen2 platforms") > > Reported-by: Taketo Kabe > > Tested-by: Taketo Kabe > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96473 > > Signed-off-by: Ville Syrjälä > > Link: http://download.intel.com/design/chipsets/datashts/25251405.pdf > Reviewed-by: Chris Wilson Didn't see any objections from x86 folks, so I went and pushed this to dinq. Thanks for the review. -- Ville Syrjälä Intel OTC