gfxstream: nuke goldfish_dma

Goldfish DMA no longer has any kernel support, and that
code path looks unused anyways.

https://android-review.googlesource.com/c/kernel/common-modules/virtual-device/+/2919253

BUG=311486792
TEST=compile

Change-Id: I85ce1b3442233317009fd9cd27ad39e2d97ebb1c
diff --git a/guest/BUILD.gn b/guest/BUILD.gn
index 520a365..f427469 100644
--- a/guest/BUILD.gn
+++ b/guest/BUILD.gn
@@ -94,8 +94,6 @@
     "OpenglCodecCommon/ChecksumCalculator.h",
     "OpenglCodecCommon/glUtils.cpp",
     "OpenglCodecCommon/glUtils.h",
-    "OpenglCodecCommon/goldfish_dma.cpp",
-    "OpenglCodecCommon/goldfish_dma.h",
     "OpenglSystemCommon/HostConnection.cpp",
     "OpenglSystemCommon/HostConnection.h",
     "OpenglSystemCommon/ProcessPipe.cpp",
@@ -198,8 +196,6 @@
 
   if (target_os == "fuchsia") {
     sources -= [
-      "OpenglCodecCommon/goldfish_dma.cpp",
-      "OpenglCodecCommon/goldfish_dma.h",
       "OpenglSystemCommon/QemuPipeStream.cpp",
       "qemupipe/qemu_pipe_common.cpp",
       "qemupipe/qemu_pipe_guest.cpp",
diff --git a/guest/GLESv2_enc/GL2Encoder.cpp b/guest/GLESv2_enc/GL2Encoder.cpp
index 5c44a27..9a719d9 100755
--- a/guest/GLESv2_enc/GL2Encoder.cpp
+++ b/guest/GLESv2_enc/GL2Encoder.cpp
@@ -3424,37 +3424,7 @@
     buf->m_mappedOffset = offset;
     buf->m_mappedLength = length;
 
-    if (ctx->hasExtension("ANDROID_EMU_dma_v2")) {
-        if (buf->dma_buffer.get().size < length) {
-            goldfish_dma_context region;
-
-            const int PAGE_BITS = 12;
-            GLsizeiptr aligned_length = (length + (1 << PAGE_BITS) - 1) & ~((1 << PAGE_BITS) - 1);
-
-            if (goldfish_dma_create_region(aligned_length, &region)) {
-                buf->dma_buffer.reset(NULL);
-                return s_glMapBufferRangeAEMUImpl(ctx, target, offset, length, access, buf);
-            }
-
-            if (!goldfish_dma_map(&region)) {
-                buf->dma_buffer.reset(NULL);
-                return s_glMapBufferRangeAEMUImpl(ctx, target, offset, length, access, buf);
-            }
-
-            buf->m_guest_paddr = goldfish_dma_guest_paddr(&region);
-            buf->dma_buffer.reset(&region);
-        }
-
-        ctx->glMapBufferRangeDMA(
-                ctx, target,
-                offset, length,
-                access,
-                buf->m_guest_paddr);
-
-        return reinterpret_cast<void*>(buf->dma_buffer.get().mapped_addr);
-    } else {
         return s_glMapBufferRangeAEMUImpl(ctx, target, offset, length, access, buf);
-    }
 }
 
 GLboolean GL2Encoder::s_glUnmapBuffer(void* self, GLenum target) {
@@ -3480,20 +3450,6 @@
     }
 
     GLboolean host_res = GL_TRUE;
-
-    if (buf->dma_buffer.get().mapped_addr) {
-        memcpy(&buf->m_fixedBuffer[buf->m_mappedOffset],
-               reinterpret_cast<void*>(buf->dma_buffer.get().mapped_addr),
-               buf->m_mappedLength);
-
-        ctx->glUnmapBufferDMA(
-            ctx, target,
-            buf->m_mappedOffset,
-            buf->m_mappedLength,
-            buf->m_mappedAccess,
-            goldfish_dma_guest_paddr(&buf->dma_buffer.get()),
-            &host_res);
-    } else {
         if (ctx->m_hasAsyncUnmapBuffer) {
             ctx->glUnmapBufferAsyncAEMU(
                     ctx, target,
@@ -3513,7 +3469,6 @@
                         &host_res);
             }
         }
-    }
 
     buf->m_mapped = false;
     buf->m_mappedAccess = 0;
