Re: [Mesa-dev] [PATCH] gallium/sw/kms: Fix multiple imports from PRIME FDs

2016-08-01 Thread Tomasz Figa
Hi Emil, On Sat, Jul 16, 2016 at 6:38 AM, Emil Velikov wrote: > On 15 July 2016 at 08:27, Tomasz Figa wrote: >> When a buffer with a GEM handle already existing in our context is >> (re-)imported from a PRIME FD, the resulting GEM handle is exactly the >> same as the original one. Since the GEM

Re: [Mesa-dev] [PATCH] gallium/sw/kms: Fix multiple imports from PRIME FDs

2016-07-15 Thread Emil Velikov
On 15 July 2016 at 08:27, Tomasz Figa wrote: > When a buffer with a GEM handle already existing in our context is > (re-)imported from a PRIME FD, the resulting GEM handle is exactly the > same as the original one. Since the GEM handles are not reference > counted, we need to detect duplicate impo

[Mesa-dev] [PATCH] gallium/sw/kms: Fix multiple imports from PRIME FDs

2016-07-15 Thread Tomasz Figa
When a buffer with a GEM handle already existing in our context is (re-)imported from a PRIME FD, the resulting GEM handle is exactly the same as the original one. Since the GEM handles are not reference counted, we need to detect duplicate imports and reference count our internal buffer structs ou