On Tue, 22 Mar 2011 13:51:58 +0000, Chris Wilson <[email protected]> wrote: > Signed-off-by: Chris Wilson <[email protected]>
Again, needs more justification. For example, I would expect us not to
bother with the GTT on SNB pread/pwrite, and just read the backing pages
(they're in our cache, no need to clflush or anything) like we already
have code to do. And one note below.
> @@ -587,17 +727,41 @@ i915_gem_pread_ioctl(struct drm_device *dev, void *data,
>
> trace_i915_gem_object_pread(obj, args->offset, args->size);
>
> - ret = i915_gem_object_set_cpu_read_domain_range(obj,
> - args->offset,
> - args->size);
> - if (ret)
> - goto out;
> + if (obj->gtt_space &&
> + obj->map_and_fenceable &&
> + obj->cache_level == I915_CACHE_NONE &&
> + (obj->base.read_domains & I915_GEM_DOMAIN_CPU) == 0) {
> + ret = i915_gem_object_pin(obj, 0, true);
> + if (ret)
> + goto out;
> +
> + ret = i915_gem_object_set_to_gtt_domain(obj, false);
> + if (ret)
> + goto out_unpin;
So, previously if I pread a tiled object, I got the tiled data. Now
you're giving me maybe the tiled data, maybe the data untiled by reading
through a fence.
pgplzeR9Z0FGM.pgp
Description: PGP signature
_______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
