Loading libs/vr/libdisplay/include/private/dvr/display_protocol.h +2 −1 Original line number Diff line number Diff line Loading @@ -191,7 +191,8 @@ struct SurfaceInfo { enum class ConfigFileType : uint32_t { kLensMetrics, kDeviceMetrics, kDeviceConfiguration kDeviceConfiguration, kDeviceEdid }; struct DisplayProtocol { Loading libs/vr/libdvr/include/dvr/dvr_api.h +2 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,8 @@ enum { DVR_CONFIGURATION_DATA_DEVICE_METRICS = 1, // Request the per device configuration data file. DVR_CONFIGURATION_DATA_DEVICE_CONFIG = 2, // Request the edid data for the display. DVR_CONFIGURATION_DATA_DEVICE_EDID = 3, }; // dvr_display_manager.h Loading libs/vr/libvrflinger/display_service.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,18 @@ DisplayService::DisplayService(Hwc2::Composer* hidl, Endpoint::Create(display::DisplayProtocol::kClientPath)) { hardware_composer_.Initialize( hidl, primary_display_id, request_display_callback); uint8_t port; const auto error = hidl->getDisplayIdentificationData( primary_display_id, &port, &display_identification_data_); if (error != android::hardware::graphics::composer::V2_1::Error::NONE) { if (error != android::hardware::graphics::composer::V2_1::Error::UNSUPPORTED) { ALOGI("DisplayService: identification data error\n"); } else { ALOGI("DisplayService: identification data unsupported\n"); } } } bool DisplayService::IsInitialized() const { Loading Loading @@ -204,6 +216,12 @@ pdx::Status<std::string> DisplayService::OnGetConfigurationData( case display::ConfigFileType::kDeviceConfiguration: property_name = kDvrDeviceConfigProperty; break; case display::ConfigFileType::kDeviceEdid: if (display_identification_data_.size() == 0) { return ErrorStatus(ENOENT); } return std::string(display_identification_data_.begin(), display_identification_data_.end()); default: return ErrorStatus(EINVAL); } Loading libs/vr/libvrflinger/display_service.h +4 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ #include "epoll_event_dispatcher.h" #include "hardware_composer.h" #include "DisplayHardware/DisplayIdentification.h" namespace android { namespace dvr { Loading Loading @@ -117,6 +119,8 @@ class DisplayService : public pdx::ServiceBase<DisplayService> { DisplayService(const DisplayService&) = delete; void operator=(const DisplayService&) = delete; DisplayIdentificationData display_identification_data_; }; } // namespace dvr Loading Loading
libs/vr/libdisplay/include/private/dvr/display_protocol.h +2 −1 Original line number Diff line number Diff line Loading @@ -191,7 +191,8 @@ struct SurfaceInfo { enum class ConfigFileType : uint32_t { kLensMetrics, kDeviceMetrics, kDeviceConfiguration kDeviceConfiguration, kDeviceEdid }; struct DisplayProtocol { Loading
libs/vr/libdvr/include/dvr/dvr_api.h +2 −0 Original line number Diff line number Diff line Loading @@ -85,6 +85,8 @@ enum { DVR_CONFIGURATION_DATA_DEVICE_METRICS = 1, // Request the per device configuration data file. DVR_CONFIGURATION_DATA_DEVICE_CONFIG = 2, // Request the edid data for the display. DVR_CONFIGURATION_DATA_DEVICE_EDID = 3, }; // dvr_display_manager.h Loading
libs/vr/libvrflinger/display_service.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,18 @@ DisplayService::DisplayService(Hwc2::Composer* hidl, Endpoint::Create(display::DisplayProtocol::kClientPath)) { hardware_composer_.Initialize( hidl, primary_display_id, request_display_callback); uint8_t port; const auto error = hidl->getDisplayIdentificationData( primary_display_id, &port, &display_identification_data_); if (error != android::hardware::graphics::composer::V2_1::Error::NONE) { if (error != android::hardware::graphics::composer::V2_1::Error::UNSUPPORTED) { ALOGI("DisplayService: identification data error\n"); } else { ALOGI("DisplayService: identification data unsupported\n"); } } } bool DisplayService::IsInitialized() const { Loading Loading @@ -204,6 +216,12 @@ pdx::Status<std::string> DisplayService::OnGetConfigurationData( case display::ConfigFileType::kDeviceConfiguration: property_name = kDvrDeviceConfigProperty; break; case display::ConfigFileType::kDeviceEdid: if (display_identification_data_.size() == 0) { return ErrorStatus(ENOENT); } return std::string(display_identification_data_.begin(), display_identification_data_.end()); default: return ErrorStatus(EINVAL); } Loading
libs/vr/libvrflinger/display_service.h +4 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ #include "epoll_event_dispatcher.h" #include "hardware_composer.h" #include "DisplayHardware/DisplayIdentification.h" namespace android { namespace dvr { Loading Loading @@ -117,6 +119,8 @@ class DisplayService : public pdx::ServiceBase<DisplayService> { DisplayService(const DisplayService&) = delete; void operator=(const DisplayService&) = delete; DisplayIdentificationData display_identification_data_; }; } // namespace dvr Loading