Lines Matching refs:hwcDisplayId
47 #define LOG_HWC_DISPLAY_ERROR(hwcDisplayId, msg) \ argument
48 ALOGE("%s failed for HWC display %" PRIu64 ": %s", __FUNCTION__, hwcDisplayId, msg)
117 bool HWComposer::getDisplayIdentificationData(hal::HWDisplayId hwcDisplayId, uint8_t* outPort, in getDisplayIdentificationData() argument
120 mComposer->getDisplayIdentificationData(hwcDisplayId, outPort, outData)); in getDisplayIdentificationData()
123 LOG_HWC_DISPLAY_ERROR(hwcDisplayId, to_string(error).c_str()); in getDisplayIdentificationData()
139 std::optional<DisplayIdentificationInfo> HWComposer::onHotplug(hal::HWDisplayId hwcDisplayId, in onHotplug() argument
143 return onHotplugConnect(hwcDisplayId); in onHotplug()
145 return onHotplugDisconnect(hwcDisplayId); in onHotplug()
155 std::optional<PhysicalDisplayId> HWComposer::onVsync(hal::HWDisplayId hwcDisplayId, in onVsync() argument
157 const auto displayIdOpt = toPhysicalDisplayId(hwcDisplayId); in onVsync()
159 LOG_HWC_DISPLAY_ERROR(hwcDisplayId, "Invalid HWC display"); in onVsync()
213 hal::HWDisplayId hwcDisplayId; in allocateVirtualDisplay() local
215 mComposer->createVirtualDisplay(width, height, format, &hwcDisplayId)); in allocateVirtualDisplay()
219 hwcDisplayId, hal::DisplayType::VIRTUAL); in allocateVirtualDisplay()
226 void HWComposer::allocatePhysicalDisplay(hal::HWDisplayId hwcDisplayId, in allocatePhysicalDisplay() argument
228 mPhysicalDisplayIdMap[hwcDisplayId] = displayId; in allocatePhysicalDisplay()
231 mPrimaryHwcDisplayId = hwcDisplayId; in allocatePhysicalDisplay()
236 std::make_unique<HWC2::impl::Display>(*mComposer.get(), mCapabilities, hwcDisplayId, in allocatePhysicalDisplay()
242 int32_t HWComposer::getAttribute(hal::HWDisplayId hwcDisplayId, hal::HWConfigId configId, in getAttribute() argument
246 mComposer->getDisplayAttribute(hwcDisplayId, configId, attribute, &value)); in getAttribute()
248 RETURN_IF_HWC_ERROR_FOR("getDisplayAttribute", error, *toPhysicalDisplayId(hwcDisplayId), -1); in getAttribute()
271 const auto hwcDisplayId = mDisplayData.at(displayId).hwcDisplay->getId(); in getModes() local
274 return getModesFromDisplayConfigurations(hwcDisplayId, maxFrameIntervalNs); in getModes()
277 return getModesFromLegacyDisplayConfigs(hwcDisplayId); in getModes()
281 uint64_t hwcDisplayId, int32_t maxFrameIntervalNs) const { in getModesFromDisplayConfigurations() argument
284 mComposer->getDisplayConfigurations(hwcDisplayId, maxFrameIntervalNs, &configs)); in getModesFromDisplayConfigurations()
285 RETURN_IF_HWC_ERROR_FOR("getDisplayConfigurations", error, *toPhysicalDisplayId(hwcDisplayId), in getModesFromDisplayConfigurations()
314 uint64_t hwcDisplayId) const { in getModesFromLegacyDisplayConfigs()
316 auto error = static_cast<hal::Error>(mComposer->getDisplayConfigs(hwcDisplayId, &configIds)); in getModesFromLegacyDisplayConfigs()
317 RETURN_IF_HWC_ERROR_FOR("getDisplayConfigs", error, *toPhysicalDisplayId(hwcDisplayId), {}); in getModesFromLegacyDisplayConfigs()
324 .width = getAttribute(hwcDisplayId, configId, hal::Attribute::WIDTH), in getModesFromLegacyDisplayConfigs()
325 .height = getAttribute(hwcDisplayId, configId, hal::Attribute::HEIGHT), in getModesFromLegacyDisplayConfigs()
326 .vsyncPeriod = getAttribute(hwcDisplayId, configId, hal::Attribute::VSYNC_PERIOD), in getModesFromLegacyDisplayConfigs()
327 .configGroup = getAttribute(hwcDisplayId, configId, hal::Attribute::CONFIG_GROUP), in getModesFromLegacyDisplayConfigs()
330 const int32_t dpiX = getAttribute(hwcDisplayId, configId, hal::Attribute::DPI_X); in getModesFromLegacyDisplayConfigs()
331 const int32_t dpiY = getAttribute(hwcDisplayId, configId, hal::Attribute::DPI_Y); in getModesFromLegacyDisplayConfigs()
695 const auto hwcDisplayId = displayData.hwcDisplay->getId(); in disconnectDisplay() local
697 mPhysicalDisplayIdMap.erase(hwcDisplayId); in disconnectDisplay()
703 if (mPrimaryHwcDisplayId == hwcDisplayId) { in disconnectDisplay()
1014 hal::HWDisplayId hwcDisplayId) const { in toPhysicalDisplayId()
1015 if (const auto it = mPhysicalDisplayIdMap.find(hwcDisplayId); in toPhysicalDisplayId()
1030 bool HWComposer::shouldIgnoreHotplugConnect(hal::HWDisplayId hwcDisplayId, in shouldIgnoreHotplugConnect() argument
1034 hwcDisplayId); in shouldIgnoreHotplugConnect()
1040 ALOGE("Ignoring connection of tertiary display %" PRIu64, hwcDisplayId); in shouldIgnoreHotplugConnect()
1048 hal::HWDisplayId hwcDisplayId) { in onHotplugConnect() argument
1050 if (const auto displayId = toPhysicalDisplayId(hwcDisplayId)) { in onHotplugConnect()
1057 getDisplayIdentificationData(hwcDisplayId, &port, &data); in onHotplugConnect()
1061 ALOGE("Failed to parse identification data for display %" PRIu64, hwcDisplayId); in onHotplugConnect()
1068 getDisplayIdentificationData(hwcDisplayId, &port, &data); in onHotplugConnect()
1075 if (shouldIgnoreHotplugConnect(hwcDisplayId, hasDisplayIdentificationData)) { in onHotplugConnect()
1079 info = [this, hwcDisplayId, &port, &data, hasDisplayIdentificationData] { in onHotplugConnect()
1085 ALOGE("Failed to parse identification data for display %" PRIu64, hwcDisplayId); in onHotplugConnect()
1088 "Ignoring identification data for display %" PRIu64, hwcDisplayId); in onHotplugConnect()
1098 mComposer->onHotplugConnect(hwcDisplayId); in onHotplugConnect()
1102 allocatePhysicalDisplay(hwcDisplayId, info->id); in onHotplugConnect()
1108 hal::HWDisplayId hwcDisplayId) { in onHotplugDisconnect() argument
1109 LOG_ALWAYS_FATAL_IF(hwcDisplayId == mPrimaryHwcDisplayId, in onHotplugDisconnect()
1112 const auto displayId = toPhysicalDisplayId(hwcDisplayId); in onHotplugDisconnect()
1114 LOG_HWC_DISPLAY_ERROR(hwcDisplayId, "Invalid HWC display"); in onHotplugDisconnect()
1119 LOG_HWC_DISPLAY_ERROR(hwcDisplayId, "Already disconnected"); in onHotplugDisconnect()
1126 mComposer->onHotplugDisconnect(hwcDisplayId); in onHotplugDisconnect()