Refine the intel gpgpu delete.
The intel gpgpu struct is destroyed when a new gpgpu struct needed. But in that time,
the command batch relative with the destroyed gpgpu may have not finish, and the resource
in gpgpu still used by gpgpu, can't be destroyed.
So, when delete a gpgpu, check the batch status, if have not complete, insert to list in intel driver,
and delete all finished gpgpu in that list.
V2: V1 assume all the gpgpu list would complete in order, but it is not true. The insert order in is the
gpgpu delete order, not the flush command batch order. So visit and delete all complete gpgpu in the list.
Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>