[Intel-gfx] [RFC][PATCH 1/1] drm/i915: Rewrite ILK+ watermark handling

Paulo Zanoni przanoni at gmail.com
Tue May 7 21:55:27 CEST 2013

2013/5/6  <ville.syrjala at linux.intel.com>:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Rewrite the ILK+ watermark code to allow:
> - updating the watermarks safely (to avoid underruns)
> - pre-computing watermarks (will help with atomic modest and pageflip)
> - enabling LP1+ watermarks for HSW multi-pipe scenarios
> The watermark registers are not double buffered, so we have to be
> careful when/how we update them. It might be possible to increase the
> watermark level before a plane update occurs, but decreasing the
> watermark must happen after the plane update has finished. Also the
> FIFO split can change depending on whether a sprite is enabled or not.
> The HSW multi-pipe low power watermark feature adds another level of
> complexity since the LP watermarks must be the max of all pipes at any
> given time.
> All of this makes the whole idea of updating watermarks before the plane
> update too difficult. Instead just always update watermarks from the
> vblank interrupt.
> We track the pending and active watermark levels for each pipe
> separately, and when the active levels for any pipe are updated from the
> vblank interrupt, we update the merged LP watermarks as well. We also
> need to track the active state of sprites and pipes alongside the
> watermarks to make sure we check the merged watermarks against the correct
> limits. The assumption is that if even one pipe is using a sprite we
> must check the merged values against the 1:1 (or 1:5) split FIFO sizes.
> - pre-gen5/vlv obviously
> - are the IVB sprite scaling workarounds good enough or do we need
>   extra vbl waits there?
> - lots of testing to make sure it works

I wanted to see if the values computed were correct, so I compiled
your gitorious tree. On Haswell, it gives a "divide error" when I try
to modprobe i915.ko.

Paulo Zanoni

More information about the Intel-gfx mailing list