]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/i915: Compute VLV/CHV FIFO sizes based on the PM2 watermarks
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 2 Mar 2017 17:14:56 +0000 (19:14 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 3 Mar 2017 14:50:10 +0000 (16:50 +0200)
commit5012e604891a8ac3eafc7f59335dc688a6c388f6
tree70884121ffd7404e1b9e12a5d16d7df402e337fb
parent814e7f0bf7b7d5805a5ef030348c25647103b6a8
drm/i915: Compute VLV/CHV FIFO sizes based on the PM2 watermarks

Let's compute the watermarks first and the FIFO size second. This way we
can make sure the FIFO split is the most accommodating to the watermarks.
Previously we could have potentially computed a FIFO split that couldn't
accommodate the PM2 watermarks simply due to a bad split even if the
total FIFO size would have been sufficient.

It'll also allow us to avoid recomputing the wms for all planes whenever
the FIFO split would change. Thus we don't have to add any extra planes
to the state when the FIFO needs to be repartitioned.

To help with this we'll keep around copies of the non-inverted
watermarks in the crtc state. For now that doesn't help too much, but
once we start to do the watermark computation only for the planes
that change we'll need the non-inverted values around for the other
planes.

v2: s/noninverted/raw/ for consistency with other platforms
    Fix the memset() of the "raw" watermarks

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170302171508.1666-7-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pm.c