dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Fyodorov <halcy@yandex.ru>
To: "Christian König" <christian.koenig@amd.com>,
	gpudriverdevsupport <gpudriverdevsupport@amd.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: r600_dma_ring_test() failed - synchronization problem with write-combining memory
Date: Thu, 09 Oct 2014 23:10:16 +0400	[thread overview]
Message-ID: <390791412881816@web18g.yandex.ru> (raw)
In-Reply-To: <5436D4AD.80701@amd.com>

09.10.2014, 22:32, "Christian König" <christian.koenig@amd.com>:
> Am 09.10.2014 um 20:15 schrieb Alexander Fyodorov:
>>  09.10.2014, 21:42, "Christian König" <christian.koenig@amd.com>:
>>>  For VRAM it is true that we have a couple of different caches between
>>>  the CPU and the actually memory, which need to be flushed explicitly if
>>>  you want to see a value written by the GPU.
>>  Then maybe such a flush is what I need. How do I put it in the instruction ring buffer?
>
> At least we need to flush the HDP, but what hardware generation is this
> exactly? Some R6xx don't support hardware flushes in the ring buffer.

I observed the problem on HD2400 and HD6670.

> Try to call r600_mmio_hdp_flush(rdev) from the loop which checks the
> value written.

Yep, it helped. Here is the patch against 3.10.53, tested on HD2400.


Flush VRAM cache before each read when polling.

Signed-off-by: Alexander Fyodorov <halcy at yandex.ru>


Index: drivers/gpu/drm/radeon/r600.c
===================================================================
--- drivers/gpu/drm/radeon/r600.c	(revision 11647)
+++ drivers/gpu/drm/radeon/r600.c	(working copy)
@@ -2899,6 +2899,7 @@
 	radeon_ring_unlock_commit(rdev, ring);
 
 	for (i = 0; i < rdev->usec_timeout; i++) {
+		r600_ioctl_wait_idle(rdev, rdev->vram_scratch.robj);
 		tmp = readl(ptr);
 		if (tmp == 0xDEADBEEF)
 			break;
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-10-09 19:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-09 11:39 r600_dma_ring_test() failed - synchronization problem with write-combining memory Alexander Fyodorov
2014-10-09 17:42 ` Christian König
2014-10-09 18:15   ` Alexander Fyodorov
2014-10-09 18:32     ` Christian König
2014-10-09 19:10       ` Alexander Fyodorov [this message]
2014-10-10 16:00         ` Alex Deucher
2014-10-10 16:02           ` Alex Deucher
2014-10-10 16:03             ` Christian König
2014-10-13 17:50           ` Alex Deucher
2014-10-14 14:12             ` Alexander Fyodorov

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=390791412881816@web18g.yandex.ru \
    --to=halcy@yandex.ru \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gpudriverdevsupport@amd.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox