Lines Matching refs:disp

171         DisplayData& disp(mDisplayData[HWC_DISPLAY_PRIMARY]);  in HWComposer()  local
172 disp.connected = true; in HWComposer()
173 disp.format = mFbDev->format; in HWComposer()
180 disp.configs.push_back(config); in HWComposer()
181 disp.currentConfig = 0; in HWComposer()
263 void HWComposer::hook_vsync(const struct hwc_procs* procs, int disp, in hook_vsync() argument
267 ctx->hwc->vsync(disp, timestamp); in hook_vsync()
270 void HWComposer::hook_hotplug(const struct hwc_procs* procs, int disp, in hook_hotplug() argument
274 ctx->hwc->hotplug(disp, connected); in hook_hotplug()
281 void HWComposer::vsync(int disp, int64_t timestamp) { in vsync() argument
282 if (uint32_t(disp) < HWC_NUM_PHYSICAL_DISPLAY_TYPES) { in vsync()
290 if (timestamp == mLastHwVSync[disp]) { in vsync()
296 mLastHwVSync[disp] = timestamp; in vsync()
300 snprintf(tag, sizeof(tag), "HW_VSYNC_%1u", disp); in vsync()
301 ATRACE_INT(tag, ++mVSyncCounts[disp] & 1); in vsync()
303 mEventHandler.onVSyncReceived(disp, timestamp); in vsync()
307 void HWComposer::hotplug(int disp, int connected) { in hotplug() argument
308 if (disp >= VIRTUAL_DISPLAY_ID_BASE) { in hotplug()
310 disp, connected); in hotplug()
313 queryDisplayProperties(disp); in hotplug()
315 if (disp != HWC_DISPLAY_PRIMARY) { in hotplug()
316 mEventHandler.onHotplugReceived(disp, bool(connected)); in hotplug()
343 status_t HWComposer::queryDisplayProperties(int disp) { in queryDisplayProperties() argument
354 status_t err = mHwc->getDisplayConfigs(mHwc, disp, configs, &numConfigs); in queryDisplayProperties()
357 mDisplayData[disp].connected = false; in queryDisplayProperties()
361 mDisplayData[disp].currentConfig = 0; in queryDisplayProperties()
363 err = mHwc->getDisplayAttributes(mHwc, disp, configs[c], in queryDisplayProperties()
367 mDisplayData[disp].connected = false; in queryDisplayProperties()
402 mDisplayData[disp].configs.push_back(config); in queryDisplayProperties()
406 mDisplayData[disp].format = HAL_PIXEL_FORMAT_RGBA_8888; in queryDisplayProperties()
407 mDisplayData[disp].connected = true; in queryDisplayProperties()
451 nsecs_t HWComposer::getRefreshTimestamp(int disp) const { in getRefreshTimestamp()
457 size_t configId = mDisplayData[disp].currentConfig; in getRefreshTimestamp()
458 return now - ((now - mLastHwVSync[disp]) % in getRefreshTimestamp()
459 mDisplayData[disp].configs[configId].refresh); in getRefreshTimestamp()
462 sp<Fence> HWComposer::getDisplayFence(int disp) const { in getDisplayFence()
463 return mDisplayData[disp].lastDisplayFence; in getDisplayFence()
466 uint32_t HWComposer::getFormat(int disp) const { in getFormat()
467 if (static_cast<uint32_t>(disp) >= MAX_HWC_DISPLAYS || !mAllocatedDisplayIDs.hasBit(disp)) { in getFormat()
470 return mDisplayData[disp].format; in getFormat()
474 bool HWComposer::isConnected(int disp) const { in isConnected()
475 return mDisplayData[disp].connected; in isConnected()
478 uint32_t HWComposer::getWidth(int disp) const { in getWidth()
479 size_t currentConfig = mDisplayData[disp].currentConfig; in getWidth()
480 return mDisplayData[disp].configs[currentConfig].width; in getWidth()
483 uint32_t HWComposer::getHeight(int disp) const { in getHeight()
484 size_t currentConfig = mDisplayData[disp].currentConfig; in getHeight()
485 return mDisplayData[disp].configs[currentConfig].height; in getHeight()
488 float HWComposer::getDpiX(int disp) const { in getDpiX()
489 size_t currentConfig = mDisplayData[disp].currentConfig; in getDpiX()
490 return mDisplayData[disp].configs[currentConfig].xdpi; in getDpiX()
493 float HWComposer::getDpiY(int disp) const { in getDpiY()
494 size_t currentConfig = mDisplayData[disp].currentConfig; in getDpiY()
495 return mDisplayData[disp].configs[currentConfig].ydpi; in getDpiY()
498 nsecs_t HWComposer::getRefreshPeriod(int disp) const { in getRefreshPeriod()
499 size_t currentConfig = mDisplayData[disp].currentConfig; in getRefreshPeriod()
500 return mDisplayData[disp].configs[currentConfig].refresh; in getRefreshPeriod()
503 const Vector<HWComposer::DisplayConfig>& HWComposer::getConfigs(int disp) const { in getConfigs()
504 return mDisplayData[disp].configs; in getConfigs()
507 size_t HWComposer::getCurrentConfig(int disp) const { in getCurrentConfig()
508 return mDisplayData[disp].currentConfig; in getCurrentConfig()
511 void HWComposer::eventControl(int disp, int event, int enabled) { in eventControl() argument
512 if (uint32_t(disp)>31 || !mAllocatedDisplayIDs.hasBit(disp)) { in eventControl()
514 event, disp, enabled); in eventControl()
519 event, disp, enabled); in eventControl()
531 const int32_t oldValue = mDisplayData[disp].events & eventBit; in eventControl()
534 err = mHwc->eventControl(mHwc, disp, event, enabled); in eventControl()
536 int32_t& events(mDisplayData[disp].events); in eventControl()
540 snprintf(tag, sizeof(tag), "HW_VSYNC_ON_%1u", disp); in eventControl()
561 DisplayData& disp(mDisplayData[id]); in createWorkList() local
566 if (disp.capacity < numLayers || disp.list == NULL) { in createWorkList()
569 free(disp.list); in createWorkList()
570 disp.list = (hwc_display_contents_1_t*)malloc(size); in createWorkList()
571 disp.capacity = numLayers; in createWorkList()
574 disp.framebufferTarget = &disp.list->hwLayers[numLayers - 1]; in createWorkList()
575 memset(disp.framebufferTarget, 0, sizeof(hwc_layer_1_t)); in createWorkList()
577 disp.configs[disp.currentConfig]; in createWorkList()
580 disp.framebufferTarget->compositionType = HWC_FRAMEBUFFER_TARGET; in createWorkList()
581 disp.framebufferTarget->hints = 0; in createWorkList()
582 disp.framebufferTarget->flags = 0; in createWorkList()
583 disp.framebufferTarget->handle = disp.fbTargetHandle; in createWorkList()
584 disp.framebufferTarget->transform = 0; in createWorkList()
585 disp.framebufferTarget->blending = HWC_BLENDING_PREMULT; in createWorkList()
587 disp.framebufferTarget->sourceCropf.left = 0; in createWorkList()
588 disp.framebufferTarget->sourceCropf.top = 0; in createWorkList()
589 disp.framebufferTarget->sourceCropf.right = in createWorkList()
591 disp.framebufferTarget->sourceCropf.bottom = in createWorkList()
594 disp.framebufferTarget->sourceCrop = r; in createWorkList()
596 disp.framebufferTarget->displayFrame = r; in createWorkList()
597 disp.framebufferTarget->visibleRegionScreen.numRects = 1; in createWorkList()
598 disp.framebufferTarget->visibleRegionScreen.rects = in createWorkList()
599 &disp.framebufferTarget->displayFrame; in createWorkList()
600 disp.framebufferTarget->acquireFenceFd = -1; in createWorkList()
601 disp.framebufferTarget->releaseFenceFd = -1; in createWorkList()
602 disp.framebufferTarget->planeAlpha = 0xFF; in createWorkList()
604 disp.list->retireFenceFd = -1; in createWorkList()
605 disp.list->flags = HWC_GEOMETRY_CHANGED; in createWorkList()
606 disp.list->numHwLayers = numLayers; in createWorkList()
616 DisplayData& disp(mDisplayData[id]); in setFramebufferTarget() local
617 if (!disp.framebufferTarget) { in setFramebufferTarget()
631 disp.fbTargetHandle = buf->handle; in setFramebufferTarget()
632 disp.framebufferTarget->handle = disp.fbTargetHandle; in setFramebufferTarget()
633 disp.framebufferTarget->acquireFenceFd = acquireFenceFd; in setFramebufferTarget()
640 DisplayData& disp(mDisplayData[i]); in prepare() local
641 if (disp.framebufferTarget) { in prepare()
646 LOG_FATAL_IF(disp.list == NULL); in prepare()
647 disp.framebufferTarget->compositionType = HWC_FRAMEBUFFER_TARGET; in prepare()
649 if (!disp.connected && disp.list != NULL) { in prepare()
651 i, disp.list->numHwLayers); in prepare()
653 mLists[i] = disp.list; in prepare()
656 mLists[i]->outbuf = disp.outbufHandle; in prepare()
681 DisplayData& disp(mDisplayData[i]); in prepare() local
682 disp.hasFbComp = false; in prepare()
683 disp.hasOvComp = false; in prepare()
684 if (disp.list) { in prepare()
685 for (size_t i=0 ; i<disp.list->numHwLayers ; i++) { in prepare()
686 hwc_layer_1_t& l = disp.list->hwLayers[i]; in prepare()
695 disp.hasFbComp = true; in prepare()
698 disp.hasOvComp = true; in prepare()
701 disp.hasOvComp = true; in prepare()
704 if (disp.list->numHwLayers == (disp.framebufferTarget ? 1 : 0)) { in prepare()
705 disp.hasFbComp = true; in prepare()
708 disp.hasFbComp = true; in prepare()
733 const DisplayData& disp(mDisplayData[id]); in getAndResetReleaseFence() local
734 if (disp.framebufferTarget) { in getAndResetReleaseFence()
735 fd = disp.framebufferTarget->releaseFenceFd; in getAndResetReleaseFence()
736 disp.framebufferTarget->acquireFenceFd = -1; in getAndResetReleaseFence()
737 disp.framebufferTarget->releaseFenceFd = -1; in getAndResetReleaseFence()
755 DisplayData& disp(mDisplayData[i]); in commit() local
756 if (disp.outbufHandle) { in commit()
757 mLists[i]->outbuf = disp.outbufHandle; in commit()
759 disp.outbufAcquireFence->dup(); in commit()
766 DisplayData& disp(mDisplayData[i]); in commit() local
767 disp.lastDisplayFence = disp.lastRetireFence; in commit()
768 disp.lastRetireFence = Fence::NO_FENCE; in commit()
769 if (disp.list) { in commit()
770 if (disp.list->retireFenceFd != -1) { in commit()
771 disp.lastRetireFence = new Fence(disp.list->retireFenceFd); in commit()
772 disp.list->retireFenceFd = -1; in commit()
774 disp.list->flags &= ~HWC_GEOMETRY_CHANGED; in commit()
781 status_t HWComposer::setPowerMode(int disp, int mode) { in setPowerMode() argument
782 LOG_FATAL_IF(disp >= VIRTUAL_DISPLAY_ID_BASE); in setPowerMode()
785 eventControl(disp, HWC_EVENT_VSYNC, 0); in setPowerMode()
788 return (status_t)mHwc->setPowerMode(mHwc, disp, mode); in setPowerMode()
790 return (status_t)mHwc->blank(mHwc, disp, in setPowerMode()
797 status_t HWComposer::setActiveConfig(int disp, int mode) { in setActiveConfig() argument
798 LOG_FATAL_IF(disp >= VIRTUAL_DISPLAY_ID_BASE); in setActiveConfig()
799 DisplayData& dd(mDisplayData[disp]); in setActiveConfig()
802 return (status_t)mHwc->setActiveConfig(mHwc, disp, mode); in setActiveConfig()
809 void HWComposer::disconnectDisplay(int disp) { in disconnectDisplay() argument
810 LOG_ALWAYS_FATAL_IF(disp < 0 || disp == HWC_DISPLAY_PRIMARY); in disconnectDisplay()
811 DisplayData& dd(mDisplayData[disp]); in disconnectDisplay()
878 DisplayData& disp(mDisplayData[id]); in setOutputBuffer() local
879 disp.outbufHandle = buf->handle; in setOutputBuffer()
880 disp.outbufAcquireFence = acquireFence; in setOutputBuffer()
1094 const DisplayData& disp(mDisplayData[id]); in getLayerIterator() local
1095 if (!mHwc || !disp.list || index > disp.list->numHwLayers) { in getLayerIterator()
1098 return LayerListIterator(new HWCLayerVersion1(mHwc, disp.list->hwLayers), index); in getLayerIterator()
1114 const DisplayData& disp(mDisplayData[id]); in end() local
1115 if (mHwc && disp.list) { in end()
1116 numLayers = disp.list->numHwLayers; in end()
1154 const DisplayData& disp(mDisplayData[i]); in dump() local
1155 if (!disp.connected) in dump()
1163 for (size_t c = 0; c < disp.configs.size(); ++c) { in dump()
1164 const DisplayConfig& config(disp.configs[c]); in dump()
1166 c == disp.currentConfig ? "* " : "", c, config.width, config.height, in dump()
1170 if (disp.list) { in dump()
1173 disp.list->numHwLayers, disp.list->flags); in dump()
1179 for (size_t i=0 ; i<disp.list->numHwLayers ; i++) { in dump()
1180 const hwc_layer_1_t&l = disp.list->hwLayers[i]; in dump()
1197 format = disp.format; in dump()