Skip to content
Commit 64e65f44 authored by Deepak R Varma's avatar Deepak R Varma Committed by Zhenyu Wang
Browse files

drm/i915/gvt: replace idr_init() by idr_init_base()



idr_init() uses base 0 which is an invalid identifier. The new function
idr_init_base allows IDR to set the ID lookup from base 1. This avoids
all lookups that otherwise starts from 0 since 0 is always unused.

References: commit 6ce711f2 ("idr: Make 1-based IDRs more efficient")

Reviewed-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: default avatarDeepak R Varma <mh12gx2825@gmail.com>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20201104121532.GA48202@localhost
parent a5a8ef93
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment