Home | History | Annotate | Download | only in devices
      1 /*
      2 // Copyright(c)2014 IntelCorporation
      3 //
      4 // LicensedundertheApacheLicense,Version2.0(the"License");
      5 // youmaynotusethisfileexceptincompliancewiththeLicense.
      6 // YoumayobtainacopyoftheLicenseat
      7 //
      8 // http://www.apache.org/licenses/LICENSE-2.0
      9 //
     10 // Unlessrequiredbyapplicablelaworagreedtoinwriting,software
     11 // distributedundertheLicenseisdistributedonan"ASIS"BASIS,
     12 // WITHOUTWARRANTIESORCONDITIONSOFANYKIND,eitherexpressorimplied.
     13 // SeetheLicenseforthespecificlanguagegoverningpermissionsand
     14 // limitationsundertheLicense.
     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 
     25 PrimaryDevice::PrimaryDevice(uint32_t disp, Hwcomposer& hwc, DisplayPlaneManager& dpm)
     26     : PhysicalDevice(disp, DEVICE_PRIMARY, hwc, dpm)
     27 {
     28     CTRACE();
     29 }
     30 
     31 PrimaryDevice::~PrimaryDevice()
     32 {
     33     CTRACE();
     34 }
     35 
     36 bool PrimaryDevice::initialize()
     37 {
     38     if (!PhysicalDevice::initialize()) {
     39         DEINIT_AND_RETURN_FALSE("failed to initialize physical device");
     40     }
     41 
     42     return true;
     43 }
     44 
     45 void PrimaryDevice::deinitialize()
     46 {
     47     PhysicalDevice::deinitialize();
     48 }
     49 
     50 bool 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