From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH 4/4] drm/i915: Rewrite CL/CTG L-shaped memory detection
Date: Mon, 4 Oct 2021 13:36:24 +0300 [thread overview]
Message-ID: <YVrZKEgBEPeNegx5@intel.com> (raw)
In-Reply-To: <YIfSH/PWf2ZnOnOr@phenom.ffwll.local>
On Tue, Apr 27, 2021 at 10:58:07AM +0200, Daniel Vetter wrote:
> On Mon, Apr 26, 2021 at 08:18:39PM +0300, Ville Syrjälä wrote:
> > On Mon, Apr 26, 2021 at 06:08:59PM +0200, Daniel Vetter wrote:
> > > On Thu, Apr 22, 2021 at 04:11:22PM +0300, Ville Syrjälä wrote:
> > > > On Thu, Apr 22, 2021 at 11:49:43AM +0200, Daniel Vetter wrote:
> > > > > On Wed, Apr 21, 2021 at 06:34:01PM +0300, Ville Syrjala wrote:
> > > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > >
> > > > > > Currently we try to detect a symmetric memory configurations
> > > > > > using a magic DCC2_MODIFIED_ENHANCED_DISABLE bit. That bit is
> > > > > > either only set on a very specific subset of machines or it
> > > > > > just does not exist (it's not mentioned in any public chipset
> > > > > > datasheets I've found). As it happens my CL/CTG machines never
> > > > > > set said bit, even if I populate the channels with identical
> > > > > > sticks.
> > > > > >
> > > > > > So let's do the L-shaped memory detection the same way as the
> > > > > > desktop variants, ie. just look at the DRAM rank boundary
> > > > > > registers to see if both channels have an identical size.
> > > > > >
> > > > > > With this my CL/CTG no longer claim L-shaped memory when I use
> > > > > > identical sticks. Also tested with non-matching sticks just to
> > > > > > make sure the L-shaped memory is still properly detected.
> > > > > >
> > > > > > And for completeness let's update the debugfs code to dump
> > > > > > the correct set of registers on each platform.
> > > > > >
> > > > > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > >
> > > > > Did you check this with the swapping igt? I have some vague memories of
> > > > > bug reports where somehow the machine was acting like it's L-shaped memory
> > > > > despite that banks were populated equally. I've iirc tried all kinds of
> > > > > tricks to figure it out, all to absolutely no avail.
> > > >
> > > > Did you have a specific test in mind? I ran a bunch of things
> > > > that seemed swizzle related. All passed just fine.
> > >
> > > gem_tiled_swapping should be the one. It tries to cycle your entire system
> > > memory through tiled buffers into swap and out of it.
> >
> > Passes with symmetric config, fails with L-shaped config (if I hack
> > out the L-shape detection of course). So seems pretty solid.
> >
> > A kernel based self test that looks at the physical address would
> > still be nice I suppose. Though depending on the size of your RAM
> > sticks figuring out where exactly the switchover from two channels
> > to one channels happens probably requires a bit of work due to
> > the PCI hole/etc.
> >
> > Both my cl and ctg report this btw:
> > bit6 swizzle for X-tiling = bit9/bit10/bit11
> > bit6 swizzle for Y-tiling = bit9/bit11
> > so unfortunately can't be sure the other swizzle modes would be
> > correctly detected.
>
> I think testing-wise this is as good as it gets.
So what do we think about putting this in? Currently this only works by
sheer luck more or less. On my machines we have a false positive which
is safe now that the pin quirk got fixed, but if some other machines
have a false negative then things are not going to go so well.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2021-10-04 10:36 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 15:33 [Intel-gfx] [PATCH 0/4] drm/i915: Fix older platforms Ville Syrjala
2021-04-21 15:33 ` Ville Syrjala
2021-04-21 15:33 ` [Intel-gfx] [PATCH 1/4] drm/i915: Avoid div-by-zero on gen2 Ville Syrjala
2021-04-21 15:33 ` Ville Syrjala
2021-04-21 15:33 ` Ville Syrjala
2021-04-21 15:33 ` [Intel-gfx] [PATCH 2/4] drm/i915: Read C0DRB3/C1DRB3 as 16 bits again Ville Syrjala
2021-04-21 15:33 ` Ville Syrjala
2021-04-21 15:34 ` [Intel-gfx] [PATCH 3/4] drm/i915: Give C0DRB3/C1DRB3 a _BW suffix Ville Syrjala
2021-04-21 15:34 ` Ville Syrjala
2021-04-21 15:34 ` [Intel-gfx] [PATCH 4/4] drm/i915: Rewrite CL/CTG L-shaped memory detection Ville Syrjala
2021-04-21 15:34 ` Ville Syrjala
2021-04-22 9:49 ` [Intel-gfx] " Daniel Vetter
2021-04-22 9:49 ` Daniel Vetter
2021-04-22 13:11 ` Ville Syrjälä
2021-04-22 13:11 ` Ville Syrjälä
2021-04-26 16:08 ` Daniel Vetter
2021-04-26 16:08 ` Daniel Vetter
2021-04-26 17:18 ` Ville Syrjälä
2021-04-26 17:18 ` Ville Syrjälä
2021-04-27 8:58 ` Daniel Vetter
2021-04-27 8:58 ` Daniel Vetter
2021-10-04 10:36 ` Ville Syrjälä [this message]
2021-04-22 18:51 ` Ville Syrjälä
2021-04-22 18:51 ` Ville Syrjälä
2021-04-21 16:48 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915: Fix older platforms Patchwork
2021-04-21 17:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-04-22 0:14 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YVrZKEgBEPeNegx5@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.