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 3/4] drm/i915/irq: add ilk_de_irq_postinstall()
Date: Tue, 8 Aug 2023 17:02:07 -0400 [thread overview]
Message-ID: <ZNKtT96JfeN6J/pa@intel.com> (raw)
In-Reply-To: <f4a8570881e9be28a2406134b2898b8680f9e765.1691509966.git.jani.nikula@intel.com>
On Tue, Aug 08, 2023 at 06:53:30PM +0300, Jani Nikula wrote:
> Add a dedicated de postinstall function.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> .../gpu/drm/i915/display/intel_display_irq.c | 41 +++++++++++++++++++
> .../gpu/drm/i915/display/intel_display_irq.h | 1 +
> drivers/gpu/drm/i915/i915_irq.c | 38 +----------------
> 3 files changed, 43 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_irq.c b/drivers/gpu/drm/i915/display/intel_display_irq.c
> index a706ba740dd6..a697e0b32c34 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_irq.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_irq.c
> @@ -1583,6 +1583,47 @@ void valleyview_disable_display_irqs(struct drm_i915_private *dev_priv)
> vlv_display_irq_reset(dev_priv);
> }
>
> +void ilk_de_irq_postinstall(struct drm_i915_private *i915)
> +{
> + struct intel_uncore *uncore = &i915->uncore;
> + u32 display_mask, extra_mask;
> +
> + if (GRAPHICS_VER(i915) >= 7) {
> + display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE_IVB |
> + DE_PCH_EVENT_IVB | DE_AUX_CHANNEL_A_IVB);
> + extra_mask = (DE_PIPEC_VBLANK_IVB | DE_PIPEB_VBLANK_IVB |
> + DE_PIPEA_VBLANK_IVB | DE_ERR_INT_IVB |
> + DE_PLANE_FLIP_DONE_IVB(PLANE_C) |
> + DE_PLANE_FLIP_DONE_IVB(PLANE_B) |
> + DE_PLANE_FLIP_DONE_IVB(PLANE_A) |
> + DE_DP_A_HOTPLUG_IVB);
> + } else {
> + display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT |
> + DE_AUX_CHANNEL_A | DE_PIPEB_CRC_DONE |
> + DE_PIPEA_CRC_DONE | DE_POISON);
> + extra_mask = (DE_PIPEA_VBLANK | DE_PIPEB_VBLANK |
> + DE_PIPEB_FIFO_UNDERRUN | DE_PIPEA_FIFO_UNDERRUN |
> + DE_PLANE_FLIP_DONE(PLANE_A) |
> + DE_PLANE_FLIP_DONE(PLANE_B) |
> + DE_DP_A_HOTPLUG);
> + }
> +
> + if (IS_HASWELL(i915)) {
> + gen3_assert_iir_is_zero(uncore, EDP_PSR_IIR);
> + display_mask |= DE_EDP_PSR_INT_HSW;
> + }
> +
> + if (IS_IRONLAKE_M(i915))
> + extra_mask |= DE_PCU_EVENT;
> +
> + i915->irq_mask = ~display_mask;
> +
> + ibx_irq_postinstall(i915);
> +
> + GEN3_IRQ_INIT(uncore, DE, i915->irq_mask,
> + display_mask | extra_mask);
> +}
> +
> void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)
> {
> struct intel_uncore *uncore = &dev_priv->uncore;
> diff --git a/drivers/gpu/drm/i915/display/intel_display_irq.h b/drivers/gpu/drm/i915/display/intel_display_irq.h
> index ce190557826b..2ccc3e53cec3 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_irq.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_irq.h
> @@ -61,6 +61,7 @@ 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);
> void dg1_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 8c074643b6d1..d63f79259637 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -772,45 +772,9 @@ static void cherryview_irq_reset(struct drm_i915_private *dev_priv)
>
> static void ilk_irq_postinstall(struct drm_i915_private *dev_priv)
> {
> - struct intel_uncore *uncore = &dev_priv->uncore;
> - u32 display_mask, extra_mask;
> -
> - if (GRAPHICS_VER(dev_priv) >= 7) {
> - display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE_IVB |
> - DE_PCH_EVENT_IVB | DE_AUX_CHANNEL_A_IVB);
> - extra_mask = (DE_PIPEC_VBLANK_IVB | DE_PIPEB_VBLANK_IVB |
> - DE_PIPEA_VBLANK_IVB | DE_ERR_INT_IVB |
> - DE_PLANE_FLIP_DONE_IVB(PLANE_C) |
> - DE_PLANE_FLIP_DONE_IVB(PLANE_B) |
> - DE_PLANE_FLIP_DONE_IVB(PLANE_A) |
> - DE_DP_A_HOTPLUG_IVB);
> - } else {
> - display_mask = (DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT |
> - DE_AUX_CHANNEL_A | DE_PIPEB_CRC_DONE |
> - DE_PIPEA_CRC_DONE | DE_POISON);
> - extra_mask = (DE_PIPEA_VBLANK | DE_PIPEB_VBLANK |
> - DE_PIPEB_FIFO_UNDERRUN | DE_PIPEA_FIFO_UNDERRUN |
> - DE_PLANE_FLIP_DONE(PLANE_A) |
> - DE_PLANE_FLIP_DONE(PLANE_B) |
> - DE_DP_A_HOTPLUG);
> - }
> -
> - if (IS_HASWELL(dev_priv)) {
> - gen3_assert_iir_is_zero(uncore, EDP_PSR_IIR);
> - display_mask |= DE_EDP_PSR_INT_HSW;
> - }
> -
> - if (IS_IRONLAKE_M(dev_priv))
> - extra_mask |= DE_PCU_EVENT;
> -
> - dev_priv->irq_mask = ~display_mask;
> -
> - ibx_irq_postinstall(dev_priv);
> -
> gen5_gt_irq_postinstall(to_gt(dev_priv));
some minor change in the order here, but I don't believe that that
hurts. I thought that maybe a separated patch to bisect, but thinking
better this is not needed. if this patch causes problem likely it will
be this line anyway.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> - GEN3_IRQ_INIT(uncore, DE, dev_priv->irq_mask,
> - display_mask | extra_mask);
> + ilk_de_irq_postinstall(dev_priv);
> }
>
> static void valleyview_irq_postinstall(struct drm_i915_private *dev_priv)
> --
> 2.39.2
>
next prev parent reply other threads:[~2023-08-08 21:02 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 [this message]
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
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=ZNKtT96JfeN6J/pa@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