mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 09:48:07 +07:00
drm/i915: split intel_modeset_driver_remove() to pre/post irq uninstall
Split intel_modeset_driver_remove() to two, the part with working irqs before irq uninstall, and the part after irq uninstall. Move irq_unintall() closer to the layer it belongs. The error path in i915_driver_modeset_probe() looks obviously weird after this, but remains as good or broken as it ever was. No functional changes. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200214135058.7580-1-jani.nikula@intel.com
This commit is contained in:
parent
200452f1cb
commit
93a0ed6cc1
@ -18923,6 +18923,7 @@ static void intel_hpd_poll_fini(struct drm_i915_private *i915)
|
|||||||
drm_connector_list_iter_end(&conn_iter);
|
drm_connector_list_iter_end(&conn_iter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* part #1: call before irq uninstall */
|
||||||
void intel_modeset_driver_remove(struct drm_i915_private *i915)
|
void intel_modeset_driver_remove(struct drm_i915_private *i915)
|
||||||
{
|
{
|
||||||
flush_workqueue(i915->flip_wq);
|
flush_workqueue(i915->flip_wq);
|
||||||
@ -18930,14 +18931,11 @@ void intel_modeset_driver_remove(struct drm_i915_private *i915)
|
|||||||
|
|
||||||
flush_work(&i915->atomic_helper.free_work);
|
flush_work(&i915->atomic_helper.free_work);
|
||||||
WARN_ON(!llist_empty(&i915->atomic_helper.free_list));
|
WARN_ON(!llist_empty(&i915->atomic_helper.free_list));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/* part #2: call after irq uninstall */
|
||||||
* Interrupts and polling as the first thing to avoid creating havoc.
|
void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915)
|
||||||
* Too much stuff here (turning of connectors, ...) would
|
{
|
||||||
* experience fancy races otherwise.
|
|
||||||
*/
|
|
||||||
intel_irq_uninstall(i915);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Due to the hpd irq storm handling the hotplug work can re-arm the
|
* Due to the hpd irq storm handling the hotplug work can re-arm the
|
||||||
* poll handlers. Hence disable polling after hpd handling is shut down.
|
* poll handlers. Hence disable polling after hpd handling is shut down.
|
||||||
|
@ -616,6 +616,7 @@ intel_format_info_is_yuv_semiplanar(const struct drm_format_info *info,
|
|||||||
void intel_modeset_init_hw(struct drm_i915_private *i915);
|
void intel_modeset_init_hw(struct drm_i915_private *i915);
|
||||||
int intel_modeset_init(struct drm_i915_private *i915);
|
int intel_modeset_init(struct drm_i915_private *i915);
|
||||||
void intel_modeset_driver_remove(struct drm_i915_private *i915);
|
void intel_modeset_driver_remove(struct drm_i915_private *i915);
|
||||||
|
void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915);
|
||||||
void intel_display_resume(struct drm_device *dev);
|
void intel_display_resume(struct drm_device *dev);
|
||||||
void intel_init_pch_refclk(struct drm_i915_private *dev_priv);
|
void intel_init_pch_refclk(struct drm_i915_private *dev_priv);
|
||||||
|
|
||||||
|
@ -272,6 +272,9 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)
|
|||||||
i915_gem_driver_release(i915);
|
i915_gem_driver_release(i915);
|
||||||
cleanup_modeset:
|
cleanup_modeset:
|
||||||
intel_modeset_driver_remove(i915);
|
intel_modeset_driver_remove(i915);
|
||||||
|
intel_irq_uninstall(i915);
|
||||||
|
intel_modeset_driver_remove_noirq(i915);
|
||||||
|
goto cleanup_csr;
|
||||||
cleanup_irq:
|
cleanup_irq:
|
||||||
intel_irq_uninstall(i915);
|
intel_irq_uninstall(i915);
|
||||||
cleanup_csr:
|
cleanup_csr:
|
||||||
@ -288,6 +291,8 @@ static void i915_driver_modeset_remove(struct drm_i915_private *i915)
|
|||||||
|
|
||||||
intel_irq_uninstall(i915);
|
intel_irq_uninstall(i915);
|
||||||
|
|
||||||
|
intel_modeset_driver_remove_noirq(i915);
|
||||||
|
|
||||||
intel_bios_driver_remove(i915);
|
intel_bios_driver_remove(i915);
|
||||||
|
|
||||||
intel_vga_unregister(i915);
|
intel_vga_unregister(i915);
|
||||||
|
Loading…
Reference in New Issue
Block a user