From: Thomas Hellstrom <thomas@shipmail.org>
To: "Marek Olšák" <maraeo@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write
Date: Sat, 08 Oct 2011 10:14:43 +0200 [thread overview]
Message-ID: <4E900673.7000100@shipmail.org> (raw)
In-Reply-To: <CAAxE2A6VQksEfyU0YVH_vHjNaE+yy2uHY4PAFCYYkFJcTBXmNw@mail.gmail.com>
On 10/07/2011 11:30 PM, Marek Olšák wrote:
> On Fri, Oct 7, 2011 at 3:38 PM, Jerome Glisse<j.glisse@gmail.com> wrote:
>
>> I should have look at the patch long ago ... anyway i think a better
>> approach would be to expose fence id as 64bits unsigned to each
>> userspace client. I was thinking of mapping a page readonly (same page
>> as the one gpu write back) at somespecific offset in drm file (bit
>> like sarea but readonly so no lock). Each time userspace submit a
>> command stream it would get the fence id associated with the command
>> stream. It would then be up to userspace to track btw read or write
>> and do appropriate things. The kernel code would be simple (biggest
>> issue is finding an offset we can use for that), it would be fast as
>> no round trip to kernel to know the last fence.
>>
>> Each fence seq would be valid only for a specific ring (only future
>> gpu impacted here, maybe cayman).
>>
>> So no change to ttm, just change to radeon to return fence seq and to
>> move to an unsigned 64. Issue would be when gpu write back is
>> disabled, then we would either need userspace to call somethings like
>> bo wait or to other ioctl to get the kernel to update the copy, copy
>> would be updated in the irq handler too so at least it get updated
>> anytime something enable irq.
>>
> I am having a hard time understanding what you are saying.
>
> Anyway, I had some read and write usage tracking in the radeon winsys.
> That worked well for driver-private resources, but it was a total fail
> for the ones shared with the DDX. I needed this bo_wait optimization
> to work with multiple processes. That's the whole point why I am doing
> this in the kernel.
>
> Marek
>
At one XDS meeting in Cambridge an IMHO questionable decision was taken to
try to keep synchronization operations like this in user-space,
communicating necessary
info among involved components. In this case you'd then need to send
fence sequences
down the DRI2 protocol to the winsys.
However, if you at one point want to do user-space suballocation of
kernel buffers,
that's something you need to do anyway, because the kernel is not aware
that user-space fences
the suballocations separately.
/Thomas
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2011-10-08 8:16 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-07 20:39 [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write Marek Olšák
2011-08-07 20:39 ` [PATCH 2/2] drm/radeon/kms: add a new gem_wait ioctl with read/write flags Marek Olšák
2011-08-12 17:22 ` Jerome Glisse
2011-08-12 17:21 ` [PATCH 1/2] drm/ttm: add a way to bo_wait for either the last read or last write Jerome Glisse
2011-08-13 20:32 ` Marek Olšák
2011-10-04 11:48 ` Thomas Hellstrom
2011-10-05 2:08 ` Marek Olšák
2011-10-05 5:54 ` Thomas Hellstrom
2011-10-06 22:42 ` Marek Olšák
2011-10-07 8:00 ` Thomas Hellstrom
2011-10-07 13:24 ` Alex Deucher
2011-10-07 14:05 ` Thomas Hellstrom
2011-10-07 14:14 ` Alex Deucher
2011-10-07 13:38 ` Jerome Glisse
2011-10-07 13:42 ` Jerome Glisse
2011-10-07 21:07 ` Marek Olšák
2011-10-07 14:09 ` Thomas Hellstrom
2011-10-07 21:30 ` Marek Olšák
2011-10-08 8:14 ` Thomas Hellstrom [this message]
2011-10-07 22:03 ` Marek Olšák
2011-10-24 14:48 ` Thomas Hellstrom
2011-10-24 17:10 ` Marek Olšák
2011-10-24 17:28 ` Thomas Hellstrom
2011-10-24 17:39 ` Marek Olšák
2011-10-07 8:58 ` Thomas Hellstrom
2011-10-08 10:26 ` Ville Syrjälä
2011-10-08 11:10 ` Thomas Hellstrom
2011-10-08 11:27 ` Ville Syrjälä
2011-10-08 11:32 ` Thomas Hellstrom
2011-10-24 16:42 ` Marek Olšák
2011-10-24 16:47 ` Thomas Hellstrom
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=4E900673.7000100@shipmail.org \
--to=thomas@shipmail.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=maraeo@gmail.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.