Commit 2d6f6f35 authored by Jani Nikula's avatar Jani Nikula

drm/i915: add i915_driver_modeset_remove()

For completeness, add counterpart to i915_driver_modeset_probe() and
remove the asymmetry in the probe/remove parts. No functional changes.
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190920185421.17822-1-jani.nikula@intel.com
parent 87c16945
...@@ -447,6 +447,20 @@ static int i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv) ...@@ -447,6 +447,20 @@ static int i915_kick_out_firmware_fb(struct drm_i915_private *dev_priv)
return ret; return ret;
} }
static void i915_driver_modeset_remove(struct drm_i915_private *i915)
{
struct pci_dev *pdev = i915->drm.pdev;
intel_modeset_driver_remove(&i915->drm);
intel_bios_driver_remove(i915);
vga_switcheroo_unregister_client(pdev);
vga_client_register(pdev, NULL, NULL, NULL);
intel_csr_ucode_fini(i915);
}
static void intel_init_dpio(struct drm_i915_private *dev_priv) static void intel_init_dpio(struct drm_i915_private *dev_priv)
{ {
/* /*
...@@ -1623,8 +1637,6 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -1623,8 +1637,6 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
void i915_driver_remove(struct drm_i915_private *i915) void i915_driver_remove(struct drm_i915_private *i915)
{ {
struct pci_dev *pdev = i915->drm.pdev;
disable_rpm_wakeref_asserts(&i915->runtime_pm); disable_rpm_wakeref_asserts(&i915->runtime_pm);
i915_driver_unregister(i915); i915_driver_unregister(i915);
...@@ -1645,14 +1657,7 @@ void i915_driver_remove(struct drm_i915_private *i915) ...@@ -1645,14 +1657,7 @@ void i915_driver_remove(struct drm_i915_private *i915)
intel_gvt_driver_remove(i915); intel_gvt_driver_remove(i915);
intel_modeset_driver_remove(&i915->drm); i915_driver_modeset_remove(i915);
intel_bios_driver_remove(i915);
vga_switcheroo_unregister_client(pdev);
vga_client_register(pdev, NULL, NULL, NULL);
intel_csr_ucode_fini(i915);
/* Free error state after interrupts are fully disabled. */ /* Free error state after interrupts are fully disabled. */
cancel_delayed_work_sync(&i915->gt.hangcheck.work); cancel_delayed_work_sync(&i915->gt.hangcheck.work);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment