Re: [PATCH] drm/vc4: replace idr_init() by idr_init_base()

2020-11-05 Thread Deepak R Varma
On Thu, Nov 05, 2020 at 11:25:11AM -0800, Eric Anholt wrote: > On Thu, Nov 5, 2020 at 10:25 AM Deepak R Varma wrote: > > > > idr_init() uses base 0 which is an invalid identifier for this driver. > > The idr_alloc for this driver uses VC4_PERFMONID_MIN as start value for > > ID range and it is

Re: [PATCH] drm/vc4: replace idr_init() by idr_init_base()

2020-11-05 Thread Eric Anholt
On Thu, Nov 5, 2020 at 10:25 AM Deepak R Varma wrote: > > idr_init() uses base 0 which is an invalid identifier for this driver. > The idr_alloc for this driver uses VC4_PERFMONID_MIN as start value for > ID range and it is #defined to 1. The new function idr_init_base allows > IDR to set the ID

[PATCH] drm/vc4: replace idr_init() by idr_init_base()

2020-11-05 Thread Deepak R Varma
idr_init() uses base 0 which is an invalid identifier for this driver. The idr_alloc for this driver uses VC4_PERFMONID_MIN as start value for ID range and it is #defined to 1. The new function idr_init_base allows IDR to set the ID lookup from base 1. This avoids all lookups that otherwise starts