Lines Matching refs:hwcDisplayId
45 #define LOG_HWC_DISPLAY_ERROR(hwcDisplayId, msg) \ argument
46 ALOGE("%s failed for HWC display %" PRIu64 ": %s", __FUNCTION__, hwcDisplayId, msg)
166 bool HWComposer::getDisplayIdentificationData(hal::HWDisplayId hwcDisplayId, uint8_t* outPort, in getDisplayIdentificationData() argument
169 mComposer->getDisplayIdentificationData(hwcDisplayId, outPort, outData)); in getDisplayIdentificationData()
172 LOG_HWC_DISPLAY_ERROR(hwcDisplayId, to_string(error).c_str()); in getDisplayIdentificationData()
189 std::optional<DisplayIdentificationInfo> HWComposer::onHotplug(hal::HWDisplayId hwcDisplayId, in onHotplug() argument
193 return onHotplugConnect(hwcDisplayId); in onHotplug()
195 return onHotplugDisconnect(hwcDisplayId); in onHotplug()
205 bool HWComposer::onVsync(hal::HWDisplayId hwcDisplayId, int64_t timestamp) { in onVsync() argument
206 const auto displayId = toPhysicalDisplayId(hwcDisplayId); in onVsync()
208 LOG_HWC_DISPLAY_ERROR(hwcDisplayId, "Invalid HWC display"); in onVsync()
270 hal::HWDisplayId hwcDisplayId; in allocateVirtualDisplay() local
272 mComposer->createVirtualDisplay(width, height, format, hwcMirrorId, &hwcDisplayId)); in allocateVirtualDisplay()
276 hwcDisplayId, hal::DisplayType::VIRTUAL); in allocateVirtualDisplay()
284 void HWComposer::allocatePhysicalDisplay(hal::HWDisplayId hwcDisplayId, in allocatePhysicalDisplay() argument
286 mPhysicalDisplayIdMap[hwcDisplayId] = displayId; in allocatePhysicalDisplay()
289 mInternalHwcDisplayId = hwcDisplayId; in allocatePhysicalDisplay()
290 } else if (mInternalHwcDisplayId != hwcDisplayId && !mExternalHwcDisplayId) { in allocatePhysicalDisplay()
291 mExternalHwcDisplayId = hwcDisplayId; in allocatePhysicalDisplay()
296 std::make_unique<HWC2::impl::Display>(*mComposer.get(), mCapabilities, hwcDisplayId, in allocatePhysicalDisplay()
302 int32_t HWComposer::getAttribute(hal::HWDisplayId hwcDisplayId, hal::HWConfigId configId, in getAttribute() argument
306 mComposer->getDisplayAttribute(hwcDisplayId, configId, attribute, &value)); in getAttribute()
308 RETURN_IF_HWC_ERROR_FOR("getDisplayAttribute", error, *toPhysicalDisplayId(hwcDisplayId), -1); in getAttribute()
334 const auto hwcDisplayId = mDisplayData.at(displayId).hwcDisplay->getId(); in getModes() local
336 auto error = static_cast<hal::Error>(mComposer->getDisplayConfigs(hwcDisplayId, &configIds)); in getModes()
337 RETURN_IF_HWC_ERROR_FOR("getDisplayConfigs", error, *toPhysicalDisplayId(hwcDisplayId), {}); in getModes()
344 .width = getAttribute(hwcDisplayId, configId, hal::Attribute::WIDTH), in getModes()
345 .height = getAttribute(hwcDisplayId, configId, hal::Attribute::HEIGHT), in getModes()
346 .vsyncPeriod = getAttribute(hwcDisplayId, configId, hal::Attribute::VSYNC_PERIOD), in getModes()
347 .dpiX = getAttribute(hwcDisplayId, configId, hal::Attribute::DPI_X), in getModes()
348 .dpiY = getAttribute(hwcDisplayId, configId, hal::Attribute::DPI_Y), in getModes()
349 .configGroup = getAttribute(hwcDisplayId, configId, hal::Attribute::CONFIG_GROUP), in getModes()
685 const auto hwcDisplayId = displayData.hwcDisplay->getId(); in disconnectDisplay() local
688 if (hwcDisplayId == mInternalHwcDisplayId) { in disconnectDisplay()
690 } else if (hwcDisplayId == mExternalHwcDisplayId) { in disconnectDisplay()
693 mPhysicalDisplayIdMap.erase(hwcDisplayId); in disconnectDisplay()
852 hal::HWDisplayId hwcDisplayId) const { in toPhysicalDisplayId()
853 if (const auto it = mPhysicalDisplayIdMap.find(hwcDisplayId); in toPhysicalDisplayId()
869 bool HWComposer::shouldIgnoreHotplugConnect(hal::HWDisplayId hwcDisplayId, in shouldIgnoreHotplugConnect() argument
873 hwcDisplayId); in shouldIgnoreHotplugConnect()
878 ALOGE("Ignoring connection of tertiary display %" PRIu64, hwcDisplayId); in shouldIgnoreHotplugConnect()
886 hal::HWDisplayId hwcDisplayId) { in onHotplugConnect() argument
888 if (const auto displayId = toPhysicalDisplayId(hwcDisplayId)) { in onHotplugConnect()
895 getDisplayIdentificationData(hwcDisplayId, &port, &data); in onHotplugConnect()
899 ALOGE("Failed to parse identification data for display %" PRIu64, hwcDisplayId); in onHotplugConnect()
906 getDisplayIdentificationData(hwcDisplayId, &port, &data); in onHotplugConnect()
913 if (shouldIgnoreHotplugConnect(hwcDisplayId, hasDisplayIdentificationData)) { in onHotplugConnect()
917 info = [this, hwcDisplayId, &port, &data, hasDisplayIdentificationData] { in onHotplugConnect()
923 ALOGE("Failed to parse identification data for display %" PRIu64, hwcDisplayId); in onHotplugConnect()
926 "Ignoring identification data for display %" PRIu64, hwcDisplayId); in onHotplugConnect()
938 allocatePhysicalDisplay(hwcDisplayId, info->id); in onHotplugConnect()
944 hal::HWDisplayId hwcDisplayId) { in onHotplugDisconnect() argument
945 const auto displayId = toPhysicalDisplayId(hwcDisplayId); in onHotplugDisconnect()
947 ALOGE("Ignoring disconnection of invalid HWC display %" PRIu64, hwcDisplayId); in onHotplugDisconnect()
956 ALOGW("Attempted to disconnect unknown display %" PRIu64, hwcDisplayId); in onHotplugDisconnect()