diff --git a/guest/OpenglCodecCommon/Android.bp b/guest/OpenglCodecCommon/Android.bp
index 1215b89..2b7b838 100644
--- a/guest/OpenglCodecCommon/Android.bp
+++ b/guest/OpenglCodecCommon/Android.bp
@@ -65,14 +65,12 @@
         "-Wno-unused-private-field",
     ],
     srcs: [
-        "auto_goldfish_dma_context.cpp",
         "ChecksumCalculator.cpp",
         "EncoderDebug.cpp",
         "GLClientState.cpp",
         "GLESTextureUtils.cpp",
         "GLSharedGroup.cpp",
         "glUtils.cpp",
-        "goldfish_dma.cpp",
         "IndexRangeCache.cpp",
     ],
     export_include_dirs: [
diff --git a/guest/OpenglCodecCommon/ChecksumCalculator.cpp b/guest/OpenglCodecCommon/ChecksumCalculator.cpp
index 56d7685..370f0e6 100644
--- a/guest/OpenglCodecCommon/ChecksumCalculator.cpp
+++ b/guest/OpenglCodecCommon/ChecksumCalculator.cpp
@@ -158,4 +158,4 @@
 }
 
 }  // namespace guest
-}  // namespace gfxstream
\ No newline at end of file
+}  // namespace gfxstream
diff --git a/guest/OpenglCodecCommon/auto_goldfish_dma_context.cpp b/guest/OpenglCodecCommon/auto_goldfish_dma_context.cpp
deleted file mode 100644
index c638c2b..0000000
--- a/guest/OpenglCodecCommon/auto_goldfish_dma_context.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "auto_goldfish_dma_context.h"
-
-namespace {
-goldfish_dma_context empty() {
-    goldfish_dma_context ctx;
-
-    ctx.mapped_addr = 0;
-    ctx.size = 0;
-    ctx.fd = -1;
-
-    return ctx;
-}
-
-void destroy(goldfish_dma_context *ctx) {
-    if (ctx->mapped_addr) {
-        goldfish_dma_unmap(ctx);
-    }
-    if (ctx->fd > 0) {
-        goldfish_dma_free(ctx);
-    }
-}
-}  // namespace
-
-AutoGoldfishDmaContext::AutoGoldfishDmaContext() : m_ctx(empty()) {}
-
-AutoGoldfishDmaContext::AutoGoldfishDmaContext(goldfish_dma_context *ctx)
-    : m_ctx(*ctx) {
-    *ctx = empty();
-}
-
-AutoGoldfishDmaContext::~AutoGoldfishDmaContext() {
-    destroy(&m_ctx);
-}
-
-void AutoGoldfishDmaContext::reset(goldfish_dma_context *ctx) {
-    destroy(&m_ctx);
-    if (ctx) {
-        m_ctx = *ctx;
-        *ctx = empty();
-    } else {
-        m_ctx = empty();
-    }
-}
-
-goldfish_dma_context AutoGoldfishDmaContext::release() {
-    goldfish_dma_context copy = m_ctx;
-    m_ctx = empty();
-    return copy;
-}
-
diff --git a/guest/OpenglCodecCommon/auto_goldfish_dma_context.h b/guest/OpenglCodecCommon/auto_goldfish_dma_context.h
deleted file mode 100644
index c8ee738..0000000
--- a/guest/OpenglCodecCommon/auto_goldfish_dma_context.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef ANDROID_INCLUDE_HARDWARE_AUTO_GOLDFISH_DMA_CONTEXT_H
-#define ANDROID_INCLUDE_HARDWARE_AUTO_GOLDFISH_DMA_CONTEXT_H
-
-#include <inttypes.h>
-#include "goldfish_dma.h"
-
-// A C++ wrapper for goldfish_dma_context that releases resources in dctor.
-class AutoGoldfishDmaContext {
-public:
-    AutoGoldfishDmaContext();
-    explicit AutoGoldfishDmaContext(goldfish_dma_context *ctx);
-    ~AutoGoldfishDmaContext();
-
-    const goldfish_dma_context &get() const { return m_ctx; }
-    void reset(goldfish_dma_context *ctx);
-    goldfish_dma_context release();
-
-private:
-    AutoGoldfishDmaContext(const AutoGoldfishDmaContext &rhs);
-    AutoGoldfishDmaContext& operator=(const AutoGoldfishDmaContext &rhs);
-
-    goldfish_dma_context m_ctx;
-};
-
-#endif  // ANDROID_INCLUDE_HARDWARE_AUTO_GOLDFISH_DMA_CONTEXT_H
diff --git a/guest/OpenglCodecCommon/goldfish_dma.cpp b/guest/OpenglCodecCommon/goldfish_dma.cpp
deleted file mode 100644
index f3cefec..0000000
--- a/guest/OpenglCodecCommon/goldfish_dma.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright 2016 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "goldfish_dma.h"
-
-#include <qemu_pipe_bp.h>
-
-#if PLATFORM_SDK_VERSION < 26
-#include <cutils/log.h>
-#else
-#include <log/log.h>
-#endif
-#include <errno.h>
-#ifdef __ANDROID__
-#include <linux/ioctl.h>
-#include <linux/types.h>
-#include <sys/cdefs.h>
-#endif
-#include <sys/ioctl.h>
-#include <sys/mman.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-/* There is an ioctl associated with goldfish dma driver.
- * Make it conflict with ioctls that are not likely to be used
- * in the emulator.
- * 'G'	00-3F	drivers/misc/sgi-gru/grulib.h	conflict!
- * 'G'	00-0F	linux/gigaset_dev.h	conflict!
- */
-#define GOLDFISH_DMA_IOC_MAGIC	'G'
-
-#define GOLDFISH_DMA_IOC_LOCK			_IOWR(GOLDFISH_DMA_IOC_MAGIC, 0, struct goldfish_dma_ioctl_info)
-#define GOLDFISH_DMA_IOC_UNLOCK			_IOWR(GOLDFISH_DMA_IOC_MAGIC, 1, struct goldfish_dma_ioctl_info)
-#define GOLDFISH_DMA_IOC_GETOFF			_IOWR(GOLDFISH_DMA_IOC_MAGIC, 2, struct goldfish_dma_ioctl_info)
-#define GOLDFISH_DMA_IOC_CREATE_REGION	_IOWR(GOLDFISH_DMA_IOC_MAGIC, 3, struct goldfish_dma_ioctl_info)
-
-struct goldfish_dma_ioctl_info {
-    uint64_t phys_begin;
-    uint64_t size;
-};
-
-int goldfish_dma_create_region(uint32_t sz, struct goldfish_dma_context* res) {
-
-    res->fd = qemu_pipe_open("opengles");
-    res->mapped_addr = 0;
-    res->size = 0;
-
-    if (res->fd > 0) {
-        // now alloc
-        struct goldfish_dma_ioctl_info info;
-        info.size = sz;
-        int alloc_res = ioctl(res->fd, GOLDFISH_DMA_IOC_CREATE_REGION, &info);
-
-        if (alloc_res) {
-            ALOGE("%s: failed to allocate DMA region. errno=%d",
-                  __FUNCTION__, errno);
-            close(res->fd);
-            res->fd = -1;
-            return alloc_res;
-        }
-
-        res->size = sz;
-        ALOGV("%s: successfully allocated goldfish DMA region with size %u cxt=%p fd=%d",
-              __FUNCTION__, sz, res, res->fd);
-        return 0;
-    } else {
-        ALOGE("%s: could not obtain fd to device! fd %d errno=%d\n",
-              __FUNCTION__, res->fd, errno);
-        return ENODEV;
-    }
-}
-
-void* goldfish_dma_map(struct goldfish_dma_context* cxt) {
-    ALOGV("%s: on fd %d errno=%d", __FUNCTION__, cxt->fd, errno);
-    void *mapped = mmap(0, cxt->size, PROT_WRITE, MAP_SHARED, cxt->fd, 0);
-    ALOGV("%s: cxt=%p mapped=%p size=%u errno=%d",
-        __FUNCTION__, cxt, mapped, cxt->size, errno);
-
-    if (mapped == MAP_FAILED) {
-        mapped = NULL;
-    }
-
-    cxt->mapped_addr = reinterpret_cast<uint64_t>(mapped);
-    return mapped;
-}
-
-int goldfish_dma_unmap(struct goldfish_dma_context* cxt) {
-    ALOGV("%s: cxt=%p mapped=0x%" PRIu64, __FUNCTION__, cxt, cxt->mapped_addr);
-    munmap(reinterpret_cast<void *>(cxt->mapped_addr), cxt->size);
-    cxt->mapped_addr = 0;
-    cxt->size = 0;
-    return 0;
-}
-
-void goldfish_dma_write(struct goldfish_dma_context* cxt,
-                               const void* to_write,
-                               uint32_t sz) {
-    ALOGV("%s: cxt=%p mapped=0x%" PRIu64 " to_write=%p size=%u",
-        __FUNCTION__, cxt, cxt->mapped_addr, to_write, sz);
-    memcpy(reinterpret_cast<void *>(cxt->mapped_addr), to_write, sz);
-}
-
-void goldfish_dma_free(goldfish_dma_context* cxt) {
-    close(cxt->fd);
-}
-
-uint64_t goldfish_dma_guest_paddr(const struct goldfish_dma_context* cxt) {
-    struct goldfish_dma_ioctl_info info;
-    ioctl(cxt->fd, GOLDFISH_DMA_IOC_GETOFF, &info);
-    return info.phys_begin;
-}
diff --git a/guest/OpenglCodecCommon/goldfish_dma.h b/guest/OpenglCodecCommon/goldfish_dma.h
deleted file mode 100644
index 278e035..0000000
--- a/guest/OpenglCodecCommon/goldfish_dma.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2016 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef ANDROID_INCLUDE_HARDWARE_GOLDFISH_DMA_H
-#define ANDROID_INCLUDE_HARDWARE_GOLDFISH_DMA_H
-
-#include <inttypes.h>
-
-// userspace interface
-struct goldfish_dma_context {
-	uint64_t mapped_addr;
-	uint32_t size;
-	int32_t fd;
-};
-
-int goldfish_dma_create_region(uint32_t sz, struct goldfish_dma_context* res);
-
-void* goldfish_dma_map(struct goldfish_dma_context* cxt);
-int goldfish_dma_unmap(struct goldfish_dma_context* cxt);
-
-void goldfish_dma_write(struct goldfish_dma_context* cxt,
-                        const void* to_write,
-                        uint32_t sz);
-
-void goldfish_dma_free(goldfish_dma_context* cxt);
-uint64_t goldfish_dma_guest_paddr(const struct goldfish_dma_context* cxt);
-
-#endif
diff --git a/guest/OpenglCodecCommon/goldfish_dma_host.cpp b/guest/OpenglCodecCommon/goldfish_dma_host.cpp
deleted file mode 100644
index 4ca027b..0000000
--- a/guest/OpenglCodecCommon/goldfish_dma_host.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-#include "goldfish_dma.h"
-
-int goldfish_dma_create_region(uint32_t sz, struct goldfish_dma_context* res) {
-    return 0;
-}
-
-void* goldfish_dma_map(struct goldfish_dma_context* cxt) {
-    return 0;
-}
-
-int goldfish_dma_unmap(struct goldfish_dma_context* cxt) {
-    return 0;
-}
-
-void goldfish_dma_write(struct goldfish_dma_context* cxt,
-                               const void* to_write,
-                               uint32_t sz) {
-}
-
-void goldfish_dma_free(goldfish_dma_context* cxt) {
-}
-
-uint64_t goldfish_dma_guest_paddr(const struct goldfish_dma_context* cxt) {
-    return 0;
-}
-
diff --git a/guest/OpenglCodecCommon/include/gfxstream/guest/GLSharedGroup.h b/guest/OpenglCodecCommon/include/gfxstream/guest/GLSharedGroup.h
index d5475d9..86c4d62 100755
--- a/guest/OpenglCodecCommon/include/gfxstream/guest/GLSharedGroup.h
+++ b/guest/OpenglCodecCommon/include/gfxstream/guest/GLSharedGroup.h
@@ -37,7 +37,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "ErrorLog.h"
-#include "auto_goldfish_dma_context.h"
 #include "IndexRangeCache.h"
 #include "StateTrackingSupport.h"
 
