[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#661696: drm/i915: wrong fifo size due to uncareful refactoring which results in an xserver crash at 800x600



tags 661696 = upstream patch moreinfo
quit

Hi Lukas,

Lukas Anzinger wrote:

> During a refactoring of the i915 driver a regression has been introduced
> ([...]h=e70236a8d3d0a4c100a0b9f7d394d9bda9c56aca): For some chipsets
> the wrong fifo size is determined which results in lot's of pixel
> errors when starting the xserver and choosing 800x600 as a
> resolution. If another resolution is used (eg. 1024x768 or
> 1280x1024), I don't encounter this problem.
>
> I've attached a patch that fixes the problem (no pixel errors
> anymore) and determines the correct fifo size.

Thanks for the report and analysis.  Please test the attached patch
against 2.6.32.y or a squeeze kernel.  If it works, we can send this
to Greg for inclusion in the 2.6.32.y series so everyone benefits.

Hope that helps,
Jonathan
From: Adam Jackson <ajax@redhat.com>
Date: Fri, 16 Apr 2010 18:20:57 -0400
Subject: drm/i915: Attempt to fix watermark setup on 85x (v2)

commit 8f4695ed1c9e068772bcce4cd4ff03f88d57a008 upstream.

IS_MOBILE() catches 85x, so we'd always try to use the 9xx FIFO sizing;
since there's an explicit 85x version, this seems wrong.

v2: Handle 830m correctly too.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 drivers/gpu/drm/i915/intel_display.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 79cc437af3b8..25b3e903c67c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4355,17 +4355,18 @@ static void intel_init_display(struct drm_device *dev)
 		dev_priv->display.update_wm = g4x_update_wm;
 	else if (IS_I965G(dev))
 		dev_priv->display.update_wm = i965_update_wm;
-	else if (IS_I9XX(dev) || IS_MOBILE(dev)) {
+	else if (IS_I9XX(dev)) {
 		dev_priv->display.update_wm = i9xx_update_wm;
 		dev_priv->display.get_fifo_size = i9xx_get_fifo_size;
+	} else if (IS_I85X(dev)) {
+		dev_priv->display.update_wm = i9xx_update_wm;
+		dev_priv->display.get_fifo_size = i85x_get_fifo_size;
 	} else {
-		if (IS_I85X(dev))
-			dev_priv->display.get_fifo_size = i85x_get_fifo_size;
-		else if (IS_845G(dev))
+		dev_priv->display.update_wm = i830_update_wm;
+		if (IS_845G(dev))
 			dev_priv->display.get_fifo_size = i845_get_fifo_size;
 		else
 			dev_priv->display.get_fifo_size = i830_get_fifo_size;
-		dev_priv->display.update_wm = i830_update_wm;
 	}
 }
 
-- 
1.7.9.2


Reply to: