]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: register vga switcheroo later, unregister earlier
authorJani Nikula <jani.nikula@intel.com>
Tue, 11 Feb 2020 16:28:01 +0000 (18:28 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 13 Feb 2020 22:08:11 +0000 (00:08 +0200)
commit46edcdbdb6d885971b7b49a040053bd23f331f2c
treeff562ec6e857c83ad3da63871ee5a7885284c2ce
parent067dde902f711bfaf53d63bb94109a65fbdc8101
drm/i915: register vga switcheroo later, unregister earlier

Move vga switcheroo and dsm handler register later in
i915_driver_register(), and unregister in i915_driver_unregister(). The
dsm handler unregister is a nop, and is only added for completeness.

My unsubstantiated suspicion is that the vga switcheroo state change
would not work as early as we register the hooks currently. In any case
exposing the interfaces to the world only after we've got everything set
up seems prudent.

Also replace the error handling in vga switcheroo register with a simple
error message. This is done at the same time due to lack of error
propagation from i915_driver_register().

Cc: Lukas Wunner <lukas@wunner.de>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200211162802.16180-1-jani.nikula@intel.com
drivers/gpu/drm/i915/i915_drv.c