1 /* 2 * Copyright (C) Texas Instruments Incorporated - http://www.ti.com/ 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 HWC_DEV_H 18 #define HWC_DEV_H 19 20 #include <mutex> 21 #include <thread> 22 23 #include <cstdbool> 24 #include <cstdint> 25 26 #include <hardware/hwcomposer.h> 27 #include <kms++/kms++.h> 28 29 #include "display.h" 30 31 typedef struct omap_hwc_module { 32 hwc_module_t base; 33 34 } omap_hwc_module_t; 35 36 typedef struct omap_hwc_device { 37 /* static data */ 38 hwc_composer_device_1_t device; 39 40 std::mutex mutex; 41 42 std::thread* hdmi_thread; 43 std::thread* event_thread; 44 45 kms::Card* card; 46 47 HWCDisplay* displays[MAX_DISPLAYS]; 48 49 kms::Connector* primaryConector; 50 kms::Connector* externalConector; 51 52 drmEventContext evctx; 53 54 const hwc_procs_t* cb_procs; 55 } omap_hwc_device_t; 56 57 #endif /* HWC_DEV_H */ 58