}
static int find_compression_limit(struct drm_i915_private *dev_priv,
- struct drm_mm_node *node,
unsigned int size,
unsigned int fb_cpp)
{
+ struct intel_fbc *fbc = &dev_priv->fbc;
int compression_limit = 1;
int ret;
u64 end;
*/
/* Try to over-allocate to reduce reallocations and fragmentation. */
- ret = i915_gem_stolen_insert_node_in_range(dev_priv, node, size <<= 1,
- 4096, 0, end);
+ ret = i915_gem_stolen_insert_node_in_range(dev_priv, &fbc->compressed_fb,
+ size <<= 1, 4096, 0, end);
if (ret == 0)
return compression_limit;
(fb_cpp == 2 && compression_limit == 2))
return 0;
- ret = i915_gem_stolen_insert_node_in_range(dev_priv, node, size >>= 1,
- 4096, 0, end);
+ ret = i915_gem_stolen_insert_node_in_range(dev_priv, &fbc->compressed_fb,
+ size >>= 1, 4096, 0, end);
if (ret && DISPLAY_VER(dev_priv) <= 4) {
return 0;
} else if (ret) {
drm_WARN_ON(&dev_priv->drm,
drm_mm_node_allocated(&fbc->compressed_llb));
- ret = find_compression_limit(dev_priv, &fbc->compressed_fb,
- size, fb_cpp);
+ ret = find_compression_limit(dev_priv, size, fb_cpp);
if (!ret)
goto err_llb;
else if (ret > 1) {