OSDN Git Service

GEM: Skip relocation if presumed offset matches.
authorEric Anholt <eric@anholt.net>
Tue, 6 May 2008 18:25:53 +0000 (11:25 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 6 May 2008 18:25:53 +0000 (11:25 -0700)
linux-core/i915_gem.c

index e795ee7..4534dae 100644 (file)
@@ -285,6 +285,9 @@ i915_gem_reloc_and_validate_object(struct drm_gem_object *obj,
                        return -EINVAL;
                }
 
+               if (target_obj_priv->gtt_offset == reloc.presumed_offset)
+                       continue;
+
                /* Map the page containing the relocation we're going to
                 * perform.
                 */