}
static void
-__i915_gem_object_release_shmem(struct drm_i915_gem_object *obj)
+__i915_gem_object_release_shmem(struct drm_i915_gem_object *obj,
+ struct sg_table *pages)
{
GEM_BUG_ON(obj->mm.madv == __I915_MADV_PURGED);
obj->mm.dirty = false;
if ((obj->base.read_domains & I915_GEM_DOMAIN_CPU) == 0)
- i915_gem_clflush_object(obj, false);
+ drm_clflush_sg(pages);
obj->base.read_domains = I915_GEM_DOMAIN_CPU;
obj->base.write_domain = I915_GEM_DOMAIN_CPU;
i915_gem_object_put_pages_phys(struct drm_i915_gem_object *obj,
struct sg_table *pages)
{
- __i915_gem_object_release_shmem(obj);
+ __i915_gem_object_release_shmem(obj, pages);
if (obj->mm.dirty) {
struct address_space *mapping = obj->base.filp->f_mapping;
struct sgt_iter sgt_iter;
struct page *page;
- __i915_gem_object_release_shmem(obj);
+ __i915_gem_object_release_shmem(obj, pages);
i915_gem_gtt_finish_pages(obj, pages);