All of lore.kernel.org
 help / color / mirror / Atom feed
From: "José Roberto de Souza" <jose.souza@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 5/7] drm/i915/bdw+: Move misc display IRQ handling to it own function
Date: Wed,  3 Apr 2019 16:35:37 -0700	[thread overview]
Message-ID: <20190403233539.31828-5-jose.souza@intel.com> (raw)
In-Reply-To: <20190403233539.31828-1-jose.souza@intel.com>

Just moving it to reduce the tabs and avoid break code lines.
No behavior changes intended here.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/i915_irq.c | 63 +++++++++++++++++++--------------
 1 file changed, 36 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index aa107a78cb36..527d5cb21baa 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2702,41 +2702,50 @@ static u32 gen8_de_port_aux_mask(struct drm_i915_private *dev_priv)
 	return mask;
 }
 
-static irqreturn_t
-gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
+static enum irqreturn
+gen8_de_misc_irq_handler(struct drm_i915_private *dev_priv)
 {
-	irqreturn_t ret = IRQ_NONE;
-	u32 iir;
-	enum pipe pipe;
+	u32 iir = I915_READ(GEN8_DE_MISC_IIR);
+	enum irqreturn ret = IRQ_NONE;
+	bool found = false;
 
-	if (master_ctl & GEN8_DE_MISC_IRQ) {
-		iir = I915_READ(GEN8_DE_MISC_IIR);
-		if (iir) {
-			bool found = false;
-
-			I915_WRITE(GEN8_DE_MISC_IIR, iir);
-			ret = IRQ_HANDLED;
+	if (!iir) {
+		DRM_ERROR("The master control interrupt lied (DE MISC)!\n");
+		return ret;
+	}
 
-			if (iir & GEN8_DE_MISC_GSE) {
-				intel_opregion_asle_intr(dev_priv);
-				found = true;
-			}
+	I915_WRITE(GEN8_DE_MISC_IIR, iir);
+	ret = IRQ_HANDLED;
 
-			if (iir & GEN8_DE_EDP_PSR) {
-				u32 psr_iir = I915_READ(EDP_PSR_IIR);
+	if (iir & GEN8_DE_MISC_GSE) {
+		intel_opregion_asle_intr(dev_priv);
+		found = true;
+	}
 
-				intel_psr_irq_handler(dev_priv, psr_iir);
-				I915_WRITE(EDP_PSR_IIR, psr_iir);
-				found = true;
-			}
+	if (iir & GEN8_DE_EDP_PSR) {
+		u32 psr_iir = I915_READ(EDP_PSR_IIR);
 
-			if (!found)
-				DRM_ERROR("Unexpected DE Misc interrupt\n");
-		}
-		else
-			DRM_ERROR("The master control interrupt lied (DE MISC)!\n");
+		intel_psr_irq_handler(dev_priv, psr_iir);
+		I915_WRITE(EDP_PSR_IIR, psr_iir);
+		found = true;
 	}
 
+	if (!found)
+		DRM_ERROR("Unexpected DE Misc interrupt\n");
+
+	return ret;
+}
+
+static irqreturn_t
+gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
+{
+	irqreturn_t ret = IRQ_NONE;
+	u32 iir;
+	enum pipe pipe;
+
+	if (master_ctl & GEN8_DE_MISC_IRQ)
+		ret = gen8_de_misc_irq_handler(dev_priv);
+
 	if (INTEL_GEN(dev_priv) >= 11 && (master_ctl & GEN11_DE_HPD_IRQ)) {
 		iir = I915_READ(GEN11_DE_HPD_IIR);
 		if (iir) {
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-04-03 23:35 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 23:35 [PATCH 1/7] drm/i915/psr: Update PSR2 SU corruption workaround comment José Roberto de Souza
2019-04-03 23:35 ` [PATCH 2/7] drm/i915: Remove unused VLV/CHV PSR registers José Roberto de Souza
2019-04-04  0:22   ` Rodrigo Vivi
2019-04-03 23:35 ` [PATCH 3/7] drm/i915/psr: Initialize PSR mutex even when sink is not reliable José Roberto de Souza
2019-04-04  0:27   ` Rodrigo Vivi
2019-04-04 19:25     ` Souza, Jose
2019-04-04 23:22       ` Rodrigo Vivi
2019-04-05  0:22   ` Dhinakaran Pandiyan
2019-04-05  0:32     ` Souza, Jose
2019-04-05  0:45       ` Dhinakaran Pandiyan
2019-04-03 23:35 ` [PATCH 4/7] drm/i915/psr: Do not enable PSR in interlaced mode for all GENs José Roberto de Souza
2019-04-04  0:29   ` Rodrigo Vivi
2019-04-04 22:02     ` Dhinakaran Pandiyan
2019-04-03 23:35 ` José Roberto de Souza [this message]
2019-04-05  0:38   ` [PATCH 5/7] drm/i915/bdw+: Move misc display IRQ handling to it own function Dhinakaran Pandiyan
2019-04-03 23:35 ` [PATCH 6/7] drm/i915/psr: Remove partial PSR support on multiple transcoders José Roberto de Souza
2019-04-04  0:31   ` Rodrigo Vivi
2019-04-04 19:40     ` Souza, Jose
2019-04-04 21:20       ` Rodrigo Vivi
2019-04-04 21:41         ` Pandiyan, Dhinakaran
2019-04-04 21:51           ` Rodrigo Vivi
2019-04-04 22:19             ` Souza, Jose
2019-04-04 22:06           ` Dhinakaran Pandiyan
2019-04-03 23:35 ` [PATCH 7/7] drm/i915: Make PSR registers relative to transcoders José Roberto de Souza
2019-04-06  0:55   ` Dhinakaran Pandiyan
2019-04-06  1:05     ` Souza, Jose
2019-04-03 23:43 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] drm/i915/psr: Update PSR2 SU corruption workaround comment Patchwork
2019-04-03 23:46 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-04-04  0:04 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-04-04  0:22 ` [PATCH 1/7] " Rodrigo Vivi
2019-04-04  0:39   ` Runyan, Arthur J
2019-04-04  0:51     ` Rodrigo Vivi
2019-04-04 20:37 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] drm/i915/psr: Update PSR2 SU corruption workaround comment (rev2) Patchwork
2019-04-04 20:40 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-04-04 21:01 ` ✓ Fi.CI.BAT: success " Patchwork
2019-04-05 16:44 ` ✓ 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=20190403233539.31828-5-jose.souza@intel.com \
    --to=jose.souza@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.