Bug 42839

Summary: drm/i915: wrong fifo size due to uncareful refactoring which results in an xserver crash at 800x600
Product: Drivers Reporter: Lukas Anzinger (l.anzinger)
Component: Video(DRI - Intel)Assignee: drivers_video-dri-intel (drivers_video-dri-intel)
Status: RESOLVED CODE_FIX    
Severity: normal CC: chris, jrnieder
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.33.20 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: Fix wrong fifo size regression

Description Lukas Anzinger 2012-02-29 13:08:21 UTC
Created attachment 72498 [details]
Fix wrong fifo size regression

Hi,

I've encountered a nasty bug in the drm/i915 part of Debian's stable kernel. The code is also present in 2.6.33.20, which is the latest stable upstream release of 2.6.33.y at the time of writing.

During a refactoring of the i915 driver a regression has been introduced (commit 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.

Regards,

Lukas
Comment 1 Chris Wilson 2012-02-29 14:21:20 UTC
commit 8f4695ed1c9e068772bcce4cd4ff03f88d57a008
Author: Adam Jackson <ajax@redhat.com>
Date:   Fri Apr 16 18:20:57 2010 -0400

    drm/i915: Attempt to fix watermark setup on 85x (v2)
    
    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>

Please test that and then send it to stable@kernel.org, adding your Reported-and-tested-by and Bugzilla reference.
Comment 2 Lukas Anzinger 2012-03-02 11:56:51 UTC
Hi,

looks good to me. I opt for inclusion in the 2.6.33.y branch.

Regards,

Lukas
Comment 3 Jonathan Nieder 2012-06-26 04:16:21 UTC
References: http://bugs.debian.org/661696