1 /* 2 // Copyright (c) 2014 Intel Corporation 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 #include <common/utils/HwcTrace.h> 17 #include <common/base/Drm.h> 18 #include <Hwcomposer.h> 19 #include <DrmConfig.h> 20 #include <PrimaryDevice.h> 21 22 namespace android { 23 namespace intel { 24 PrimaryDevice(Hwcomposer & hwc,DisplayPlaneManager & dpm)25PrimaryDevice::PrimaryDevice(Hwcomposer& hwc, DisplayPlaneManager& dpm) 26 : PhysicalDevice(DEVICE_PRIMARY, hwc, dpm) 27 { 28 CTRACE(); 29 } 30 ~PrimaryDevice()31PrimaryDevice::~PrimaryDevice() 32 { 33 CTRACE(); 34 } 35 initialize()36bool PrimaryDevice::initialize() 37 { 38 if (!PhysicalDevice::initialize()) { 39 DEINIT_AND_RETURN_FALSE("failed to initialize physical device"); 40 } 41 42 return true; 43 } 44 deinitialize()45void PrimaryDevice::deinitialize() 46 { 47 PhysicalDevice::deinitialize(); 48 } 49 blank(bool blank)50bool PrimaryDevice::blank(bool blank) 51 { 52 if (!mConnected) 53 return true; 54 55 return PhysicalDevice::blank(blank); 56 } 57 58 } // namespace intel 59 } // namespace android 60