All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: fix errata for sync flush enable on 845G/830M
Date: Sun,  8 Aug 2010 19:39:40 +0100	[thread overview]
Message-ID: <1281292780-28200-1-git-send-email-chris@chris-wilson.co.uk> (raw)

From: Zhenyu Wang <zhenyuw@linux.intel.com>

The sync flush enable mask on 845G and 830M is flipped.
So driver should invert it usage.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_dma.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index f19ffe8..4b6c2f8 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1356,6 +1356,7 @@ static int i915_load_modeset_init(struct drm_device *dev,
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	int fb_bar = IS_I9XX(dev) ? 2 : 0;
+	u32 instpm_val;
 	int ret = 0;
 
 	dev->mode_config.fb_base = pci_resource_start(dev->pdev, fb_bar) &
@@ -1432,9 +1433,14 @@ static int i915_load_modeset_init(struct drm_device *dev,
 
 	/*
 	 * Initialize the hardware status page IRQ location.
+	 * errata: on 845G and 830M, bit 21's polarity is reversed,
+	 * so the usage is inverted.
 	 */
-
-	I915_WRITE(INSTPM, (1 << 5) | (1 << 21));
+	if (IS_845G(dev) || IS_I830(dev))
+	    instpm_val = (1 << 5) | (0 << 21);
+	else
+	    instpm_val = (1 << 5) | (1 << 21);
+	I915_WRITE(INSTPM, instpm_val);
 
 	ret = intel_fbdev_init(dev);
 	if (ret)
-- 
1.7.1

             reply	other threads:[~2010-08-08 18:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-08 18:39 Chris Wilson [this message]
2010-08-09 16:45 ` [PATCH] drm/i915: fix errata for sync flush enable on 845G/830M Jesse Barnes
2010-08-09 17:04   ` Chris Wilson
2010-08-09 21:10     ` Eric Anholt

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=1281292780-28200-1-git-send-email-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --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.