drm/i915: Use i915_global_register()
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Mar 2019 21:38:30 +0000 (21:38 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 6 Mar 2019 10:00:50 +0000 (10:00 +0000)
commit103b76eeff2e86cad489a54e6003d0173df76bde
treea33db60570ef59918a2b2fb9c62532c075e2844a
parentd846325ad0e5cd06f441299cdbec6ab8ba3a3c45
drm/i915: Use i915_global_register()

Rather than manually add every new global into each hook, use
i915_global_register() function and keep a list of registered globals to
invoke instead.

However, I haven't found a way for random drivers to add an .init table
to avoid having to manually add ourselves to i915_globals_init() each
time.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190305213830.18094-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
14 files changed:
drivers/gpu/drm/i915/i915_active.c
drivers/gpu/drm/i915/i915_active.h
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_gem_context.h
drivers/gpu/drm/i915/i915_gem_object.c
drivers/gpu/drm/i915/i915_gem_object.h
drivers/gpu/drm/i915/i915_globals.c
drivers/gpu/drm/i915/i915_globals.h
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/i915_request.h
drivers/gpu/drm/i915/i915_scheduler.c
drivers/gpu/drm/i915/i915_scheduler.h
drivers/gpu/drm/i915/i915_vma.c
drivers/gpu/drm/i915/i915_vma.h