Home | History | Annotate | Download | only in DisplayHardware

Lines Matching refs:displayId

92 bool HWComposer::isValidDisplay(int32_t displayId) const {
93 return static_cast<size_t>(displayId) < mDisplayData.size() &&
94 mDisplayData[displayId].hwcDisplay;
122 void HWComposer::onHotplug(hwc2_display_t displayId,
124 ALOGV("hotplug: %" PRIu64 ", %s", displayId,
126 mHwcDevice->onHotplug(displayId, connection);
130 mDisplayData[0].hwcDisplay = mHwcDevice->getDisplayById(displayId);
131 mHwcDisplaySlots[displayId] = 0;
136 mDisplayData[1].hwcDisplay = mHwcDevice->getDisplayById(displayId);
137 mHwcDisplaySlots[displayId] = 1;
142 bool HWComposer::onVsync(hwc2_display_t displayId, int64_t timestamp,
144 auto display = mHwcDevice->getDisplayById(displayId);
146 ALOGE("onVsync Failed to find display %" PRIu64, displayId);
242 HWC2::Layer* HWComposer::createLayer(int32_t displayId) {
243 if (!isValidDisplay(displayId)) {
244 ALOGE("Failed to create layer on invalid display %d", displayId);
247 auto display = mDisplayData[displayId].hwcDisplay;
251 ALOGE("Failed to create layer on display %d: %s (%d)", displayId,
258 void HWComposer::destroyLayer(int32_t displayId, HWC2::Layer* layer) {
259 if (!isValidDisplay(displayId)) {
260 ALOGE("Failed to destroy layer on invalid display %d", displayId);
263 auto display = mDisplayData[displayId].hwcDisplay;
266 ALOGE("Failed to destroy layer on display %d: %s (%d)", displayId,
271 nsecs_t HWComposer::getRefreshTimestamp(int32_t displayId) const {
277 auto vsyncPeriod = getActiveConfig(displayId)->getVsyncPeriod();
278 return now - ((now - mLastHwVSync[displayId]) % vsyncPeriod);
281 bool HWComposer::isConnected(int32_t displayId) const {
282 if (!isValidDisplay(displayId)) {
283 ALOGE("isConnected: Attempted to access invalid display %d", displayId);
286 return mDisplayData[displayId].hwcDisplay->isConnected();
290 HWComposer::getConfigs(int32_t displayId) const {
291 if (!isValidDisplay(displayId)) {
292 ALOGE("getConfigs: Attempted to access invalid display %d", displayId);
295 auto& displayData = mDisplayData[displayId];
296 auto configs = mDisplayData[displayId].hwcDisplay->getConfigs();
306 HWComposer::getActiveConfig(int32_t displayId) const {
307 if (!isValidDisplay(displayId)) {
309 displayId);
313 auto error = mDisplayData[displayId].hwcDisplay->getActiveConfig(&config);
318 ALOGE("getActiveConfig failed for display %d: %s (%d)", displayId,
323 displayId);
330 std::vector<android_color_mode_t> HWComposer::getColorModes(int32_t displayId) const {
333 if (!isValidDisplay(displayId)) {
335 displayId);
339 auto error = mDisplayData[displayId].hwcDisplay->getColorModes(&modes);
341 ALOGE("getColorModes failed for display %d: %s (%d)", displayId,
349 status_t HWComposer::setActiveColorMode(int32_t displayId, android_color_mode_t mode) {
350 if (!isValidDisplay(displayId)) {
351 ALOGE("setActiveColorMode: Display %d is not valid", displayId);
355 auto& displayData = mDisplayData[displayId];
359 "%s (%d)", mode, displayId, to_string(error).c_str(),
368 void HWComposer::setVsyncEnabled(int32_t displayId, HWC2::Vsync enabled) {
369 if (displayId < 0 || displayId >= HWC_DISPLAY_VIRTUAL) {
370 ALOGD("setVsyncEnabled: Ignoring for virtual display %d", displayId);
374 if (!isValidDisplay(displayId)) {
376 displayId);
385 auto& displayData = mDisplayData[displayId];
393 snprintf(tag, sizeof(tag), "HW_VSYNC_ON_%1u", displayId);
397 ": %s (%d)", to_string(enabled).c_str(), displayId,
398 mDisplayData[displayId].hwcDisplay->getId(),
404 status_t HWComposer::setClientTarget(int32_t displayId, uint32_t slot,
407 if (!isValidDisplay(displayId)) {
411 ALOGV("setClientTarget for display %d", displayId);
412 auto& hwcDisplay = mDisplayData[displayId].hwcDisplay;
415 ALOGE("Failed to set client target for display %d: %s (%d)", displayId,
427 auto displayId = displayDevice.getHwcDisplayId();
428 if (displayId == DisplayDevice::DISPLAY_ID_INVALID) {
432 if (!isValidDisplay(displayId)) {
436 auto& displayData = mDisplayData[displayId];
473 displayId,
483 "%s (%d)", displayId, to_string(error).c_str(),
495 ALOGE("prepare: getRequests failed on display %d: %s (%d)", displayId,
503 auto hwcLayer = layer->getHwcLayer(displayId);
508 validateChange(layer->getCompositionType(displayId),
510 layer->setCompositionType(displayId, changedTypes[hwcLayer], false);
513 switch (layer->getCompositionType(displayId)) {
530 layer->setClearClientTarget(displayId, true);
536 layer->setClearClientTarget(displayId, false);
549 bool HWComposer::hasDeviceComposition(int32_t displayId) const {
550 if (displayId == DisplayDevice::DISPLAY_ID_INVALID) {
555 if (!isValidDisplay(displayId)) {
556 ALOGE("hasDeviceComposition: Invalid display %d", displayId);
559 return mDisplayData[displayId].hasDeviceComposition;
562 bool HWComposer::hasClientComposition(int32_t displayId) const {
563 if (displayId == DisplayDevice::DISPLAY_ID_INVALID) {
568 if (!isValidDisplay(displayId)) {
569 ALOGE("hasClientComposition: Invalid display %d", displayId);
572 return mDisplayData[displayId].hasClientComposition;
575 sp<Fence> HWComposer::getPresentFence(int32_t displayId) const {
576 if (!isValidDisplay(displayId)) {
577 ALOGE("getPresentFence failed for invalid display %d", displayId);
580 return mDisplayData[displayId].lastPresentFence;
583 sp<Fence> HWComposer::getLayerReleaseFence(int32_t displayId,
585 if (!isValidDisplay(displayId)) {
589 auto displayFences = mDisplayData[displayId].releaseFences;
597 status_t HWComposer::presentAndGetReleaseFences(int32_t displayId) {
600 if (!isValidDisplay(displayId)) {
604 auto& displayData = mDisplayData[displayId];
612 displayId, to_string(error).c_str(), static_cast<int32_t>(error));
621 displayId, to_string(error).c_str(), static_cast<int32_t>(error));
630 displayId, to_string(error).c_str(),
640 status_t HWComposer::setPowerMode(int32_t displayId, int32_t intMode) {
641 ALOGV("setPowerMode(%d, %d)", displayId, intMode);
642 if (!isValidDisplay(displayId)) {
646 if (displayId >= VIRTUAL_DISPLAY_ID_BASE) {
648 displayId);
654 setVsyncEnabled(displayId, HWC2::Vsync::Disable);
657 auto& hwcDisplay = mDisplayData[displayId].hwcDisplay;
667 displayId, to_string(error).c_str(),
680 "display %d: %s (%d)", displayId,
692 displayId, to_string(error).c_str(),
705 status_t HWComposer::setActiveConfig(int32_t displayId, size_t configId) {
706 if (!isValidDisplay(displayId)) {
707 ALOGE("setActiveConfig: Display %d is not valid", displayId);
711 auto& displayData = mDisplayData[displayId];
721 "%s (%d)", configId, displayId, to_string(error).c_str(),
729 status_t HWComposer::setColorTransform(int32_t displayId,
731 if (!isValidDisplay(displayId)) {
732 ALOGE("setColorTransform: Display %d is not valid", displayId);
736 auto& displayData = mDisplayData[displayId];
743 "%s (%d)", displayId, to_string(error).c_str(),
751 void HWComposer::disconnectDisplay(int displayId) {
752 LOG_ALWAYS_FATAL_IF(displayId < 0);
753 auto& displayData = mDisplayData[displayId];
759 displayId);
766 mFreeDisplaySlots.insert(displayId);
777 status_t HWComposer::setOutputBuffer(int32_t displayId,
779 if (!isValidDisplay(displayId)) {
780 ALOGE("setOutputBuffer: Display %d is not valid", displayId);
784 auto& hwcDisplay = mDisplayData[displayId].hwcDisplay;
789 displayId);
794 ALOGE("setOutputBuffer: Display %d is not virtual", displayId);
801 displayId, to_string(error).c_str(),
809 void HWComposer::clearReleaseFences(int32_t displayId) {
810 if (!isValidDisplay(displayId)) {
811 ALOGE("clearReleaseFences: Display %d is not valid", displayId);
814 mDisplayData[displayId].releaseFences.clear();
818 int32_t displayId) {
819 if (!isValidDisplay(displayId)) {
820 ALOGE("getHdrCapabilities: Display %d is not valid", displayId);
824 auto& hwcDisplay = mDisplayData[displayId].hwcDisplay;
829 " %s (%d)", displayId, to_string(error).c_str(),