From: Wang Elaine <elaine.wang@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Elaine Wang <elaine.wang@intel.com>
Subject: [PATCH v2] drm/i915: Respect num_pipes when install or reset dispaly IRQ
Date: Fri, 9 Dec 2016 18:01:11 +0800 [thread overview]
Message-ID: <1481277671-23170-1-git-send-email-elaine.wang@intel.com> (raw)
From: Elaine Wang <elaine.wang@intel.com>
Some platforms don't have display. To avoid accessing the
non-existent registers, check whether num_pipes isn't zero
before invoking dispaly IRQ install or reset function.
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Elaine Wang <elaine.wang@intel.com>
---
drivers/gpu/drm/i915/i915_irq.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 0b119b9..81c6f45 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2990,8 +2990,10 @@ static void gen8_irq_reset(struct drm_device *dev)
POWER_DOMAIN_PIPE(pipe)))
GEN8_IRQ_RESET_NDX(DE_PIPE, pipe);
- GEN5_IRQ_RESET(GEN8_DE_PORT_);
- GEN5_IRQ_RESET(GEN8_DE_MISC_);
+ if (INTEL_INFO(dev_priv)->num_pipes) {
+ GEN5_IRQ_RESET(GEN8_DE_PORT_);
+ GEN5_IRQ_RESET(GEN8_DE_MISC_);
+ }
GEN5_IRQ_RESET(GEN8_PCU_);
if (HAS_PCH_SPLIT(dev_priv))
@@ -3414,7 +3416,9 @@ static int gen8_irq_postinstall(struct drm_device *dev)
ibx_irq_pre_postinstall(dev);
gen8_gt_irq_postinstall(dev_priv);
- gen8_de_irq_postinstall(dev_priv);
+
+ if (INTEL_INFO(dev_priv)->num_pipes)
+ gen8_de_irq_postinstall(dev_priv);
if (HAS_PCH_SPLIT(dev_priv))
ibx_irq_postinstall(dev);
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2016-12-09 10:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 10:01 Wang Elaine [this message]
2016-12-09 10:52 ` ✗ Fi.CI.BAT: warning for drm/i915: Respect num_pipes when install or reset dispaly IRQ Patchwork
2016-12-15 9:59 ` Wang, Elaine
2016-12-09 15:45 ` [PATCH v2] " Joonas Lahtinen
2016-12-09 15:52 ` Chris Wilson
2016-12-12 6:39 ` Wang, Elaine
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=1481277671-23170-1-git-send-email-elaine.wang@intel.com \
--to=elaine.wang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox