From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 3/9] drm/i915: split intel_modeset_driver_remove() to pre/post irq uninstall
Date: Tue, 4 Feb 2020 16:46:58 +0200 [thread overview]
Message-ID: <20200204144658.GS13686@intel.com> (raw)
In-Reply-To: <99ec54fedc29b2cc24b1976fb99d6a696bfb58e3.1580823606.git.jani.nikula@intel.com>
On Tue, Feb 04, 2020 at 03:42:22PM +0200, Jani Nikula wrote:
> 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>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 12 +++++-------
> drivers/gpu/drm/i915/display/intel_display.h | 1 +
> drivers/gpu/drm/i915/i915_drv.c | 5 +++++
> 3 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index b0af37fb6d4a..69d6fe626a19 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -18826,6 +18826,7 @@ static void intel_hpd_poll_fini(struct drm_i915_private *i915)
> drm_connector_list_iter_end(&conn_iter);
> }
>
> +/* part #1: call before irq uninstall */
> void intel_modeset_driver_remove(struct drm_i915_private *i915)
> {
> flush_workqueue(i915->flip_wq);
> @@ -18833,14 +18834,11 @@ void intel_modeset_driver_remove(struct drm_i915_private *i915)
>
> flush_work(&i915->atomic_helper.free_work);
> WARN_ON(!llist_empty(&i915->atomic_helper.free_list));
> +}
>
> - /*
> - * Interrupts and polling as the first thing to avoid creating havoc.
> - * Too much stuff here (turning of connectors, ...) would
> - * experience fancy races otherwise.
> - */
Maybe the comment should stay at the start of the _noirq() function?
Or maybe it's obvious now. Shrug.
> - intel_irq_uninstall(i915);
> -
> +/* part #2: call after irq uninstall */
> +void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915)
> +{
> /*
> * 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.
> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> index 75438a136d58..f92efbbec838 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.h
> +++ b/drivers/gpu/drm/i915/display/intel_display.h
> @@ -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);
> int intel_modeset_init(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_init_pch_refclk(struct drm_i915_private *dev_priv);
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 6ab2de82b5f7..5330a0f10e97 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -332,6 +332,9 @@ static int i915_driver_modeset_probe(struct drm_i915_private *i915)
> i915_gem_driver_release(i915);
> cleanup_modeset:
> intel_modeset_driver_remove(i915);
> + intel_irq_uninstall(i915);
> + intel_modeset_driver_remove_noirq(i915);
> + goto cleanup_csr;
> cleanup_irq:
> intel_irq_uninstall(i915);
> cleanup_csr:
> @@ -348,6 +351,8 @@ static void i915_driver_modeset_remove(struct drm_i915_private *i915)
A bit funny with the naming of driver_modeset_remove() vs.
modeset_driver_remove(). But that's already in there.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> intel_irq_uninstall(i915);
>
> + intel_modeset_driver_remove_noirq(i915);
> +
> intel_bios_driver_remove(i915);
>
> intel_vga_unregister(i915);
> --
> 2.20.1
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-02-04 14:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-04 13:42 [Intel-gfx] [PATCH 0/9] drm/i915: modeset probe/remove cleanup, again Jani Nikula
2020-02-04 13:42 ` [Intel-gfx] [PATCH 1/9] drm/i915: register vga switcheroo later, unregister earlier Jani Nikula
2020-02-04 13:42 ` [Intel-gfx] [PATCH 2/9] drm/i915: switch i915_driver_probe() to use i915 local variable Jani Nikula
2020-02-04 13:42 ` [Intel-gfx] [PATCH 3/9] drm/i915: split intel_modeset_driver_remove() to pre/post irq uninstall Jani Nikula
2020-02-04 14:46 ` Ville Syrjälä [this message]
2020-02-04 13:42 ` [Intel-gfx] [PATCH 4/9] drm/i915: split i915_driver_modeset_remove() " Jani Nikula
2020-02-04 14:49 ` Ville Syrjälä
2020-02-04 13:42 ` [Intel-gfx] [PATCH 5/9] drm/i915: split i915_driver_modeset_probe() to pre/post irq install Jani Nikula
2020-02-04 14:53 ` Ville Syrjälä
2020-02-04 13:42 ` [Intel-gfx] [PATCH 6/9] drm/i915: split intel_modeset_init() " Jani Nikula
2020-02-04 14:59 ` Ville Syrjälä
2020-02-04 13:42 ` [Intel-gfx] [PATCH 7/9] drm/i915: split intel_modeset_init() pre/post gem init Jani Nikula
2020-02-04 15:05 ` Ville Syrjälä
2020-02-04 13:42 ` [Intel-gfx] [PATCH 8/9] drm/i915: move more display related probe/remove stuff to display Jani Nikula
2020-02-04 15:11 ` Ville Syrjälä
2020-02-04 13:42 ` [Intel-gfx] [PATCH 9/9] drm/i915: remove the now redundant i915_driver_modeset_* call layer Jani Nikula
2020-02-04 15:16 ` Ville Syrjälä
2020-02-05 1:42 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: modeset probe/remove cleanup, again Patchwork
2020-02-05 2:05 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200204144658.GS13686@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.