diff options
author | Roman Kiryanov <rkir@google.com> | 2024-02-07 20:42:37 -0800 |
---|---|---|
committer | Roman Kiryanov <rkir@google.com> | 2024-02-07 20:45:46 -0800 |
commit | 529b6cbd8b26dd86001f9701f4f0576d933f1796 (patch) | |
tree | 840752ea91260cf8f6c9f392515d0c04826e66a6 | |
parent | 61c9173c928e21a714ae6519e134b49363ae9875 (diff) | |
download | goldfish-opengl-529b6cbd8b26dd86001f9701f4f0576d933f1796.tar.gz |
Retire goldfish_dma from the guest
it is replaced by goldfish_address_space and
retired from the kernel (goldfish_pipe)
Bug: 311486792
Test: presubmit
Change-Id: If25132a35d199ebf4e6de21abd60d4d01e5891fc
Signed-off-by: Roman Kiryanov <rkir@google.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 080b34c9..13228e85 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__); } |