diff options
author | Roman Kiryanov <rkir@google.com> | 2024-02-08 17:25:51 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2024-02-08 17:25:51 +0000 |
commit | a7fbbf9b93b41e40437727ff9674f320f46af04a (patch) | |
tree | f46f80808317304d5ee0ee8a9bab946122511568 | |
parent | 438f5abdc0321a5e6272e262f857c4fab1c91fe3 (diff) | |
parent | 529b6cbd8b26dd86001f9701f4f0576d933f1796 (diff) | |
download | goldfish-opengl-a7fbbf9b93b41e40437727ff9674f320f46af04a.tar.gz |
Retire goldfish_dma from the guest am: 529b6cbd8b
Original change: https://android-review.googlesource.com/c/device/generic/goldfish-opengl/+/2954473
Change-Id: I7d4d0bb1401f220741c1fc19febaa2b6e095a795
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | system/gralloc/gralloc_old.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/system/gralloc/gralloc_old.cpp b/system/gralloc/gralloc_old.cpp index 4332dc29..0fe864e4 100644 --- a/system/gralloc/gralloc_old.cpp +++ b/system/gralloc/gralloc_old.cpp @@ -32,7 +32,6 @@ #include "aemu/base/threads/AndroidThread.h" #include "glUtils.h" #include "goldfish_address_space.h" -#include "goldfish_dma.h" #include "gralloc_common.h" #if PLATFORM_SDK_VERSION < 26 @@ -229,17 +228,13 @@ struct gralloc_dmaregion_t { sz(INITIAL_DMA_REGION_SIZE), refcount(0), bigbufCount(0) { - memset(&goldfish_dma, 0, sizeof(goldfish_dma)); pthread_mutex_init(&lock, NULL); if (rcEnc->hasDirectMem()) { host_memory_allocator.hostMalloc(&address_space_block, sz); - } else if (rcEnc->getDmaVersion() > 0) { - goldfish_dma_create_region(sz, &goldfish_dma); } } - goldfish_dma_context goldfish_dma; GoldfishAddressSpaceHostMemoryAllocator host_memory_allocator; GoldfishAddressSpaceBlock address_space_block; uint32_t sz; @@ -281,11 +276,6 @@ static void get_gralloc_region(ExtendedRCEncoderContext *rcEnc) { } static void resize_gralloc_dmaregion_locked(gralloc_dmaregion_t* grdma, uint32_t new_sz) { - if (grdma->goldfish_dma.mapped_addr) { - goldfish_dma_unmap(&grdma->goldfish_dma); - } - close(grdma->goldfish_dma.fd); - goldfish_dma_create_region(new_sz, &grdma->goldfish_dma); grdma->sz = new_sz; } @@ -355,9 +345,6 @@ static void gralloc_dmaregion_register_ashmem_dma_locked(gralloc_dmaregion_t* gr resize_gralloc_dmaregion_locked(grdma, new_sz); } } - if (!grdma->goldfish_dma.mapped_addr) { - goldfish_dma_map(&grdma->goldfish_dma); - } } static void gralloc_dmaregion_register_ashmem(ExtendedRCEncoderContext *rcEnc, uint32_t sz) { @@ -559,8 +546,6 @@ static void updateHostColorBuffer(cb_handle_old_t* cb, if (grdma->address_space_block.guestPtr()) { rcEnc->bindDmaDirectly(grdma->address_space_block.guestPtr(), grdma->address_space_block.physAddr()); - } else if (grdma->goldfish_dma.mapped_addr) { - rcEnc->bindDmaContext(&grdma->goldfish_dma); } else { ALOGE("%s: Unexpected DMA", __func__); } |