From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Packard Subject: Re: [PATCH 01/12] Stop trying to out-guess mesa for BO allocation Date: Mon, 04 Aug 2014 22:01:14 -0700 Message-ID: <86k36nsf6t.fsf@hiro.keithp.com> References: <1406243908-1123-1-git-send-email-keithp@keithp.com> <1406243908-1123-2-git-send-email-keithp@keithp.com> <87silie2qa.fsf@eliezer.anholt.net> <86fvhidqub.fsf@hiro.keithp.com> <8738dcp4yt.fsf@eliezer.anholt.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0728288127==" Return-path: In-Reply-To: <8738dcp4yt.fsf@eliezer.anholt.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Eric Anholt , xorg-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0728288127== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eric Anholt writes: > OK, but isn't the problem with the code you're #if 0ing (which, really? > #if 0 in a patch being submitted for review?) that it's aligning to > 2*height instead of height? I went and did a bit of archaeology to figure out why it's using 2*height instead of just height. The initial change to pixmap allocation, which was then copied to the BO validation logic, was here: commit 736b89504a32239a0c7dfb5961c1b8292dd744bd Author: Chris Wilson Date: Sun Dec 30 10:32:18 2012 +0000 =09 uxa: Align surface allocations to even tile rows =09=20=20=20=20 Align surface sizes to an even number of tile rows to cater for sampler prefetch. If we read beyond the last page we may catch the PTE in a state of flux and trigger a GPU hang. Also detected by enabling invalid PTE access checking. =09=20=20=20=20 References: https://bugs.freedesktop.org/show_bug.cgi?id=3D56916 References: https://bugs.freedesktop.org/show_bug.cgi?id=3D55984 Signed-off-by: Chris Wilson =09 diff --git a/src/intel_uxa.c b/src/intel_uxa.c index f5ac0a6..2f14173 100644 --- a/src/intel_uxa.c +++ b/src/intel_uxa.c @@ -209,7 +209,7 @@ intel_uxa_pixmap_compute_size(PixmapPtr pixmap, tile_height =3D 8; else tile_height =3D 32; - aligned_h =3D ALIGN(h, tile_height); + aligned_h =3D ALIGN(h, 2*tile_height); =09=20 *stride =3D intel_get_fence_pitch(intel, ALIGN(pitch, 512), Look at the referenced bugs, what I found was a long list of random GPU hangs on ILK and SNB hardware that appear to have been caused by a kernel change. Daniel and Chris created a number of scatter shot fixes across the kernel, and this patch to the 2D driver. However, this patch doesn't appear to have actually solved anything; Norbert Preining was still crashing with this patch applied: https://bugs.freedesktop.org/show_bug.cgi?id=3D55984#c129 Furthermore, SNA has some similar code, but it applies it conditionally for hardware which doesn't have 'relaxed fencing', which is only hardware older than i965 when running on a older kernel that doesn't recognize the HAS_RELAXED_FENCING parameter (the current kernel always returns 'true'). So, as near as I can tell, this fix should never be necessary as the reported bug wasn't fixed by it, and SNA does not apply this rule to any hardware on which either bug was reproduced. If this fix is actually useful, wouldn't we want it in Mesa as well? =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIVAwUBU+BlG9siGmkAAAARAQhqXxAAgP48U78YJZ+Xg78IfimRR9jgit7wrX9r l0DUREN+oDkqhcaEFnsRmMxIgOGEvTJWM7Mho+6oBsfX2eq8t5u+xr4t1LGhha3b VpIj8zlin13SrfJtUct38BWHgtUsLdAprb/ntkjXJsCjhto3kH2Qc2ADS76s89TF cekb2Pfm88UWqXhPHebeeSQcS9V2ri4uzaey0BLU4cTTY/lSsOy4zRYqPRgEwtFJ krcVlPVKJEw7SP4nUrudhqhbgVFLVmmKbUV8z3MyztlQyDyWdYOg+jrc6mQti3ZW Da5na25qZDCK0SkVFZEMpTyNpiG6OPJSBXFYUesVS/dYH4E1sDh9TJGIDv53M2MX ldjfMwQLt5ql2LqGLBeDxEYqx/9GkMER9aHU2W/5An5HhRszzTp1R/o/BUvHuixd 9RkE110KyejwzDjIEmYMRQ0TwhhxY2pud4HC1eN4Qg24Seje6Ifv/weOeqnx6LYS tyUM3AJDr1B19hdo2yA2Z80V64CYoO/CO7jy3CqKZivGlhWgF75E1WzBMCHljG86 6w0pROjLCLdbr09U/SuF4RKZFQ5bVu+cZ/sRpLitXo7w25+PZIBJUxJrfpUH08ob Stor3oS2HC58t6tBWH+EiY5Z16FVEnhsJUaGwJDVq1mA303fCSCY9fr0wGyTRo4A 0DfpPsBaSaU= =Mx7y -----END PGP SIGNATURE----- --=-=-=-- --===============0728288127== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0728288127==--