From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?TWFyZWsgT2zFocOhaw==?= Subject: Re: [PATCH 1/3] drm/radeon: stop poisoning the GART TLB Date: Fri, 13 Jun 2014 15:19:34 +0200 Message-ID: References: <1401888598-1961-1-git-send-email-deathsimple@vodafone.de> <5398218A.4040104@vodafone.de> <53998D99.6050008@vodafone.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=089e013cbe5eb9fb7204fbb78911 Return-path: Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by gabe.freedesktop.org (Postfix) with ESMTP id A43016EA1C for ; Fri, 13 Jun 2014 06:20:15 -0700 (PDT) Received: by mail-vc0-f172.google.com with SMTP id hy10so2288204vcb.3 for ; Fri, 13 Jun 2014 06:20:15 -0700 (PDT) In-Reply-To: <53998D99.6050008@vodafone.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: =?UTF-8?Q?Christian_K=C3=B6nig?= Cc: dri-devel List-Id: dri-devel@lists.freedesktop.org --089e013cbe5eb9fb7204fbb78911 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, With my "force_gtt" patch, Cape Verde is unstable too, so all GCN chips are affected. I recommend applying that patch, because it will reproduce the problem faster. Without it, the hangs are very rare and it may take a while before they occur. Marek On Thu, Jun 12, 2014 at 1:23 PM, Christian K=C3=B6nig wrote: > Please do so, and you might want to try 3.15.0 as well. > > I've tested multiple piglit runs over night with my Bonaire and 3.15.0 an= d > that seemed to work perfectly fine. > > Going to test Alex drm-next-3.16 a bit more as well. > > Christian. > > Am 11.06.2014 12:56, schrieb Marek Ol=C5=A1=C3=A1k: > >> I only tested Bonaire. I can test Cape Verde if needed. >> >> Marek >> >> On Wed, Jun 11, 2014 at 11:29 AM, Christian K=C3=B6nig >> wrote: >>> >>> Crap, I already wanted to check back with you if that really fixes your >>> problems. >>> >>> Thanks for the info, this crash also only happens on CIK doesn't it? >>> >>> Christian. >>> >>> Am 11.06.2014 01:30, schrieb Marek Ol=C5=A1=C3=A1k: >>> >>>> Sorry to tell you the bad news. This patch doesn't fix the hangs on my >>>> machine. >>>> >>>> I tested drm-next-3.16 from Alex's tree. I also switched copying from >>>> SDMA to CP DMA, which hung too. >>>> >>>> I also tried this: >>>> >>>> git checkout (the problematic commit): >>>> 6d2f294 - drm/radeon: use normal BOs for the page tables v4 >>>> >>>> git cherry-pick (fixes): >>>> 0e97703c - drm/radeon: add define for flags used in R600+ GTT >>>> 0986c1a5 - drm/radeon: stop poisoning the GART TLB >>>> 4906f689 - drm/radeon: fix page directory update size estimation >>>> 4b095566 - drm/radeon: fix buffer placement under memory pressure v2 >>>> >>>> Then I tested both SDMA and CP DMA copying. Both were unstable. >>>> >>>> Testing was done with piglit / quick.tests. >>>> >>>> Marek >>>> >>>> >>>> On Wed, Jun 4, 2014 at 3:29 PM, Christian K=C3=B6nig >>>> >>>> wrote: >>>>> >>>>> From: Christian K=C3=B6nig >>>>> >>>>> When we set the valid bit on invalid GART entries they are >>>>> loaded into the TLB when an adjacent entry is loaded. This >>>>> poisons the TLB with invalid entries which are sometimes >>>>> not correctly removed on TLB flush. >>>>> >>>>> For stable inclusion the patch probably needs to be modified a bit. >>>>> >>>>> Signed-off-by: Christian K=C3=B6nig >>>>> Cc: stable@vger.kernel.org >>>>> --- >>>>> drivers/gpu/drm/radeon/rs600.c | 5 ++++- >>>>> 1 file changed, 4 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/drivers/gpu/drm/radeon/rs600.c >>>>> b/drivers/gpu/drm/radeon/rs600.c >>>>> index 0a8be63..e0465b2 100644 >>>>> --- a/drivers/gpu/drm/radeon/rs600.c >>>>> +++ b/drivers/gpu/drm/radeon/rs600.c >>>>> @@ -634,7 +634,10 @@ int rs600_gart_set_page(struct radeon_device >>>>> *rdev, >>>>> int i, uint64_t addr) >>>>> return -EINVAL; >>>>> } >>>>> addr =3D addr & 0xFFFFFFFFFFFFF000ULL; >>>>> - addr |=3D R600_PTE_GART; >>>>> + if (addr =3D=3D rdev->dummy_page.addr) >>>>> + addr |=3D R600_PTE_SYSTEM | R600_PTE_SNOOPED; >>>>> + else >>>>> + addr |=3D R600_PTE_GART; >>>>> writeq(addr, ptr + (i * 8)); >>>>> return 0; >>>>> } >>>>> -- >>>>> 1.9.1 >>>>> >>>>> _______________________________________________ >>>>> dri-devel mailing list >>>>> dri-devel@lists.freedesktop.org >>>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel >>> >>> > --089e013cbe5eb9fb7204fbb78911 Content-Type: text/x-patch; charset=US-ASCII; name="0001-force_gtt.patch" Content-Disposition: attachment; filename="0001-force_gtt.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hwdiswiu0 RnJvbSA1MDRjMjdjMjExMzFmMGEyYjQ3MmU4NTMxZWQ0NjMwNDU0ZmUxNDcxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/TWFyZWs9MjBPbD1DNT1BMT1DMz1BMWs/PSA8 bWFyZWsub2xzYWtAYW1kLmNvbT4KRGF0ZTogRnJpLCAxMyBKdW4gMjAxNCAxNToxNzoyNiArMDIw MApTdWJqZWN0OiBbUEFUQ0hdIGZvcmNlX2d0dAoKLS0tCiBkcml2ZXJzL2dwdS9kcm0vcmFkZW9u L3JhZGVvbl92bS5jIHwgMTcgKysrKysrKysrKysrKysrKysKIDEgZmlsZSBjaGFuZ2VkLCAxNyBp bnNlcnRpb25zKCspCgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9ncHUvZHJtL3JhZGVvbi9yYWRlb25f dm0uYyBiL2RyaXZlcnMvZ3B1L2RybS9yYWRlb24vcmFkZW9uX3ZtLmMKaW5kZXggYzExYjcxZC4u NjdmNzY1OCAxMDA2NDQKLS0tIGEvZHJpdmVycy9ncHUvZHJtL3JhZGVvbi9yYWRlb25fdm0uYwor KysgYi9kcml2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JvKQogCQkJY29udGludWU7CkBAIC0xNTksNiArMTc0LDggQEAgc3RydWN0IHJhZGVv bl9jc19yZWxvYyAqcmFkZW9uX3ZtX2dldF9ib3Moc3RydWN0IHJhZGVvbl9kZXZpY2UgKnJkZXYs CiAJCWxpc3RbaWR4XS50aWxpbmdfZmxhZ3MgPSAwOwogCQlsaXN0W2lkeF0uaGFuZGxlID0gMDsK IAkJbGlzdF9hZGQoJmxpc3RbaWR4KytdLnR2LmhlYWQsIGhlYWQpOworCisJCWZvcmNlX2d0dCh2 bS0+cGFnZV90YWJsZXNbaV0uYm8pOwogCX0KIAogCXJldHVybiBsaXN0OwotLSAKMS45LjEKCg== --089e013cbe5eb9fb7204fbb78911 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --089e013cbe5eb9fb7204fbb78911--