diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2017-12-26 04:56:34 +0300 |
---|---|---|
committer | Dmitry Osipenko <digetx@gmail.com> | 2017-12-26 22:14:29 +0300 |
commit | 46be7196073fc38d7abe936fd7e599c747332879 (patch) | |
tree | c02f6b121ce554b7e7bbaebbf5d0aa3f71385052 | |
parent | 7aa916e62e8dade42bccc185a71a43860345aa19 (diff) |
Allow surface BO caching
Now surface BO is released when surface is really gone, so caching can
be utilized.
-rw-r--r-- | src/surface.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/surface.c b/src/surface.c index 3db26a9..107760e 100644 --- a/src/surface.c +++ b/src/surface.c @@ -109,12 +109,6 @@ int alloc_surface_data(tegra_surface *surf) goto err_cleanup; } - ret = drm_tegra_bo_forbid_caching(pixbuf->bo); - - if (ret < 0) { - goto err_cleanup; - } - pix = pixman_image_create_bits_no_clear(pfmt, width, height, data, stride); @@ -161,12 +155,6 @@ int alloc_surface_data(tegra_surface *surf) goto err_cleanup; } - ret = drm_tegra_bo_forbid_caching(surf->y_bo); - - if (ret < 0) { - goto err_cleanup; - } - /* blue plane */ ret = drm_tegra_bo_to_dmabuf(surf->cb_bo, (uint32_t *) &frame->cb_fd); @@ -184,12 +172,6 @@ int alloc_surface_data(tegra_surface *surf) surf->cb_data += pixbuf->bo_offset[1]; frame->cb_offset = pixbuf->bo_offset[1]; - ret = drm_tegra_bo_forbid_caching(surf->cb_bo); - - if (ret < 0) { - goto err_cleanup; - } - /* red plane */ ret = drm_tegra_bo_to_dmabuf(surf->cr_bo, (uint32_t *) &frame->cr_fd); @@ -207,12 +189,6 @@ int alloc_surface_data(tegra_surface *surf) surf->cr_data += pixbuf->bo_offset[2]; frame->cr_offset = pixbuf->bo_offset[2]; - ret = drm_tegra_bo_forbid_caching(surf->cr_bo); - - if (ret < 0) { - goto err_cleanup; - } - /* aux stuff */ ret = drm_tegra_bo_new(&surf->aux_bo, dev->drm, 0, @@ -226,12 +202,6 @@ int alloc_surface_data(tegra_surface *surf) if (ret < 0) { goto err_cleanup; } - - ret = drm_tegra_bo_forbid_caching(surf->aux_bo); - - if (ret < 0) { - goto err_cleanup; - } } if (output) { |