Re: [Mesa-dev] [RFC 2/7] pipe-loader-drm: Add common pipe_screen refcounting

2016-06-18 Thread Rob Herring
On Fri, Jun 17, 2016 at 12:51 PM, Ilia Mirkin wrote: > On Fri, Jun 17, 2016 at 1:45 PM, Rob Herring wrote: >> Some gallium drivers have implemented reference counting of pipe_screen >> to avoid creating multiple screens for a device. Move this into the >>

Re: [Mesa-dev] [RFC 2/7] pipe-loader-drm: Add common pipe_screen refcounting

2016-06-17 Thread Emil Velikov
On 17 June 2016 at 19:28, Rob Clark wrote: > On Fri, Jun 17, 2016 at 2:23 PM, Emil Velikov > wrote: >> Hi Rob, >> >> On 17 June 2016 at 18:45, Rob Herring wrote: >> >>> struct pipe_screen { >>> + int refcnt; >> Can you please

Re: [Mesa-dev] [RFC 2/7] pipe-loader-drm: Add common pipe_screen refcounting

2016-06-17 Thread Rob Clark
On Fri, Jun 17, 2016 at 2:23 PM, Emil Velikov wrote: > Hi Rob, > > On 17 June 2016 at 18:45, Rob Herring wrote: > >> struct pipe_screen { >> + int refcnt; > Can you please use struct pipe_reference throughout and the respective > pipe_reference API

Re: [Mesa-dev] [RFC 2/7] pipe-loader-drm: Add common pipe_screen refcounting

2016-06-17 Thread Emil Velikov
Hi Rob, On 17 June 2016 at 18:45, Rob Herring wrote: > struct pipe_screen { > + int refcnt; Can you please use struct pipe_reference throughout and the respective pipe_reference API from src/gallium/auxiliary/util/u_inlines.h. Thank you very much for doing this ! Emil

Re: [Mesa-dev] [RFC 2/7] pipe-loader-drm: Add common pipe_screen refcounting

2016-06-17 Thread Ilia Mirkin
On Fri, Jun 17, 2016 at 1:45 PM, Rob Herring wrote: > Some gallium drivers have implemented reference counting of pipe_screen > to avoid creating multiple screens for a device. Move this into the > pipe-loader where it can be shared. > > Not completely sure, but it should not

[Mesa-dev] [RFC 2/7] pipe-loader-drm: Add common pipe_screen refcounting

2016-06-17 Thread Rob Herring
Some gallium drivers have implemented reference counting of pipe_screen to avoid creating multiple screens for a device. Move this into the pipe-loader where it can be shared. Not completely sure, but it should not necessary to dup() the fd as dri2_create_screen does that for us already.