Lines Matching refs:hwcDisplayId
39 #define LOG_HWC_DISPLAY_ERROR(hwcDisplayId, msg) \ argument
40 ALOGE("%s failed for HWC display %" PRIu64 ": %s", __FUNCTION__, hwcDisplayId, msg)
86 bool HWComposer::getDisplayIdentificationData(hwc2_display_t hwcDisplayId, uint8_t* outPort, in getDisplayIdentificationData() argument
88 const auto error = mHwcDevice->getDisplayIdentificationData(hwcDisplayId, outPort, outData); in getDisplayIdentificationData()
91 LOG_HWC_DISPLAY_ERROR(hwcDisplayId, to_string(error).c_str()); in getDisplayIdentificationData()
141 std::optional<DisplayIdentificationInfo> HWComposer::onHotplug(hwc2_display_t hwcDisplayId, in onHotplug() argument
145 if (const auto displayId = toPhysicalDisplayId(hwcDisplayId)) { in onHotplug()
149 ALOGE("Ignoring disconnection of invalid HWC display %" PRIu64, hwcDisplayId); in onHotplug()
153 info = onHotplugConnect(hwcDisplayId); in onHotplug()
158 hwcDisplayId == mInternalHwcDisplayId ? "internal" : "external", in onHotplug()
159 to_string(info->id).c_str(), hwcDisplayId); in onHotplug()
161 mHwcDevice->onHotplug(hwcDisplayId, connection); in onHotplug()
166 mDisplayData[info->id].hwcDisplay = mHwcDevice->getDisplayById(hwcDisplayId); in onHotplug()
167 mPhysicalDisplayIdMap[hwcDisplayId] = info->id; in onHotplug()
173 bool HWComposer::onVsync(hwc2_display_t hwcDisplayId, int64_t timestamp) { in onVsync() argument
174 const auto displayId = toPhysicalDisplayId(hwcDisplayId); in onVsync()
176 LOG_HWC_DISPLAY_ERROR(hwcDisplayId, "Invalid HWC display"); in onVsync()
681 const auto hwcDisplayId = displayData.hwcDisplay->getId(); in disconnectDisplay() local
682 mPhysicalDisplayIdMap.erase(hwcDisplayId); in disconnectDisplay()
686 if (hwcDisplayId == mInternalHwcDisplayId) { in disconnectDisplay()
688 } else if (hwcDisplayId == mExternalHwcDisplayId) { in disconnectDisplay()
692 mHwcDevice->destroyDisplay(hwcDisplayId); in disconnectDisplay()
811 std::optional<DisplayId> HWComposer::toPhysicalDisplayId(hwc2_display_t hwcDisplayId) const { in toPhysicalDisplayId()
812 if (const auto it = mPhysicalDisplayIdMap.find(hwcDisplayId); in toPhysicalDisplayId()
827 std::optional<DisplayIdentificationInfo> HWComposer::onHotplugConnect(hwc2_display_t hwcDisplayId) { in onHotplugConnect() argument
829 ALOGE("Ignoring connection of external display %" PRIu64 " in VR mode", hwcDisplayId); in onHotplugConnect()
835 const bool hasMultiDisplaySupport = getDisplayIdentificationData(hwcDisplayId, &port, &data); in onHotplugConnect()
843 hwcDisplayId); in onHotplugConnect()
851 ALOGE_IF(!info, "Failed to parse identification data for display %" PRIu64, hwcDisplayId); in onHotplugConnect()
853 ALOGE("Ignoring connection of tertiary display %" PRIu64, hwcDisplayId); in onHotplugConnect()
857 hwcDisplayId); in onHotplugConnect()
862 mInternalHwcDisplayId = hwcDisplayId; in onHotplugConnect()
864 mExternalHwcDisplayId = hwcDisplayId; in onHotplugConnect()
870 hwcDisplayId == mInternalHwcDisplayId ? "Internal display" in onHotplugConnect()