From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 4/4] drm/i915/irq: move all PCH irq postinstall calls to display code
Date: Tue, 8 Aug 2023 17:06:47 -0400 [thread overview]
Message-ID: <ZNKuZ7Q9xhg6g8uB@intel.com> (raw)
In-Reply-To: <fe51744aec9e2f465caf0d699b8a15591859f89e.1691509966.git.jani.nikula@intel.com>
On Tue, Aug 08, 2023 at 06:53:31PM +0300, Jani Nikula wrote:
> Unify on making the calls from display code. Need to add an if ladder in
> gen8_de_irq_postinstall() for now, but the function looks like it could
> be overall be better split by platform. Something for the future.
>
> The display version check for mtp seems a bit suspect, but this matches
> current code.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> .../gpu/drm/i915/display/intel_display_irq.c | 19 ++++++++++++-------
> .../gpu/drm/i915/display/intel_display_irq.h | 2 --
> drivers/gpu/drm/i915/i915_irq.c | 8 --------
> 3 files changed, 12 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_irq.c b/drivers/gpu/drm/i915/display/intel_display_irq.c
> index a697e0b32c34..62ce55475554 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_irq.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_irq.c
> @@ -1537,7 +1537,7 @@ void gen8_irq_power_well_pre_disable(struct drm_i915_private *dev_priv,
> * to avoid races with the irq handler, assuming we have MSI. Shared legacy
> * interrupts could still race.
> */
> -void ibx_irq_postinstall(struct drm_i915_private *dev_priv)
> +static void ibx_irq_postinstall(struct drm_i915_private *dev_priv)
> {
> struct intel_uncore *uncore = &dev_priv->uncore;
> u32 mask;
> @@ -1624,6 +1624,9 @@ void ilk_de_irq_postinstall(struct drm_i915_private *i915)
> display_mask | extra_mask);
> }
>
> +static void mtp_irq_postinstall(struct drm_i915_private *i915);
> +static void icp_irq_postinstall(struct drm_i915_private *i915);
thanks for doing that... made review easier, although this patch almost got me
confused.
maybe worth a follow up to change the functions placement and void this
extra declaration and also ensure they are all together?
anyway,
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> +
> void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
> {
> struct intel_uncore *uncore = &dev_priv->uncore;
> @@ -1641,6 +1644,13 @@ void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
> if (!HAS_DISPLAY(dev_priv))
> return;
>
> + if (DISPLAY_VER(dev_priv) >= 14)
> + mtp_irq_postinstall(dev_priv);
> + else if (INTEL_PCH_TYPE(dev_priv) >= PCH_ICP)
> + icp_irq_postinstall(dev_priv);
> + else if (HAS_PCH_SPLIT(dev_priv))
> + ibx_irq_postinstall(dev_priv);
> +
> if (DISPLAY_VER(dev_priv) <= 10)
> de_misc_masked |= GEN8_DE_MISC_GSE;
>
> @@ -1721,7 +1731,7 @@ static void mtp_irq_postinstall(struct drm_i915_private *i915)
> GEN3_IRQ_INIT(uncore, SDE, ~sde_mask, 0xffffffff);
> }
>
> -void icp_irq_postinstall(struct drm_i915_private *dev_priv)
> +static void icp_irq_postinstall(struct drm_i915_private *dev_priv)
> {
> struct intel_uncore *uncore = &dev_priv->uncore;
> u32 mask = SDE_GMBUS_ICP;
> @@ -1745,11 +1755,6 @@ void dg1_de_irq_postinstall(struct drm_i915_private *i915)
> if (!HAS_DISPLAY(i915))
> return;
>
> - if (DISPLAY_VER(i915) >= 14)
> - mtp_irq_postinstall(i915);
> - else
> - icp_irq_postinstall(i915);
> -
> gen8_de_irq_postinstall(i915);
> intel_uncore_write(&i915->uncore, GEN11_DISPLAY_INT_CTL,
> GEN11_DISPLAY_IRQ_ENABLE);
> diff --git a/drivers/gpu/drm/i915/display/intel_display_irq.h b/drivers/gpu/drm/i915/display/intel_display_irq.h
> index 2ccc3e53cec3..2a090dd6abd7 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_irq.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_irq.h
> @@ -58,9 +58,7 @@ void vlv_display_irq_reset(struct drm_i915_private *i915);
> void gen8_display_irq_reset(struct drm_i915_private *i915);
> void gen11_display_irq_reset(struct drm_i915_private *i915);
>
> -void ibx_irq_postinstall(struct drm_i915_private *i915);
> void vlv_display_irq_postinstall(struct drm_i915_private *i915);
> -void icp_irq_postinstall(struct drm_i915_private *i915);
> void ilk_de_irq_postinstall(struct drm_i915_private *i915);
> void gen8_de_irq_postinstall(struct drm_i915_private *i915);
> void gen11_de_irq_postinstall(struct drm_i915_private *i915);
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index d63f79259637..1bfcfbe6e30b 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -792,11 +792,6 @@ static void valleyview_irq_postinstall(struct drm_i915_private *dev_priv)
>
> static void gen8_irq_postinstall(struct drm_i915_private *dev_priv)
> {
> - if (INTEL_PCH_TYPE(dev_priv) >= PCH_ICP)
> - icp_irq_postinstall(dev_priv);
> - else if (HAS_PCH_SPLIT(dev_priv))
> - ibx_irq_postinstall(dev_priv);
> -
> gen8_gt_irq_postinstall(to_gt(dev_priv));
> gen8_de_irq_postinstall(dev_priv);
>
> @@ -809,9 +804,6 @@ static void gen11_irq_postinstall(struct drm_i915_private *dev_priv)
> struct intel_uncore *uncore = gt->uncore;
> u32 gu_misc_masked = GEN11_GU_MISC_GSE;
>
> - if (INTEL_PCH_TYPE(dev_priv) >= PCH_ICP)
> - icp_irq_postinstall(dev_priv);
> -
> gen11_gt_irq_postinstall(gt);
> gen11_de_irq_postinstall(dev_priv);
>
> --
> 2.39.2
>
next prev parent reply other threads:[~2023-08-08 21:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 15:53 [Intel-gfx] [PATCH 0/4] drm/i915/irq: cleanups Jani Nikula
2023-08-08 15:53 ` [Intel-gfx] [PATCH 1/4] drm/i915/irq: add dedicated intel_display_irq_init() Jani Nikula
2023-08-08 20:58 ` Rodrigo Vivi
2023-08-08 15:53 ` [Intel-gfx] [PATCH 2/4] drm/i915/irq: add dg1_de_irq_postinstall() Jani Nikula
2023-08-08 21:00 ` Rodrigo Vivi
2023-08-08 15:53 ` [Intel-gfx] [PATCH 3/4] drm/i915/irq: add ilk_de_irq_postinstall() Jani Nikula
2023-08-08 21:02 ` Rodrigo Vivi
2023-08-08 15:53 ` [Intel-gfx] [PATCH 4/4] drm/i915/irq: move all PCH irq postinstall calls to display code Jani Nikula
2023-08-08 21:06 ` Rodrigo Vivi [this message]
2023-08-10 12:24 ` Jani Nikula
2023-08-08 19:11 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/irq: cleanups Patchwork
2023-08-08 19:11 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-08 19:23 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-09 5:34 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-08-09 11:30 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/irq: cleanups (rev2) Patchwork
2023-08-09 11:30 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-08-09 11:44 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-08-10 11:00 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=ZNKuZ7Q9xhg6g8uB@intel.com \
--to=rodrigo.vivi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox