From: "Christian König" <deathsimple@vodafone.de>
To: Maarten Lankhorst <maarten.lankhorst@canonical.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 6/7] drm/radeon: allow asynchronous waiting on foreign fences
Date: Thu, 04 Sep 2014 15:34:19 +0200 [thread overview]
Message-ID: <54086A5B.307@vodafone.de> (raw)
In-Reply-To: <54085A47.1050106@vodafone.de>
> I need to check the docs how to do this correctly,
The docs don't really cover this case.
For the GPU waiting on an address there is an extra document just for
this case which I don't have at hand right now. But IIRC it was
recommended to use the local memory of the device waiting on the
semaphore. I'm just not sure if that's for pure performance reasons to
avoid accessing the bus or if there's a hard and unavoidable hardware
reason to do so.
For the GPU signaling case there is a special bit in the semaphore
instructions that you need to set if any user outside of the GPU should
see the write.
In general it is explicitly supported to use semaphores for inter device
synchronization on the bus (that's what the block is made for), but it's
not intended to be used for synchronization between the CPU and the
device. So I'm not sure if things like cache snooping is implemented and
correctly supported.
Well I see the feature more like nice to have and needs a bunch of
testing, so I would say either wait with the patch for now or make it
optional to use or something like that.
Regards,
Christian.
Am 04.09.2014 um 14:25 schrieb Christian König:
> Am 04.09.2014 um 14:08 schrieb Maarten Lankhorst:
>> Hey,
>>
>> Op 04-09-14 om 13:54 schreef Christian König:
>>> Am 04.09.2014 um 13:42 schrieb Maarten Lankhorst:
>>>> Use the semaphore mechanism to make this happen, this uses signaling
>>>> from the cpu instead of signaling by the gpu.
>>> I'm not sure if this will work reliable when the semaphores are in
>>> system memory. We might need to reserve some VRAM for them instead.
>>>
>>> Regards,
>>> Christian.
>> Why would it be unreliable? I mostly kept it in semaphore for
>> simplicity.
>
> The semaphore block tries to avoid memory accesses whenever possible.
>
> For example when a signal for address A arrives the block doesn't
> necessary writes that to memory but instead tries to match it
> immediately with a wait for address A. Similar is true if a wait for
> address A arrives and the semaphore block thinks it knows the memory
> value at address A.
>
> Also I'm not sure if the semaphore block really polls the memory
> address for changes, instead it might just snoop the MC for writes to
> this address. Since CPU writes to system memory aren't seen by the GPU
> MC the semaphore block would never know something changed.
>
> I need to check the docs how to do this correctly,
> Christian.
>
>>
>> ~Maarten
>>
>
next prev parent reply other threads:[~2014-09-04 13:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-04 11:37 [PATCH 0/7] cross-dev synchronization in TTM through dma-buf Maarten Lankhorst
2014-09-04 11:38 ` [PATCH 1/7] drm: Pass dma-buf as argument to, gem_prime_import_sg_table Maarten Lankhorst
2014-09-04 11:39 ` [PATCH 2/7] drm/ttm: add reservation_object as argument to ttm_bo_init Maarten Lankhorst
2014-09-04 11:40 ` [PATCH 3/7] drm/radeon: cope with foreign fences inside the reservation object Maarten Lankhorst
2014-09-04 11:45 ` Christian König
2014-09-04 11:41 ` [PATCH 4/7] drm/radeon: export reservation_object from dmabuf to ttm Maarten Lankhorst
2014-09-04 11:41 ` [PATCH 5/7] drm/nouveau: " Maarten Lankhorst
2014-09-04 11:42 ` [PATCH 6/7] drm/radeon: allow asynchronous waiting on foreign fences Maarten Lankhorst
2014-09-04 11:54 ` Christian König
2014-09-04 12:08 ` Maarten Lankhorst
2014-09-04 12:25 ` Christian König
2014-09-04 13:34 ` Christian König [this message]
2014-09-04 13:57 ` Maarten Lankhorst
2014-09-04 11:43 ` [PATCH 7/7] drm/nouveau: allow asynchronous waiting using gart fences Maarten Lankhorst
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=54086A5B.307@vodafone.de \
--to=deathsimple@vodafone.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=maarten.lankhorst@canonical.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 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.