On Tue, Sep 15, 2015 at 08:01:14PM +0200, Michał Winiarski wrote:
> +void i915_address_space_init(struct drm_device *dev,
> + struct i915_address_space *vm)
> +{
> + struct drm_i915_private *dev_priv = dev->dev_private;
> +
> + drm_mm_init(&vm->mm, vm->start, vm->total);
> + vm->dev = dev;
> + INIT_LIST_HEAD(&vm->active_list);
> + INIT_LIST_HEAD(&vm->inactive_list);
> + INIT_LIST_HEAD(&vm->global_link);
> + list_add_tail(&vm->global_link, &dev_priv->vm_list);
> +}
Having done all that work, it can now be static. It is an internal
function so pass around drm_i915_private, and if we follow our oop then
the object (struct i915_address_space) should be the first parameter.
Also on my hit list is s/vm->dev/vm->i915/ so we can drop lots of
pointless pointer dancing.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx