Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33d23237 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Unconditionally get the fence reg when pinning scanout



We use i915_gem_object_get_fence_reg() to do LRU tracking of the fence
registers, so stop trying to be too clever when pinning the fb->obj.

Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent 56e2ea34
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -1474,8 +1474,7 @@ intel_pin_and_fence_fb_obj(struct drm_device *dev,
	 * framebuffer compression.  For simplicity, we always install
	 * framebuffer compression.  For simplicity, we always install
	 * a fence as the cost is not that onerous.
	 * a fence as the cost is not that onerous.
	 */
	 */
	if (obj_priv->fence_reg == I915_FENCE_REG_NONE &&
	if (obj_priv->tiling_mode != I915_TILING_NONE) {
	    obj_priv->tiling_mode != I915_TILING_NONE) {
		ret = i915_gem_object_get_fence_reg(obj, false);
		ret = i915_gem_object_get_fence_reg(obj, false);
		if (ret)
		if (ret)
			goto err_unpin;
			goto err_unpin;