Revert "Add support for goldfish-address-space in gralloc"

This also reverts "Fix build break for host" and
"fix build". We want to merge the host side first
to prevent breaking Vulkan tests.

This reverts commit 6af8dda245d07d304ca48469ccbff78b8202d806.
This reverts commit 8fd114c6b5c7465cf316ebdddac69e783504f1eb.
This reverts commit 60620f6a613ee34cec8b4a22fcb8684741b4979e.

Bug: 128324105
Test: none
Change-Id: I3a609db7ee4ac5f061316b50d00fd866d39ed721
Signed-off-by: Roman Kiryanov <rkir@google.com>
diff --git a/system/OpenglSystemCommon/HostConnection.h b/system/OpenglSystemCommon/HostConnection.h
index 09d47f5..922c35c 100644
--- a/system/OpenglSystemCommon/HostConnection.h
+++ b/system/OpenglSystemCommon/HostConnection.h
@@ -21,7 +21,6 @@
 #include "renderControl_enc.h"
 #include "ChecksumCalculator.h"
 #include "goldfish_dma.h"
-#include "goldfish_address_space.h"
 
 #include <cutils/native_handle.h>
 
@@ -48,7 +47,7 @@
 public:
     ExtendedRCEncoderContext(IOStream *stream, ChecksumCalculator *checksumCalculator)
         : renderControl_encoder_context_t(stream, checksumCalculator),
-          m_dmaCxt(NULL), m_addressSpaceBlock(NULL) { }
+          m_dmaCxt(NULL) { }
     void setSyncImpl(SyncImpl syncImpl) { m_featureInfo.syncImpl = syncImpl; }
     void setDmaImpl(DmaImpl dmaImpl) { m_featureInfo.dmaImpl = dmaImpl; }
     void setHostComposition(HostComposition hostComposition) {
@@ -59,14 +58,9 @@
         return m_featureInfo.hostComposition == HOST_COMPOSITION_V1; }
     DmaImpl getDmaVersion() const { return m_featureInfo.dmaImpl; }
     void bindDmaContext(struct goldfish_dma_context* cxt) { m_dmaCxt = cxt; }
-    void bindAddressSpaceBlock(GoldfishAddressSpaceBlock* block) {
-        m_addressSpaceBlock = block;
-    }
     virtual uint64_t lockAndWriteDma(void* data, uint32_t size) {
-        if (m_addressSpaceBlock) {
-            return writeAddressSpaceBlock(data, size, m_addressSpaceBlock);
-        } else if (m_dmaCxt) {
-            return writeGoldfishDma(data, size, m_dmaCxt);
+        if (m_dmaCxt) {
+            return lockAndWriteGoldfishDma(data, size, m_dmaCxt);
         } else {
             ALOGE("%s: ERROR: No DMA context bound!", __func__);
             return 0;
@@ -74,13 +68,12 @@
     }
     void setGLESMaxVersion(GLESMaxVersion ver) { m_featureInfo.glesMaxVersion = ver; }
     GLESMaxVersion getGLESMaxVersion() const { return m_featureInfo.glesMaxVersion; }
-    bool hasDirectMem() const { return m_featureInfo.hasDirectMem; }
 
     const EmulatorFeatureInfo* featureInfo_const() const { return &m_featureInfo; }
     EmulatorFeatureInfo* featureInfo() { return &m_featureInfo; }
 private:
-    static uint64_t writeGoldfishDma(void* data, uint32_t size,
-                                     struct goldfish_dma_context* dmaCxt) {
+    static uint64_t lockAndWriteGoldfishDma(void* data, uint32_t size,
+                                            struct goldfish_dma_context* dmaCxt) {
         ALOGV("%s(data=%p, size=%u): call", __func__, data, size);
 
         goldfish_dma_write(dmaCxt, data, size);
@@ -90,20 +83,8 @@
         return paddr;
     }
 
-    static uint64_t writeAddressSpaceBlock(void* data, uint32_t size,
-                                           GoldfishAddressSpaceBlock* block) {
-        ALOGV("%s(data=%p, size=%u): call", __func__, data, size);
-
-        memcpy(block->guestPtr(), data, size);
-        const uint64_t paddr = block->physAddr();
-
-        ALOGV("%s: paddr=0x%llx", __func__, (unsigned long long)paddr);
-        return paddr;
-    }
-
     EmulatorFeatureInfo m_featureInfo;
     struct goldfish_dma_context* m_dmaCxt;
-    GoldfishAddressSpaceBlock* m_addressSpaceBlock;
 };
 
 // Abstraction for gralloc handle conversion