@@ -65,9 +64,6 @@
     // Internal bookkeeping
     std::vector<char> m_fixedBuffer; // actual buffer is shadowed here
     IndexRangeCache m_indexRangeCache;
-
-    // DMA support
-    AutoGoldfishDmaContext dma_buffer;
 };
 
 class ProgramData {
diff --git a/guest/OpenglCodecCommon/meson.build b/guest/OpenglCodecCommon/meson.build
index 67463ce..4e11e34 100644
--- a/guest/OpenglCodecCommon/meson.build
+++ b/guest/OpenglCodecCommon/meson.build
@@ -5,7 +5,6 @@
 
 files_lib_codec_common = files(
   'ChecksumCalculator.cpp',
-  'goldfish_dma.cpp',
   'glUtils.cpp',
 )
 
diff --git a/guest/OpenglSystemCommon/HostConnection.cpp b/guest/OpenglSystemCommon/HostConnection.cpp
index c860e2c..33d1e9b 100644
--- a/guest/OpenglSystemCommon/HostConnection.cpp
+++ b/guest/OpenglSystemCommon/HostConnection.cpp
@@ -460,7 +460,6 @@
         ExtendedRCEncoderContext* rcEnc = m_rcEnc.get();
         setChecksumHelper(rcEnc);
         queryAndSetSyncImpl(rcEnc);
-        queryAndSetDmaImpl(rcEnc);
         queryAndSetGLESMaxVersion(rcEnc);
         queryAndSetNoErrorState(rcEnc);
         queryAndSetHostCompositionImpl(rcEnc);
@@ -587,15 +586,6 @@
     }
 }
 
