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

2020-11-08 Thread Deepak R Varma
On Fri, Nov 06, 2020 at 11:52:49AM +0100, Maxime Ripard wrote: > On Thu, Nov 05, 2020 at 01:24:14PM -0800, Eric Anholt wrote: > > On Thu, Nov 5, 2020 at 12:21 PM Deepak R Varma wrote: > > > > > > idr_init() uses base 0 which is an invalid identifier for this driver. > > > The idr_alloc for this dr

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

2020-11-08 Thread Maxime Ripard
On Thu, Nov 05, 2020 at 01:24:14PM -0800, Eric Anholt wrote: > On Thu, Nov 5, 2020 at 12:21 PM 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 #de

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

2020-11-06 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

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

2020-11-05 Thread Eric Anholt
On Thu, Nov 5, 2020 at 12:21 PM 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 l