• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef ANDROID_EXYNOS_HWC_MODULE_GS201_H_
18 #define ANDROID_EXYNOS_HWC_MODULE_GS201_H_
19 
20 #include "../../gs101/libhwc2.1/ExynosHWCModule.h"
21 
22 namespace gs201 {
23 
24 static const char *early_wakeup_node_0_base =
25     "/sys/devices/platform/1c240000.drmdecon/early_wakeup";
26 
27 static const dpp_channel_map_t idma_channel_map[] = {
28     /* GF physical index is switched to change assign order */
29     /* DECON_IDMA is not used */
30     {MPP_DPP_GF,     0, IDMA(0),   IDMA(0)},
31     {MPP_DPP_VGRFS,  0, IDMA(1),   IDMA(1)},
32     {MPP_DPP_GF,     1, IDMA(2),   IDMA(2)},
33     {MPP_DPP_VGRFS,  1, IDMA(3),   IDMA(3)},
34     {MPP_DPP_GF,     2, IDMA(4),   IDMA(4)},
35     {MPP_DPP_VGRFS,  2, IDMA(5),   IDMA(5)},
36     {MPP_P_TYPE_MAX, 0, IDMA(6),   IDMA(6)}, // not idma but..
37     {static_cast<mpp_phycal_type_t>(MAX_DECON_DMA_TYPE), 0, MAX_DECON_DMA_TYPE, IDMA(7)}
38 };
39 
40 static const exynos_mpp_t available_otf_mpp_units[] = {
41     {MPP_DPP_GF, MPP_LOGICAL_DPP_GF, "DPP_GF0", 0, 0, HWC_RESERVE_DISPLAY_MAIN_BIT, 0, 0},
42     {MPP_DPP_GF, MPP_LOGICAL_DPP_GF, "DPP_GF1", 1, 0, HWC_RESERVE_DISPLAY_MAIN_BIT, 0, 0},
43     {MPP_DPP_GF, MPP_LOGICAL_DPP_GF, "DPP_GF2", 2, 0, HWC_RESERVE_DISPLAY_MAIN_BIT, 0, 0},
44     {MPP_DPP_VGRFS, MPP_LOGICAL_DPP_VGRFS, "DPP_VGRFS0", 0, 0, HWC_RESERVE_DISPLAY_MAIN_BIT, 0, 0},
45     {MPP_DPP_VGRFS, MPP_LOGICAL_DPP_VGRFS, "DPP_VGRFS1", 1, 0, HWC_RESERVE_DISPLAY_MAIN_BIT, 0, 0},
46     {MPP_DPP_VGRFS, MPP_LOGICAL_DPP_VGRFS, "DPP_VGRFS2", 2, 0, HWC_RESERVE_DISPLAY_MINOR_BIT, 0, 0}
47 };
48 
49 static const std::array<exynos_display_t, 2> AVAILABLE_DISPLAY_UNITS = {{
50     {HWC_DISPLAY_PRIMARY, 0, "PrimaryDisplay", "/dev/dri/card0", ""},
51     {HWC_DISPLAY_PRIMARY, 1, "SecondaryDisplay", "/dev/dri/card0", ""}
52 }};
53 
54 } // namespace gs201
55 
56 #endif // ANDROID_EXYNOS_HWC_MODULE_GS201_H_
57