Re: [Intel-gfx] [PATCH] drm: Use idr_init_base(1) when using id==0 for invalid

2018-02-19 Thread Daniel Vetter
On Mon, Feb 19, 2018 at 02:35:38PM +, Chris Wilson wrote: > Quoting Christian König (2018-02-13 13:48:24) > > Am 12.02.2018 um 18:14 schrieb Ville Syrjälä: > > > On Mon, Feb 12, 2018 at 02:55:33PM +, Chris Wilson wrote: > > >> Use the new idr_init_base() function to create an IDR that knows

Re: [Intel-gfx] [PATCH] drm: Use idr_init_base(1) when using id==0 for invalid

2018-02-19 Thread Chris Wilson
Quoting Christian König (2018-02-13 13:48:24) > Am 12.02.2018 um 18:14 schrieb Ville Syrjälä: > > On Mon, Feb 12, 2018 at 02:55:33PM +, Chris Wilson wrote: > >> Use the new idr_init_base() function to create an IDR that knows id==0 > >> is never allocated as it maps to an invalid identifier. By

Re: [Intel-gfx] [PATCH] drm: Use idr_init_base(1) when using id==0 for invalid

2018-02-13 Thread Christian König
Am 12.02.2018 um 18:14 schrieb Ville Syrjälä: On Mon, Feb 12, 2018 at 02:55:33PM +, Chris Wilson wrote: Use the new idr_init_base() function to create an IDR that knows id==0 is never allocated as it maps to an invalid identifier. By knowing that id==0 is invalid, the IDR can start from id=1

Re: [Intel-gfx] [PATCH] drm: Use idr_init_base(1) when using id==0 for invalid

2018-02-12 Thread Ville Syrjälä
On Mon, Feb 12, 2018 at 02:55:33PM +, Chris Wilson wrote: > Use the new idr_init_base() function to create an IDR that knows id==0 > is never allocated as it maps to an invalid identifier. By knowing that > id==0 is invalid, the IDR can start from id=1 instead avoiding the issue > of having to

[Intel-gfx] [PATCH] drm: Use idr_init_base(1) when using id==0 for invalid

2018-02-12 Thread Chris Wilson
Use the new idr_init_base() function to create an IDR that knows id==0 is never allocated as it maps to an invalid identifier. By knowing that id==0 is invalid, the IDR can start from id=1 instead avoiding the issue of having to start each lookup from the zeroth leaf as id==0 is always unused (and