diff options
author | Kenneth Graunke <[email protected]> | 2017-04-02 23:35:27 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-04-10 14:31:49 -0700 |
commit | fbb32971651e7453498e082cabdd92d789417ab2 (patch) | |
tree | 57096ceb29646340e43064f9d81aa8869b81673b /src | |
parent | 80761a42e0e6a79728b5f9b3d6df0616d64fe45e (diff) |
i965/drm: Drop GEM_SW_FINISH stuff.
This is only useful when doing an incoherent CPU mapping of the current
scanout buffer. That's a terrible plan, so we never do it. We always
use an uncached GTT map.
So, this is useless. Drop the code.
Reviewed-by: Chris Wilson <[email protected]>
Acked-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_bufmgr_gem.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c b/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c index dc8129e0b25..39489e6d32b 100644 --- a/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c +++ b/src/mesa/drivers/dri/i965/intel_bufmgr_gem.c @@ -235,9 +235,6 @@ struct _drm_bacon_bo_gem { * drm_bacon_bufmgr_check_aperture in the common case. */ int reloc_tree_size; - - /** Flags that we may need to do the SW_FINISH ioctl on unmap. */ - bool mapped_cpu_write; }; static unsigned int @@ -1160,9 +1157,6 @@ drm_bacon_bo_map(drm_bacon_bo *bo, int write_enable) strerror(errno)); } - if (write_enable) - bo_gem->mapped_cpu_write = true; - drm_bacon_gem_bo_mark_mmaps_incoherent(bo); VG(VALGRIND_MAKE_MEM_DEFINED(bo_gem->mem_virtual, bo->size)); pthread_mutex_unlock(&bufmgr->lock); @@ -1342,24 +1336,6 @@ drm_bacon_bo_unmap(drm_bacon_bo *bo) return 0; } - if (bo_gem->mapped_cpu_write) { - struct drm_i915_gem_sw_finish sw_finish; - - /* Cause a flush to happen if the buffer's pinned for - * scanout, so the results show up in a timely manner. - * Unlike GTT set domains, this only does work if the - * buffer should be scanout-related. - */ - memclear(sw_finish); - sw_finish.handle = bo_gem->gem_handle; - ret = drmIoctl(bufmgr->fd, - DRM_IOCTL_I915_GEM_SW_FINISH, - &sw_finish); - ret = ret == -1 ? -errno : 0; - - bo_gem->mapped_cpu_write = false; - } - /* We need to unmap after every innovation as we cannot track * an open vma for every bo as that will exhaust the system * limits and cause later failures. |