Based on Chris Wilson's patch from 6 months ago, rebased and adapted. The idea is to use ring->dev as an indicator showing which engines have been initialised and are therefore to be included in iterations that use for_each_ring(). This allows us to avoid multiple memory references and a (non-inlined) function call on each iteration of each such loop. This version differs from Chris' primarily in the error cleanup paths, where initialisation has failed and we therefore want to mark an engine as NOT initialised. I have made the ring_cleanup() functions callable from the failure path of the ring_init() code, rather than duplicating all the steps to tear down a partially-constructed state. This also increases symmetry; ring->dev is set at the start of ring_init, and cleared at the end of ring_cleanup, in both the normal and error cases. _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx