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 output->crtc = crtc; in detect()
190 if (!output->crtc) { in detect()
196 if (output->crtc->mode_valid) { in detect()
198 memcpy(&output->mode, &output->crtc->mode, sizeof(drmModeModeInfo)); in detect()
206 if (!readIoctl(DRM_PSB_PANEL_ORIENTATION, &output->panelOrientation, sizeof(int))) { in detect()
208 output->panelOrientation = PANEL_ORIENTATION_0; in detect()
211 output->panelOrientation = PANEL_ORIENTATION_0; in detect()
217 if (output->connector == NULL && outputIndex != OUTPUT_PRIMARY) { in detect()
224 } else if (output->connected) { in detect()
225 …ITRACE("mode is: %dx%d@%dHz", output->mode.hdisplay, output->mode.vdisplay, output->mode.vrefresh); in detect()
262 DrmOutput *output= &mOutputs[outputIndex]; in setDrmMode() local
263 if (!output->connected) { in setDrmMode()
268 if (output->connector->count_modes <= 0) { in setDrmMode()
275 for (int i = 0; i < output->connector->count_modes; i++) { in setDrmMode()
276 mode = &output->connector->modes[i]; in setDrmMode()
286 mode = &output->connector->modes[index]; in setDrmMode()
306 DrmOutput *output= &mOutputs[outputIndex]; in setRefreshRate() local
307 if (!output->connected) { in setRefreshRate()
312 if (output->connector->count_modes <= 0) { in setRefreshRate()
319 for (int i = 0; i < output->connector->count_modes; i++) { in setRefreshRate()
320 mode = &output->connector->modes[i]; in setRefreshRate()
324 if (mode->hdisplay == output->mode.hdisplay && in setRefreshRate()
325 mode->vdisplay == output->mode.vdisplay && in setRefreshRate()
332 mode = &output->connector->modes[index]; in setRefreshRate()
424 DrmOutput *output= &mOutputs[outputIndex]; in getModeInfo() local
425 if (output->connected == false) { in getModeInfo()
430 if (output->mode.hdisplay == 0 || output->mode.vdisplay == 0) { in getModeInfo()
435 memcpy(&mode, &output->mode, sizeof(drmModeModeInfo)); in getModeInfo()
448 DrmOutput *output= &mOutputs[outputIndex]; in getPhysicalSize() local
449 if (output->connected == false) { in getPhysicalSize()
454 width = output->connector->mmWidth; in getPhysicalSize()
455 height = output->connector->mmHeight; in getPhysicalSize()
463 int output = getOutputIndex(device); in isConnected() local
464 if (output < 0 ) { in isConnected()
468 return mOutputs[output].connected; in isConnected()
475 int output = getOutputIndex(device); in setDpmsMode() local
476 if (output < 0 ) { in setDpmsMode()
487 DrmOutput *out = &mOutputs[output]; in setDpmsMode()
523 DrmOutput *output = &mOutputs[index]; in resetOutput() local
525 output->connected = false; in resetOutput()
526 memset(&output->mode, 0, sizeof(drmModeModeInfo)); in resetOutput()
528 if (output->connector) { in resetOutput()
529 drmModeFreeConnector(output->connector); in resetOutput()
530 output->connector = 0; in resetOutput()
532 if (output->encoder) { in resetOutput()
533 drmModeFreeEncoder(output->encoder); in resetOutput()
534 output->encoder = 0; in resetOutput()
536 if (output->crtc) { in resetOutput()
537 drmModeFreeCrtc(output->crtc); in resetOutput()
538 output->crtc = 0; in resetOutput()
540 if (output->fbId) { in resetOutput()
541 drmModeRmFB(mDrmFd, output->fbId); in resetOutput()
542 output->fbId = 0; in resetOutput()
544 if (output->fbHandle) { in resetOutput()
546 (buffer_handle_t)output->fbHandle); in resetOutput()
547 output->fbHandle = 0; in resetOutput()
553 DrmOutput *output= &mOutputs[outputIndex]; in initDrmMode() local
554 if (output->connector->count_modes <= 0) { in initDrmMode()
561 for (int i = 0; i < output->connector->count_modes; i++) { in initDrmMode()
562 mode = &output->connector->modes[i]; in initDrmMode()
569 return setDrmMode(outputIndex, &output->connector->modes[index]); in initDrmMode()
574 DrmOutput *output = &mOutputs[index]; in setDrmMode() local
580 memcpy(¤tMode, &output->mode, sizeof(drmModeModeInfo)); in setDrmMode()
586 if (output->fbId) { in setDrmMode()
587 oldFbId = output->fbId; in setDrmMode()
588 output->fbId = 0; in setDrmMode()
591 if (output->fbHandle) { in setDrmMode()
592 oldFbHandle = output->fbHandle; in setDrmMode()
593 output->fbHandle = 0; in setDrmMode()
598 output->fbHandle = Hwcomposer::getInstance().getBufferManager()->allocFrameBuffer( in setDrmMode()
600 if (output->fbHandle == 0) { in setDrmMode()
612 bo_handles[0] = ((unsigned long)(output->fbHandle)) & 0xffffffff; in setDrmMode()
613 bo_handles[1] = ((unsigned long)(output->fbHandle) >> 32) & 0xffffffff; in setDrmMode()
624 &output->fbId, in setDrmMode()
633 ret = drmModeSetCrtc(mDrmFd, output->crtc->crtc_id, output->fbId, 0, 0, in setDrmMode()
634 &output->connector->connector_id, 1, mode); in setDrmMode()
637 memcpy(&output->mode, mode, sizeof(drmModeModeInfo)); in setDrmMode()
676 DrmOutput *output= &mOutputs[outputIndex]; in getPanelOrientation() local
677 if (output->connected == false) { in getPanelOrientation()
682 return output->panelOrientation; in getPanelOrientation()
704 DrmOutput *output= &mOutputs[outputIndex]; in detectAllConfigs() local
705 if (!output->connected) { in detectAllConfigs()
710 if (output->connector->count_modes <= 0) { in detectAllConfigs()
715 *modeCount = output->connector->count_modes; in detectAllConfigs()
716 return output->connector->modes; in detectAllConfigs()