/*
* Copyright (C) 2011 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 __COMMON_HOST_CONNECTION_H
#define __COMMON_HOST_CONNECTION_H

#if defined(ANDROID)
#include "gfxstream/guest/ANativeWindow.h"
#include "gfxstream/guest/Gralloc.h"
#endif

#include <cstring>
#include <memory>
#include <mutex>
#include <optional>
#include <string>

#include "EmulatorFeatureInfo.h"
#include "Sync.h"
#include "VirtGpu.h"
#include "gfxstream/guest/ChecksumCalculator.h"
#include "gfxstream/guest/IOStream.h"
#include "renderControl_enc.h"

class GLEncoder;
struct gl_client_context_t;
class GL2Encoder;
struct gl2_client_context_t;

namespace gfxstream {
namespace vk {
class VkEncoder;
}  // namespace vk
}  // namespace gfxstream

// ExtendedRCEncoderContext is an extended version of renderControl_encoder_context_t
// that will be used to track available emulator features.
class ExtendedRCEncoderContext : public renderControl_encoder_context_t {
public:
    ExtendedRCEncoderContext(gfxstream::guest::IOStream *stream,
                             gfxstream::guest::ChecksumCalculator *checksumCalculator)
        : 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; }
    bool hasNativeSyncV3() const { return m_featureInfo.syncImpl >= SYNC_IMPL_NATIVE_SYNC_V3; }
    bool hasNativeSyncV4() const { return m_featureInfo.syncImpl >= SYNC_IMPL_NATIVE_SYNC_V4; }
    bool hasVirtioGpuNativeSync() const { return m_featureInfo.hasVirtioGpuNativeSync; }
    bool hasHostCompositionV1() const {
        return m_featureInfo.hostComposition == HOST_COMPOSITION_V1; }
    bool hasHostCompositionV2() const {
        return m_featureInfo.hostComposition == HOST_COMPOSITION_V2; }
    bool hasYUVCache() const {
        return m_featureInfo.hasYUVCache; }
    bool hasAsyncUnmapBuffer() const {
        return m_featureInfo.hasAsyncUnmapBuffer; }
    bool hasHostSideTracing() const {
        return m_featureInfo.hasHostSideTracing;
    }
    bool hasAsyncFrameCommands() const {
        return m_featureInfo.hasAsyncFrameCommands;
    }
    bool hasSyncBufferData() const {
        return m_featureInfo.hasSyncBufferData; }
    bool hasHWCMultiConfigs() const {
        return m_featureInfo.hasHWCMultiConfigs;
    }
    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 {
            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 {
        return m_featureInfo.hasDirectMem;
    }

    const EmulatorFeatureInfo* featureInfo_const() const { return &m_featureInfo; }
    EmulatorFeatureInfo* featureInfo() { return &m_featureInfo; }

private:
    EmulatorFeatureInfo m_featureInfo;
    void* m_dmaPtr = nullptr;
    uint64_t m_dmaPhysAddr = 0;
};

struct EGLThreadInfo;

enum HostConnectionType {
    HOST_CONNECTION_QEMU_PIPE = 1,
    HOST_CONNECTION_ADDRESS_SPACE = 2,
    HOST_CONNECTION_VIRTIO_GPU_PIPE = 3,
    HOST_CONNECTION_VIRTIO_GPU_ADDRESS_SPACE = 4,
};

class HostConnection
{
public:
    static HostConnection *get();
    static HostConnection* getOrCreate(enum VirtGpuCapset capset = kCapsetNone);
    static HostConnection* getWithThreadInfo(EGLThreadInfo* tInfo, enum VirtGpuCapset capset);
    static void exit();

    static std::unique_ptr<HostConnection> createUnique(enum VirtGpuCapset capset);
    HostConnection(const HostConnection&) = delete;

    ~HostConnection();

    GLEncoder *glEncoder();
    GL2Encoder *gl2Encoder();
    gfxstream::vk::VkEncoder *vkEncoder();
    ExtendedRCEncoderContext *rcEncoder();

    int getRendernodeFd() { return m_rendernodeFd; }

    gfxstream::guest::ChecksumCalculator *checksumHelper() { return &m_checksumHelper; }

#if defined(ANDROID)
    gfxstream::ANativeWindowHelper* anwHelper() { return m_anwHelper.get(); }
    gfxstream::Gralloc* grallocHelper() { return m_grallocHelper.get(); }
#endif
    gfxstream::SyncHelper* syncHelper() { return m_syncHelper.get(); }

    void flush() {
        if (m_stream) {
            m_stream->flush();
        }
    }

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wthread-safety-analysis"
#endif
    void lock() const { m_lock.lock(); }
    void unlock() const { m_lock.unlock(); }
#ifdef __clang__
#pragma clang diagnostic pop
#endif

private:
    // If the connection failed, |conn| is deleted.
    // Returns NULL if connection failed.
 static std::unique_ptr<HostConnection> connect(enum VirtGpuCapset capset);

 HostConnection();
 static gl_client_context_t* s_getGLContext();
 static gl2_client_context_t* s_getGL2Context();

 const std::string& queryHostExtensions(ExtendedRCEncoderContext* rcEnc);
 // setProtocol initializes GL communication protocol for checksums
 // should be called when m_rcEnc is created
 void setChecksumHelper(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetSyncImpl(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetDmaImpl(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetGLESMaxVersion(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetNoErrorState(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetHostCompositionImpl(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetDirectMemSupport(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVulkanSupport(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetDeferredVulkanCommandsSupport(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVulkanNullOptionalStringsSupport(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVulkanCreateResourcesWithRequirementsSupport(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVulkanIgnoredHandles(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetYUVCache(ExtendedRCEncoderContext* mrcEnc);
 void queryAndSetAsyncUnmapBuffer(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVirtioGpuNext(ExtendedRCEncoderContext* rcEnc);
 void queryHasSharedSlotsHostMemoryAllocator(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVulkanFreeMemorySync(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVirtioGpuNativeSync(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVulkanShaderFloat16Int8Support(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVulkanAsyncQueueSubmitSupport(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetHostSideTracingSupport(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetAsyncFrameCommands(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVulkanQueueSubmitWithCommandsSupport(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVulkanBatchedDescriptorSetUpdateSupport(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetSyncBufferData(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVulkanAsyncQsri(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetReadColorBufferDma(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetHWCMultiConfigs(ExtendedRCEncoderContext* rcEnc);
 void queryAndSetVulkanAuxCommandBufferMemory(ExtendedRCEncoderContext* rcEnc);
 GLint queryVersion(ExtendedRCEncoderContext* rcEnc);

private:
 HostConnectionType m_connectionType;

 // intrusively refcounted
 gfxstream::guest::IOStream* m_stream = nullptr;

 std::unique_ptr<GLEncoder> m_glEnc;
 std::unique_ptr<GL2Encoder> m_gl2Enc;

 // intrusively refcounted
 gfxstream::vk::VkEncoder* m_vkEnc = nullptr;
 std::unique_ptr<ExtendedRCEncoderContext> m_rcEnc;

 gfxstream::guest::ChecksumCalculator m_checksumHelper;
#if defined(ANDROID)
 std::unique_ptr<gfxstream::ANativeWindowHelper> m_anwHelper;
 std::unique_ptr<gfxstream::Gralloc> m_grallocHelper;
#endif
 std::unique_ptr<gfxstream::SyncHelper> m_syncHelper;
 std::string m_hostExtensions;
 bool m_noHostError;
 mutable std::mutex m_lock;
 int m_rendernodeFd;
};

#endif
