[Mesa-dev] [PATCH 1/2] panfrost: Track BO lifetime with jobs and reference counts
Eric Anholt
eric at anholt.net
Tue Apr 16 17:23:53 UTC 2019
Alyssa Rosenzweig <alyssa at rosenzweig.io> writes:
>> > diff --git a/src/gallium/drivers/panfrost/pan_job.c
>> > b/src/gallium/drivers/panfrost/pan_job.c
>> > index 66a8b0d4b07..6c68575158f 100644
>> > --- a/src/gallium/drivers/panfrost/pan_job.c
>> > +++ b/src/gallium/drivers/panfrost/pan_job.c
>> > @@ -27,6 +27,13 @@
>> > #include "util/hash_table.h"
>> > #include "util/ralloc.h"
>> >
>> > +static void
>> > +remove_from_ht(struct hash_table *ht, void *key)
>> > +{
>> > + struct hash_entry *entry = _mesa_hash_table_search(ht, key);
>> > + _mesa_hash_table_remove(ht, entry);
>> > +}
>> > +
>>
>> This is the same as _mesa_hash_table_remove_key(), no?
>
> Maybe? I copypasted this from v3d, but maybe we're both duplicating
> code.
hash_table_remove_key() came after my stuff and we didn't refactor the
whole tree for it.
>> Did you mean to leave this #if'ed out?
>
> Yes, job flushing is a lot more complicated / depends on a lot more
> code; I just wanted the stub here for now.
>
>> Why not use pipe_reference instead of open-coding? That helper contains
>> some neat debug-helpers etc...
>
> pipe_reference kind of scares me... Most of the abstractions here are
> based heavily on v3d's; I figure if anholt had a good reason to do it,
> that's good enough for me..
My BO refcounting came from my pre-gallium intel bufmgr stuff.
pipe_reference seems like fine thing to use.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190416/021d9d89/attachment.sig>
More information about the mesa-dev
mailing list