summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--common/display/include/HwDisplayConnector.h8
-rw-r--r--common/hwc/ActiveModeMgr.cpp (renamed from hwc2/ActiveModeMgr.cpp)0
-rw-r--r--common/hwc/Android.mk5
-rw-r--r--common/hwc/FixedSizeModeMgr.cpp (renamed from hwc2/FixedSizeModeMgr.cpp)0
-rw-r--r--common/hwc/HwcModeMgr.cpp (renamed from hwc2/HwcModeMgr.cpp)0
-rw-r--r--common/hwc/RealModeMgr.cpp (renamed from hwc2/RealModeMgr.cpp)0
-rw-r--r--common/hwc/VariableModeMgr.cpp (renamed from hwc2/VariableModeMgr.cpp)0
-rw-r--r--common/hwc/include/ActiveModeMgr.h (renamed from hwc2/ActiveModeMgr.h)0
-rw-r--r--common/hwc/include/FixedSizeModeMgr.h (renamed from hwc2/FixedSizeModeMgr.h)0
-rw-r--r--common/hwc/include/RealModeMgr.h (renamed from hwc2/RealModeMgr.h)0
-rw-r--r--common/hwc/include/VariableModeMgr.h (renamed from hwc2/VariableModeMgr.h)0
-rw-r--r--hwc2/Android.mk62
-rwxr-xr-xhwc2/Hwc2Display.cpp18
-rw-r--r--hwc2/Hwc2Display.h4
-rw-r--r--hwc2/Hwc2Module.cpp9
-rw-r--r--hwc2/MesonHwc2.cpp8
-rw-r--r--hwc2/MesonHwc2.h9
-rw-r--r--postprocessor/Android.mk3
-rw-r--r--postprocessor/fbprocessor/CopyProcessor.cpp16
-rw-r--r--service/2.3/default/android.hardware.graphics.composer@2.3-service.droidlogic.xml9
-rw-r--r--service/2.4/default/android.hardware.graphics.composer@2.4-service.droidlogic.xml9
21 files changed, 138 insertions, 22 deletions
diff --git a/common/hwc/include/RealModeMgr.h b/common/hwc/include/RealModeMgr.h
new file mode 100644
index 0000000..4c36b56
--- a/dev/null
+++ b/common/hwc/include/RealModeMgr.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2019 Amlogic, Inc. All rights reserved.
+ *
+ * This source code is subject to the terms and conditions defined in the
+ * file 'LICENSE' which is part of this source code package.
+ *
+ * Description:
+ */
+
+#ifndef HWC2_REAL_MODE_MGR_H
+#define HWC2_REAL_MODE_MGR_H
+
+#include "HwcModeMgr.h"
+
+/*
+ * RealModeMgr:
+ * This class designed for TV or reference box to support
+ * real active modes. App UI size will be updated when
+ * Display timings changed.
+ */
+
+class RealModeMgr : public HwcModeMgr {
+public:
+ RealModeMgr();
+ ~RealModeMgr();
+
+ hwc_modes_policy_t getPolicyType();
+ const char * getName();
+
+ void setFramebufferSize(uint32_t w, uint32_t h);
+ void setDisplayResources(std::shared_ptr<HwDisplayCrtc> & crtc,
+ std::shared_ptr<HwDisplayConnector> & connector);
+ int32_t update();
+ bool needCallHotPlug() { return mCallOnHotPlug; };
+ int32_t getDisplayMode(drm_mode_info_t & mode);
+
+ int32_t getDisplayConfigs(uint32_t * outNumConfigs, uint32_t * outConfigs);
+ int32_t getDisplayAttribute(uint32_t config, int32_t attribute,
+ int32_t* outValue, int32_t caller);
+ int32_t getActiveConfig(uint32_t * outConfig, int32_t caller);
+ int32_t setActiveConfig(uint32_t config);
+ void resetTags();
+ void dump(String8 & dumpstr);
+
+protected:
+ int32_t updateActiveConfig(const char* activeMode);
+ void reset();
+
+ std::shared_ptr<HwDisplayConnector> mConnector;
+ std::shared_ptr<HwDisplayCrtc> mCrtc;
+
+ uint32_t mHwcFbWidth;
+ uint32_t mHwcFbHeight;
+
+ std::map<uint32_t, drm_mode_info_t> mModes;
+ drm_mode_info_t mCurMode;
+ uint32_t mActiveConfigId;
+ bool mCallOnHotPlug;
+
+ // protect mMode and mActiveConfigId
+ std::mutex mMutex;
+};
+
+#endif // REAL_MODE_MGR_H