From: Sean V Kelley Subject: Re: [PATCH] drm/i915: fix vxd392 memory corruption on VLV and >4GB Date: Sat, 8 Mar 2014 11:25:23 -0800 Message-ID: <20140308192523.GA27451@tallgrass.jf.intel.com> References: <1394241231-17242-1-git-send-email-sean.v.kelley@intel.com> <20140308092554.GE20302@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0215830398==" Return-path: Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by gabe.freedesktop.org (Postfix) with ESMTP id A8CC5FAF25 for ; Sat, 8 Mar 2014 11:24:42 -0800 (PST) Received: by mail-pb0-f53.google.com with SMTP id rp16so5554752pbb.40 for ; Sat, 08 Mar 2014 11:24:42 -0800 (PST) In-Reply-To: <20140308092554.GE20302@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Chris Wilson , intel-gfx@lists.freedesktop.org, Fei Jiang , Alan Cox List-Id: intel-gfx@lists.freedesktop.org --===============0215830398== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Saturday 08 Mar 2014 at 09:25:54 (+0000), Chris Wilson writes : > On Fri, Mar 07, 2014 at 05:13:51PM -0800, Sean V Kelley wrote: > > On VLV systems addressing 4GB of memory or greater, memory corruption w= as seen > > when initializing and attempting to render VP8 hardware decode surfaces= using > > the VXD392 HW IP block. > >=20 > > The VXD MMU has a limitation to addressing only 32bits. On 64bit kerne= l and > > user space builds this can cause problems for use of that IP block. > >=20 > > When 2G memory is inserted, fw buffer pfn was at 0x5f62b, which is belo= w 4GB. > > While for 4GB of memory the fw buffer pfn was 0x162ea9 with a physical = address > > at 0x162ea9000, above 4GB. > >=20 > > So although the memory is 4GB in the test hardware (Bayleybay CRB), a l= arge > > physical region (for example 3G-4G) can be occupied by onboard system > > resources. > >=20 > > Enabling ZONE_DMA32 and setting the correct mask DMA for this device > > resolves the issue kernel side. >=20 > That's a shame. I guess this is restricted to a subset of byt? It should affect all baytrail systems. To my knowledge there are no subsets= that have it fused off. > =20 > > Cc: Jesse Barnes > > Cc: Alan Cox > > Cc: Fei Jiang > > Signed-off-by: Sean V Kelley > > --- > > drivers/gpu/drm/i915/i915_dma.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i91= 5_dma.c > > index e4d2b9f..b8c6efc 100644 > > --- a/drivers/gpu/drm/i915/i915_dma.c > > +++ b/drivers/gpu/drm/i915/i915_dma.c > > @@ -1636,7 +1636,7 @@ int i915_driver_load(struct drm_device *dev, unsi= gned long flags) > > * behaviour if any general state is accessed within a page above 4GB, > > * which also needs to be handled carefully. >=20 > Also add a sentence here giving a quick explanation as to why we need to > quirk IS_VLV as well. Thanks for the feedback also going through Daniel's. Sean >=20 > > */ > > - if (IS_BROADWATER(dev) || IS_CRESTLINE(dev)) > > + if (IS_BROADWATER(dev) || IS_CRESTLINE(dev) || IS_VALLEYVIEW(dev)) > > dma_set_coherent_mask(&dev->pdev->dev, DMA_BIT_MASK(32)); > > =20 > > aperture_size =3D dev_priv->gtt.mappable_end; >=20 > --=20 > Chris Wilson, Intel Open Source Technology Centre --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJTG26jAAoJEEScsp9M+IBYu7cP/2evnt5vaGOR0fXsZgSM0Y8Y CxKys5jry7TNUvKgugERNGfLD0ASzJX2bykWFAe3JXt1jo+ScorSidjjSa65Sut3 t1iPyzMNixqY9lD8ntoOqInJnjq5p++yjCSH0yIJVX3T55T5lckIkgKspQZjNLVC IM/dSKZgsN21JClHJVaRuWIwzzFiZIPdSQT6GiQMmh1F/x2Dv9GV6DJZHpn4Pjqa gxhOHt4FI9AcHFNzUW8u0dmEshYgKZne2GhG07Za8XW28JicCEO07F2GiVAnKNDE YSyn4GbmU1t1Xb0cT6XtmfN5NfEt0TmkW608kQX147smsGGr2aHcCdXebrkOUfT3 F2LBopcd+6vFQkieCbyObv6c1h3NAvLas6JC/9I4L4VT391MKcmqn1dnMP6YNqTH OgFHNm7d1geNC/3VcrMtUfivs5sQ1YxxV2Zqy6gSjbRLa6DZV8k+85nli1WWX9zk Xwy9QKPma5eKCbevKBMzwNzKhJCNg96RZtmIWR3SPfjnh5ZTLH9Zk/hsKd8fvXug Il0EgJRu7vAWBy64HAXhJ1H0reG08rsOkEUN1510oRbUxa6r4rMZRyBs37waBVnT PeBesEB8wXcmJGIju+UbEU+MPSOj3yr2PLaqcZEdapeLu/fmuzZhcaMP2hQ8ZWQ0 84g50bUUc1RDGspL2k2b =pYTq -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM-- --===============0215830398== 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 --===============0215830398==--