public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Thomas Richter <thor@math.tu-berlin.de>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] Added a lower limit for the watermark setting
Date: Wed, 20 Nov 2013 11:50:35 +0100	[thread overview]
Message-ID: <528C93FB.7080508@math.tu-berlin.de> (raw)
In-Reply-To: <24336_1384939634_528C8071_24336_18909_1_CAKMK7uH2VXy05gW7yCpkzUCe9nO+e9XU+jYEq8RaNKOXj4G2iw@mail.gmail.com>

Am 20.11.2013 10:27, schrieb Daniel Vetter:
> What I've meant to say is that I want to split up the watermark code
> more anyway, so that there's no need to fill in the 0 all over the
> place where we don't care one bit. I.e. all the gen4+ platforms.

Ok - well, I guess I cannot judge whether that's necessary or required. 
Given that the i830 is the only chipset
that comes with a unified FIFO, it might be actually necessary.
>
>>> I've pushed out my current (and rather broken) wip branch with my idea on
>>> the take to
>>>
>>> http://cgit.freedesktop.org/~danvet/drm/log/?h=for-thomas
>>
>> Could you please help me here how to apply it? I'm not very experienced with
>> git, and it does not seem to fit to the sources of
>> intel_pm.c I have. Do I first need to instruct git to download another
>> branch? I'm currently at drm-intel-nightly.
> It's more just to read through the patches for ideas. Atm the branch
> doesn't even compile - I'll try to clean it up and beat it into shape
> in the next few days. The core idea is to have a minimal wm of 4
> (lowest burst setting) and then set the actual burst setting to the
> watermark rounded down to the next multiple of 4, up to the
> recommended value in Bspec (which is 16 fifo cachelines). But I've
> fumbled the job a bit and broke a few things ;-)

Ah, that explains something, thank you. Probably two things: The way how the
current code is organized, the wm handling of the i830 is handled in two 
functions,
not one. In i830_update_wm and i9xx_update_wm. The former seems to be 
used during bootstrap
when only one pipe is active, the latter as soon as I activate the 
second pipe. This is probably needlessly
complex, and it would be better to have this just in one place, not two 
(found that when manually
adding a lower limit as first attempt).

The second is concerned the lower limit: Four is not enough, six gives a 
"reasonably stable image" most the time,
but if scrolling wildly, still some hickups. Eight is better, but still 
not perfect. If you try really, really hard, one can
still provoke a crash if a video overlay is active. Unclear why this is 
- if it happens, the screen seems to go blank for
just one frame, then recovers. Given that the plane pointers are only 
shadow registers that are automatically updated
by the chip on a vblank, I have no good idea why that happens.

I also see that your code seems to use a modified formula for the 
"latency". Given that I cannot compile the code, it's
at this time hard to say whether that's better or worse. The current one 
is "too pessimistic". I tried to find the minimum
permissible latency and find that for a pixel clock of 135Mhz, the 
watermark should be at most 30, and for a pixel clock
of 108 Mhz, the watermark should be at most 32. From this one can 
compute the latencies in ns. If I did everything
right, I get values of approximately 1185 ns and 1066 ns, thus 
approximately in the same ball park. A value of 1500
should likely be fine, but requires testing on additional hardware (I've 
currently no access to the Fujistu, the other laptop
with a i830 chipset and the strange DVO).

BTW, even with the maximal watermarks (minimum latency), I do get 
"hickups" if I try really really hard. So they are
likely provoked by something else, not the wrong watermark.

Thanks!

Thomas

      parent reply	other threads:[~2013-11-20 10:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-18  6:38 [PATCH] drm/i915: Replicate BIOS eDP bpp clamping hack for hsw Daniel Vetter
2013-11-19 15:51 ` [Intel-gfx] " Ville Syrjälä
2013-11-19 16:01   ` Daniel Vetter
     [not found]   ` <24336_1384876863_528B8B3F_24336_14011_1_20131119160127.GC5794@phenom.ffwll.local>
2013-11-19 16:15     ` [PATCH] Added a lower limit for the watermark setting Thomas Richter
2013-11-19 16:41       ` Daniel Vetter
     [not found]       ` <24336_1384879265_528B94A1_24336_14365_1_20131119164139.GE5794@phenom.ffwll.local>
2013-11-20  9:18         ` Thomas Richter
2013-11-20  9:27           ` Daniel Vetter
     [not found]           ` <24336_1384939634_528C8071_24336_18909_1_CAKMK7uH2VXy05gW7yCpkzUCe9nO+e9XU+jYEq8RaNKOXj4G2iw@mail.gmail.com>
2013-11-20 10:50             ` Thomas Richter [this message]

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=528C93FB.7080508@math.tu-berlin.de \
    --to=thor@math.tu-berlin.de \
    --cc=daniel@ffwll.ch \
    --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