summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-07-22 14:32:37 -0500
committerDerek Foreman <derekf@osg.samsung.com>2016-07-22 14:32:37 -0500
commit6108aa942cb933478fb1c72ab05d012fb9375276 (patch)
treea6723cb085578263565b470a3e957585cfe50e31
parent3c7a99935e1418bf1db33c289cf5c5bace234e2a (diff)
wayland_shm: Speed up dmabuf on intel
using map_bo/unmap_bo instead of gem_map_bo_gtt/gem_unmap_bo_gtt results in a cacheable mapping and a large performance boost. (dmabuf will still remain turned off by default for the release)
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_dmabuf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
index 1f22626..ed8e1b1 100644
--- a/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_dmabuf.c
@@ -87,8 +87,8 @@ static Dmabuf_Buffer *_evas_dmabuf_buffer_init(Dmabuf_Surface *s, int w, int h);
87static void _evas_dmabuf_buffer_destroy(Dmabuf_Buffer *b); 87static void _evas_dmabuf_buffer_destroy(Dmabuf_Buffer *b);
88 88
89drm_intel_bufmgr *(*sym_drm_intel_bufmgr_gem_init)(int fd, int batch_size) = NULL; 89drm_intel_bufmgr *(*sym_drm_intel_bufmgr_gem_init)(int fd, int batch_size) = NULL;
90int (*sym_drm_intel_gem_bo_unmap_gtt)(drm_intel_bo *bo) = NULL; 90int (*sym_drm_intel_bo_unmap)(drm_intel_bo *bo) = NULL;
91int (*sym_drm_intel_gem_bo_map_gtt)(drm_intel_bo *bo) = NULL; 91int (*sym_drm_intel_bo_map)(drm_intel_bo *bo) = NULL;
92drm_intel_bo *(*sym_drm_intel_bo_alloc_tiled)(drm_intel_bufmgr *mgr, const char *name, int x, int y, int cpp, uint32_t *tile, unsigned long *pitch, unsigned long flags) = NULL; 92drm_intel_bo *(*sym_drm_intel_bo_alloc_tiled)(drm_intel_bufmgr *mgr, const char *name, int x, int y, int cpp, uint32_t *tile, unsigned long *pitch, unsigned long flags) = NULL;
93void (*sym_drm_intel_bo_unreference)(drm_intel_bo *bo) = NULL; 93void (*sym_drm_intel_bo_unreference)(drm_intel_bo *bo) = NULL;
94int (*sym_drmPrimeHandleToFD)(int fd, uint32_t handle, uint32_t flags, int *prime_fd) = NULL; 94int (*sym_drmPrimeHandleToFD)(int fd, uint32_t handle, uint32_t flags, int *prime_fd) = NULL;
@@ -136,7 +136,7 @@ _intel_map(Dmabuf_Buffer *buf)
136 drm_intel_bo *bo; 136 drm_intel_bo *bo;
137 137
138 bo = (drm_intel_bo *)buf->bh; 138 bo = (drm_intel_bo *)buf->bh;
139 if (sym_drm_intel_gem_bo_map_gtt(bo) != 0) return NULL; 139 if (sym_drm_intel_bo_map(bo) != 0) return NULL;
140 return bo->virtual; 140 return bo->virtual;
141} 141}
142 142
@@ -146,7 +146,7 @@ _intel_unmap(Dmabuf_Buffer *buf)
146 drm_intel_bo *bo; 146 drm_intel_bo *bo;
147 147
148 bo = (drm_intel_bo *)buf->bh; 148 bo = (drm_intel_bo *)buf->bh;
149 sym_drm_intel_gem_bo_unmap_gtt(bo); 149 sym_drm_intel_bo_unmap(bo);
150} 150}
151 151
152static void 152static void
@@ -174,8 +174,8 @@ _intel_buffer_manager_setup(int fd)
174 if (!drm_intel_lib) return EINA_FALSE; 174 if (!drm_intel_lib) return EINA_FALSE;
175 175
176 SYM(drm_intel_lib, drm_intel_bufmgr_gem_init); 176 SYM(drm_intel_lib, drm_intel_bufmgr_gem_init);
177 SYM(drm_intel_lib, drm_intel_gem_bo_unmap_gtt); 177 SYM(drm_intel_lib, drm_intel_bo_unmap);
178 SYM(drm_intel_lib, drm_intel_gem_bo_map_gtt); 178 SYM(drm_intel_lib, drm_intel_bo_map);
179 SYM(drm_intel_lib, drm_intel_bo_alloc_tiled); 179 SYM(drm_intel_lib, drm_intel_bo_alloc_tiled);
180 SYM(drm_intel_lib, drm_intel_bo_unreference); 180 SYM(drm_intel_lib, drm_intel_bo_unreference);
181 SYM(drm_intel_lib, drm_intel_bufmgr_destroy); 181 SYM(drm_intel_lib, drm_intel_bufmgr_destroy);