All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>,
	Alexander Fyodorov <halcy@yandex.ru>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	gpudriverdevsupport <gpudriverdevsupport@amd.com>
Subject: Re: r600_dma_ring_test() failed - synchronization problem with write-combining memory
Date: Fri, 10 Oct 2014 18:03:47 +0200	[thread overview]
Message-ID: <54380363.3050504@amd.com> (raw)
In-Reply-To: <CADnq5_M2WgtC+JejM_XdO06iLQ=sP_2k238mWEZ0AjBve5nq0Q@mail.gmail.com>

Am 10.10.2014 um 18:02 schrieb Alex Deucher:
> On Fri, Oct 10, 2014 at 12:00 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>> On Thu, Oct 9, 2014 at 3:10 PM, Alexander Fyodorov <halcy@yandex.ru> wrote:
>>> 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;
>> I think I'd prefer to just switch the test to use gart memory since
>> this code is shared by different asics thay may not all implement hdp
>> flush the same way.  We can just reserve a couple of slots in the wb
>> page.

Works for me as well. We could also grab a few bytes of GART using the 
SA manager.

> Also newer versions of the test will need a similar fix.

See the patch I already send to you, the SDMA on CIK is the only one not 
usign this ring test.

Christian.

>
> Alex

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-10-10 16:03 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
2014-10-10 16:00         ` Alex Deucher
2014-10-10 16:02           ` Alex Deucher
2014-10-10 16:03             ` Christian König [this message]
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=54380363.3050504@amd.com \
    --to=christian.koenig@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gpudriverdevsupport@amd.com \
    --cc=halcy@yandex.ru \
    /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.