-void HostConnection::queryAndSetDmaImpl(ExtendedRCEncoderContext *rcEnc) {
-    std::string hostExtensions = queryHostExtensions(rcEnc);
-    if (hostExtensions.find(kDmaExtStr_v1) != std::string::npos) {
-        rcEnc->setDmaImpl(DMA_IMPL_v1);
-    } else {
-        rcEnc->setDmaImpl(DMA_IMPL_NONE);
-    }
-}
-
 void HostConnection::queryAndSetGLESMaxVersion(ExtendedRCEncoderContext* rcEnc) {
     std::string hostExtensions = queryHostExtensions(rcEnc);
     if (hostExtensions.find(kGLESMaxVersion_2) != std::string::npos) {
diff --git a/guest/OpenglSystemCommon/HostConnection.h b/guest/OpenglSystemCommon/HostConnection.h
index 8f0648e..8161a3a 100644
--- a/guest/OpenglSystemCommon/HostConnection.h
+++ b/guest/OpenglSystemCommon/HostConnection.h
@@ -25,12 +25,6 @@
 #include "gfxstream/guest/IOStream.h"
 #include "renderControl_enc.h"
 
-#ifdef __Fuchsia__
-struct goldfish_dma_context;
-#else
-#include "goldfish_dma.h"
-#endif
-
 #include <mutex>
 
 #include <memory>
@@ -55,10 +49,8 @@
 public:
     ExtendedRCEncoderContext(gfxstream::guest::IOStream *stream,
                              gfxstream::guest::ChecksumCalculator *checksumCalculator)
-        : renderControl_encoder_context_t(stream, checksumCalculator),
-          m_dmaCxt(NULL), m_dmaPtr(NULL), m_dmaPhysAddr(0) { }
+        : renderControl_encoder_context_t(stream, checksumCalculator) {}
     void setSyncImpl(SyncImpl syncImpl) { m_featureInfo.syncImpl = syncImpl; }
-    void setDmaImpl(DmaImpl dmaImpl) { m_featureInfo.dmaImpl = dmaImpl; }
     void setHostComposition(HostComposition hostComposition) {
         m_featureInfo.hostComposition = hostComposition; }
     bool hasNativeSync() const { return m_featureInfo.syncImpl >= SYNC_IMPL_NATIVE_SYNC_V2; }
@@ -84,25 +76,6 @@
     bool hasHWCMultiConfigs() const {
         return m_featureInfo.hasHWCMultiConfigs;
     }
-    DmaImpl getDmaVersion() const { return m_featureInfo.dmaImpl; }
-    void bindDmaContext(struct goldfish_dma_context* cxt) { m_dmaCxt = cxt; }
-    void bindDmaDirectly(void* dmaPtr, uint64_t dmaPhysAddr) {
-        m_dmaPtr = dmaPtr;
-        m_dmaPhysAddr = dmaPhysAddr;
-    }
-    virtual uint64_t lockAndWriteDma(void* data, uint32_t size) {
-        if (m_dmaPtr && m_dmaPhysAddr) {
-            if (data != m_dmaPtr) {
-                memcpy(m_dmaPtr, data, size);
-            }
-            return m_dmaPhysAddr;
-        } else if (m_dmaCxt) {
-            return writeGoldfishDma(data, size, m_dmaCxt);
-        } else {
-            ALOGE("%s: ERROR: No DMA context bound!", __func__);
-            return 0;
-        }
-    }
     void setGLESMaxVersion(GLESMaxVersion ver) { m_featureInfo.glesMaxVersion = ver; }
     GLESMaxVersion getGLESMaxVersion() const { return m_featureInfo.glesMaxVersion; }
     bool hasDirectMem() const {
@@ -112,26 +85,7 @@
     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) {
-#ifdef __Fuchsia__
-        ALOGE("%s Not implemented!", __FUNCTION__);
-        return 0u;
-#else
-        ALOGV("%s(data=%p, size=%u): call", __func__, data, size);
-
-        goldfish_dma_write(dmaCxt, data, size);
-        uint64_t paddr = goldfish_dma_guest_paddr(dmaCxt);
-
-        ALOGV("%s: paddr=0x%llx", __func__, (unsigned long long)paddr);
-        return paddr;
-#endif
-    }
-
     EmulatorFeatureInfo m_featureInfo;
-    struct goldfish_dma_context* m_dmaCxt;
-    void* m_dmaPtr;
-    uint64_t m_dmaPhysAddr;
 };
 
 struct EGLThreadInfo;