Lines Matching refs:vbox_crtc
38 struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); in vbox_do_modeset() local
45 width = vbox_crtc->width ? vbox_crtc->width : 640; in vbox_do_modeset()
46 height = vbox_crtc->height ? vbox_crtc->height : 480; in vbox_do_modeset()
49 x_offset = vbox->single_framebuffer ? vbox_crtc->x : vbox_crtc->x_hint; in vbox_do_modeset()
50 y_offset = vbox->single_framebuffer ? vbox_crtc->y : vbox_crtc->y_hint; in vbox_do_modeset()
58 if (vbox_crtc->crtc_id == 0 && fb && in vbox_do_modeset()
59 vbox_crtc->fb_offset / pitch < 0xffff - crtc->y && in vbox_do_modeset()
60 vbox_crtc->fb_offset % (bpp / 8) == 0) { in vbox_do_modeset()
67 vbox_crtc->fb_offset % pitch / bpp * 8 + vbox_crtc->x); in vbox_do_modeset()
69 vbox_crtc->fb_offset / pitch + vbox_crtc->y); in vbox_do_modeset()
74 flags |= vbox_crtc->disconnected ? VBVA_SCREEN_F_DISABLED : 0; in vbox_do_modeset()
75 hgsmi_process_display_info(vbox->guest_pool, vbox_crtc->crtc_id, in vbox_do_modeset()
77 vbox_crtc->x * bpp / 8 + in vbox_do_modeset()
78 vbox_crtc->y * pitch, in vbox_do_modeset()
84 struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); in vbox_set_view() local
104 p->view_index = vbox_crtc->crtc_id; in vbox_set_view()
105 p->view_offset = vbox_crtc->fb_offset; in vbox_set_view()
106 p->view_size = vbox->available_vram_size - vbox_crtc->fb_offset + in vbox_set_view()
107 vbox_crtc->crtc_id * VBVA_MIN_BUFFER_SIZE; in vbox_set_view()
108 p->max_screen_size = vbox->available_vram_size - vbox_crtc->fb_offset; in vbox_set_view()
162 struct vbox_crtc *vbox_crtc = vbox_connector->vbox_crtc; in vbox_set_up_input_mapping() local
164 width = max_t(u16, width, vbox_crtc->x_hint + in vbox_set_up_input_mapping()
166 height = max_t(u16, height, vbox_crtc->y_hint + in vbox_set_up_input_mapping()
183 struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); in vbox_crtc_set_base_and_mode() local
189 vbox_crtc->width = crtc->state->mode.hdisplay; in vbox_crtc_set_base_and_mode()
190 vbox_crtc->height = crtc->state->mode.vdisplay; in vbox_crtc_set_base_and_mode()
193 vbox_crtc->x = x; in vbox_crtc_set_base_and_mode()
194 vbox_crtc->y = y; in vbox_crtc_set_base_and_mode()
195 vbox_crtc->fb_offset = drm_gem_vram_offset(gbo); in vbox_crtc_set_base_and_mode()
397 struct vbox_crtc *vbox_crtc = to_vbox_crtc(new_state->crtc); in vbox_cursor_atomic_update() local
417 vbox_crtc->cursor_enabled = true; in vbox_cursor_atomic_update()
446 struct vbox_crtc *vbox_crtc = to_vbox_crtc(old_state->crtc); in vbox_cursor_atomic_disable() local
452 vbox_crtc->cursor_enabled = false; in vbox_cursor_atomic_disable()
549 static struct vbox_crtc *vbox_crtc_init(struct drm_device *dev, unsigned int i) in vbox_crtc_init()
554 struct vbox_crtc *vbox_crtc; in vbox_crtc_init() local
564 vbox_crtc = kzalloc(sizeof(*vbox_crtc), GFP_KERNEL); in vbox_crtc_init()
565 if (!vbox_crtc) in vbox_crtc_init()
584 vbox_crtc->crtc_id = i; in vbox_crtc_init()
586 ret = drm_crtc_init_with_planes(dev, &vbox_crtc->base, primary, cursor, in vbox_crtc_init()
591 drm_mode_crtc_set_gamma_size(&vbox_crtc->base, 256); in vbox_crtc_init()
592 drm_crtc_helper_add(&vbox_crtc->base, &vbox_crtc_helper_funcs); in vbox_crtc_init()
594 return vbox_crtc; in vbox_crtc_init()
605 kfree(vbox_crtc); in vbox_crtc_init()
719 if (vbox_connector->vbox_crtc->crtc_id == 0) in vbox_get_modes()
736 if (vbox_connector->vbox_crtc->x_hint != -1) in vbox_get_modes()
739 vbox_connector->vbox_crtc->x_hint); in vbox_get_modes()
744 if (vbox_connector->vbox_crtc->y_hint != -1) in vbox_get_modes()
747 vbox_connector->vbox_crtc->y_hint); in vbox_get_modes()
804 struct vbox_crtc *vbox_crtc, in vbox_connector_init() argument
815 vbox_connector->vbox_crtc = vbox_crtc; in vbox_connector_init()
846 struct vbox_crtc *vbox_crtc; in vbox_mode_init() local
860 vbox_crtc = vbox_crtc_init(dev, i); in vbox_mode_init()
861 if (IS_ERR(vbox_crtc)) { in vbox_mode_init()
862 ret = PTR_ERR(vbox_crtc); in vbox_mode_init()
870 ret = vbox_connector_init(dev, vbox_crtc, encoder); in vbox_mode_init()