Bug 17021

Summary: [REGRESSION] [2.6.36-rc1] [DRM INTEL] [drm:intel_calculate_wm] *ERROR* Insufficient FIFO for plane, expect flickering: entries required = 36, available = 28.
Product: Drivers Reporter: Maciej Rutecki (maciej.rutecki)
Component: Video(DRI - Intel)Assignee: drivers_video-dri-intel (drivers_video-dri-intel)
Status: CLOSED CODE_FIX    
Severity: normal CC: chris, florian, jirislaby, maciej.rutecki, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.36-rc1 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 16444    

Description Maciej Rutecki 2010-08-25 17:55:26 UTC
Subject    : [REGRESSION] [2.6.36-rc1] [DRM INTEL] [drm:intel_calculate_wm] *ERROR* Insufficient FIFO for plane, expect flickering: entries required = 36, available = 28.
Submitter  : Maciej Rutecki <maciej.rutecki@gmail.com>
Date       : 2010-08-18 18:46
Message-ID : 201008182046.37732.maciej.rutecki@gmail.com
References : http://marc.info/?l=linux-kernel&m=128215721507666&w=2

This entry is being used for tracking a regression from 2.6.35. Please don't
close it until the problem is fixed in the mainline.
Comment 1 Maciej Rutecki 2010-08-30 18:41:41 UTC
Still present on 2.6.36-rc3
Comment 2 Florian Mickler 2010-09-06 06:56:51 UTC
On Wed, 18 Aug 2010 20:13:12 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> On Wed, 18 Aug 2010 20:46:37 +0200, Maciej Rutecki <maciej.rutecki@gmail.com>
> wrote:
> > Last known good: 2.6.35
> > Failing kernel: 2.6.36-rc1
> > 
> > During boot kernel display this message:
> > [    0.831906] [drm:intel_calculate_wm] *ERROR* Insufficient FIFO for
> plane, 
> > expect flickering: entries required = 36, available = 28.
> 
> To be honest, I was shocked at how often we were actually computing that
> we required a larger FIFO for scanout than was available. Typically, it is
> the result of the pessimistic latency we guess for the memory fetch and so
> we err on the side of extreme caution when computing the watermark. So in
> effect, we have been clamping the FIFO since the beginning, but we only
> just added the warning message as an aide to diagnosing some FIFO
> underruns. We could tone down the error message, the real goal though is
> to improve the accuracy of the calculation and thereby reduce power.
> 
> > Systems seems work OK, but in 2.6.35 I don't have this message. On another 
> > system with 2.6.36-rc1 kernel I have the same message.
> 
> Yes, there was just a couple of places where we changed the calculation to
> round-up but otherwise the wm logic remained mostly the same. So if you
> haven't been experiencing FIFO underruns, e.g. the screen flickering, then
> it is likely that the error is benign (and just wasting power).
> 


So, is this something that should be ignored? Should this message be silenced for an officially released kernel? Is it actively useful to have in the dmesg? 

Perhaps some stats in debugfs/sysfs/procfs that you could hook powertop up to would be better?
Comment 3 Chris Wilson 2010-09-06 07:28:56 UTC
Right, the flicker is annoying and obvious when it happens. So just exporting the watermarks in debugfs would be a simple sanity check for bug reporters.
Comment 4 Chris Wilson 2010-09-08 08:21:21 UTC
I've queued:

commit c3add4b63438555d5e88c5893d238ab80d1f5959
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Sep 8 09:14:08 2010 +0100

    Revert "drm/i915: Warn if we run out of FIFO space for a mode"
    
    This reverts commit b9421ae8f30958deea98d71477b4a77a066856b4.
    
    This warning was so prelevant, even for apparently working machines,
    that it was just causing fear, anxiety and panic.
    
    The root cause still remains, so we will add some better debugging when
    we focus on fixing it.
    
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=17021
    Reported-by: Maciej Rutecki <maciej.rutecki@gmail.com>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 5 Rafael J. Wysocki 2010-09-12 18:02:56 UTC
Fixed by commit c3add4b63438555d5e88c5893d238ab80d1f5959 .