]> 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)
commit08d54256fa7f3b5da3fba3e46b70292ccf5ca68c
treeff562ec6e857c83ad3da63871ee5a7885284c2ce
parent813ba989df5906453d707aec8d9b6c53777c3f78
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