Lines Matching refs:output

93     DrmOutput *output = &mOutputs[outputIndex];  in detect()  local
121 output->connector = connector; in detect()
122 output->connected = true; in detect()
127 output->encoder = drmModeGetEncoder(mDrmFd, connector->encoder_id); in detect()
128 if (!output->encoder) { in detect()
133 if (!output->encoder) { in detect()
148 output->encoder = encoder; in detect()
155 if (!output->encoder) { in detect()
161 if (output->encoder->crtc_id) { in detect()
163 output->crtc = drmModeGetCrtc(mDrmFd, output->encoder->crtc_id); in detect()
164 if (!output->crtc) { in detect()
169 if (!output->crtc) { in detect()
184 if (output->encoder->possible_crtcs & (1<<j)) { in detect()
186 output->crtc = crtc; in detect()
193 if (!output->crtc) { in detect()
199 if (output->crtc->mode_valid) { in detect()
201 memcpy(&output->mode, &output->crtc->mode, sizeof(drmModeModeInfo)); in detect()
209 if (!readIoctl(DRM_PSB_PANEL_ORIENTATION, &output->panelOrientation, sizeof(int))) { in detect()
211 output->panelOrientation = PANEL_ORIENTATION_0; in detect()
214 output->panelOrientation = PANEL_ORIENTATION_0; in detect()
220 if (output->connector == NULL && outputIndex != OUTPUT_PRIMARY) { in detect()
227 } else if (output->connected) { in detect()
228 …ILOGTRACE("mode is: %dx%d@%dHz", output->mode.hdisplay, output->mode.vdisplay, output->mode.vrefre… in detect()
265 DrmOutput *output= &mOutputs[outputIndex]; in setDrmMode() local
266 if (!output->connected) { in setDrmMode()
271 if (output->connector->count_modes <= 0) { in setDrmMode()
278 for (int i = 0; i < output->connector->count_modes; i++) { in setDrmMode()
279 mode = &output->connector->modes[i]; in setDrmMode()
289 mode = &output->connector->modes[index]; in setDrmMode()
309 DrmOutput *output= &mOutputs[outputIndex]; in setRefreshRate() local
310 if (!output->connected) { in setRefreshRate()
315 if (output->connector->count_modes <= 0) { in setRefreshRate()
322 for (int i = 0; i < output->connector->count_modes; i++) { in setRefreshRate()
323 mode = &output->connector->modes[i]; in setRefreshRate()
327 if (mode->hdisplay == output->mode.hdisplay && in setRefreshRate()
328 mode->vdisplay == output->mode.vdisplay && in setRefreshRate()
335 mode = &output->connector->modes[index]; in setRefreshRate()
427 DrmOutput *output= &mOutputs[outputIndex]; in getModeInfo() local
428 if (output->connected == false) { in getModeInfo()
433 if (output->mode.hdisplay == 0 || output->mode.vdisplay == 0) { in getModeInfo()
438 memcpy(&mode, &output->mode, sizeof(drmModeModeInfo)); in getModeInfo()
459 DrmOutput *output= &mOutputs[outputIndex]; in getPhysicalSize() local
460 if (output->connected == false) { in getPhysicalSize()
465 width = output->connector->mmWidth; in getPhysicalSize()
466 height = output->connector->mmHeight; in getPhysicalSize()
479 DrmOutput *output= &mOutputs[outputIndex]; in getDisplayResolution() local
480 if (output->connected == false) { in getDisplayResolution()
485 width = output->mode.hdisplay; in getDisplayResolution()
486 height = output->mode.vdisplay; in getDisplayResolution()
499 int output = getOutputIndex(device); in isConnected() local
500 if (output < 0 ) { in isConnected()
504 return mOutputs[output].connected; in isConnected()
511 int output = getOutputIndex(device); in setDpmsMode() local
512 if (output < 0 ) { in setDpmsMode()
523 DrmOutput *out = &mOutputs[output]; in setDpmsMode()
559 DrmOutput *output = &mOutputs[index]; in resetOutput() local
561 output->connected = false; in resetOutput()
562 memset(&output->mode, 0, sizeof(drmModeModeInfo)); in resetOutput()
564 if (output->connector) { in resetOutput()
565 drmModeFreeConnector(output->connector); in resetOutput()
566 output->connector = 0; in resetOutput()
568 if (output->encoder) { in resetOutput()
569 drmModeFreeEncoder(output->encoder); in resetOutput()
570 output->encoder = 0; in resetOutput()
572 if (output->crtc) { in resetOutput()
573 drmModeFreeCrtc(output->crtc); in resetOutput()
574 output->crtc = 0; in resetOutput()
576 if (output->fbId) { in resetOutput()
577 drmModeRmFB(mDrmFd, output->fbId); in resetOutput()
578 output->fbId = 0; in resetOutput()
580 if (output->fbHandle) { in resetOutput()
581 Hwcomposer::getInstance().getBufferManager()->freeFrameBuffer(output->fbHandle); in resetOutput()
582 output->fbHandle = 0; in resetOutput()
588 DrmOutput *output= &mOutputs[outputIndex]; in initDrmMode() local
589 if (output->connector->count_modes <= 0) { in initDrmMode()
596 for (int i = 0; i < output->connector->count_modes; i++) { in initDrmMode()
597 mode = &output->connector->modes[i]; in initDrmMode()
604 return setDrmMode(outputIndex, &output->connector->modes[index]); in initDrmMode()
609 DrmOutput *output = &mOutputs[index]; in setDrmMode() local
615 memcpy(&currentMode, &output->mode, sizeof(drmModeModeInfo)); in setDrmMode()
621 if (output->fbId) { in setDrmMode()
622 oldFbId = output->fbId ; in setDrmMode()
623 output->fbId = 0; in setDrmMode()
626 if (output->fbHandle) { in setDrmMode()
627 oldFbHandle = output->fbHandle; in setDrmMode()
628 output->fbHandle = 0; in setDrmMode()
634 output->fbHandle = Hwcomposer::getInstance().getBufferManager()->allocFrameBuffer( in setDrmMode()
637 output->fbHandle = Hwcomposer::getInstance().getBufferManager()->allocFrameBuffer( in setDrmMode()
640 if (output->fbHandle == 0) { in setDrmMode()
658 output->fbHandle, in setDrmMode()
659 &output->fbId); in setDrmMode()
667 ret = drmModeSetCrtc(mDrmFd, output->crtc->crtc_id, output->fbId, 0, 0, in setDrmMode()
668 &output->connector->connector_id, 1, mode); in setDrmMode()
671 memcpy(&output->mode, mode, sizeof(drmModeModeInfo)); in setDrmMode()
710 DrmOutput *output= &mOutputs[outputIndex]; in getPanelOrientation() local
711 if (output->connected == false) { in getPanelOrientation()
716 return output->panelOrientation; in getPanelOrientation()
738 DrmOutput *output= &mOutputs[outputIndex]; in detectAllConfigs() local
739 if (!output->connected) { in detectAllConfigs()
744 if (output->connector->count_modes <= 0) { in detectAllConfigs()
749 *modeCount = output->connector->count_modes; in detectAllConfigs()
750 return output->connector->modes; in detectAllConfigs()