Lines Matching refs:vbox_crtc
32 struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); in vbox_do_modeset() local
39 width = vbox_crtc->width ? vbox_crtc->width : 640; in vbox_do_modeset()
40 height = vbox_crtc->height ? vbox_crtc->height : 480; in vbox_do_modeset()
43 x_offset = vbox->single_framebuffer ? vbox_crtc->x : vbox_crtc->x_hint; in vbox_do_modeset()
44 y_offset = vbox->single_framebuffer ? vbox_crtc->y : vbox_crtc->y_hint; in vbox_do_modeset()
52 if (vbox_crtc->crtc_id == 0 && fb && in vbox_do_modeset()
53 vbox_crtc->fb_offset / pitch < 0xffff - crtc->y && in vbox_do_modeset()
54 vbox_crtc->fb_offset % (bpp / 8) == 0) { in vbox_do_modeset()
61 vbox_crtc->fb_offset % pitch / bpp * 8 + vbox_crtc->x); in vbox_do_modeset()
63 vbox_crtc->fb_offset / pitch + vbox_crtc->y); in vbox_do_modeset()
68 flags |= vbox_crtc->disconnected ? VBVA_SCREEN_F_DISABLED : 0; in vbox_do_modeset()
69 hgsmi_process_display_info(vbox->guest_pool, vbox_crtc->crtc_id, in vbox_do_modeset()
71 vbox_crtc->x * bpp / 8 + in vbox_do_modeset()
72 vbox_crtc->y * pitch, in vbox_do_modeset()
78 struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); in vbox_set_view() local
98 p->view_index = vbox_crtc->crtc_id; in vbox_set_view()
99 p->view_offset = vbox_crtc->fb_offset; in vbox_set_view()
100 p->view_size = vbox->available_vram_size - vbox_crtc->fb_offset + in vbox_set_view()
101 vbox_crtc->crtc_id * VBVA_MIN_BUFFER_SIZE; in vbox_set_view()
102 p->max_screen_size = vbox->available_vram_size - vbox_crtc->fb_offset; in vbox_set_view()
156 struct vbox_crtc *vbox_crtc = vbox_connector->vbox_crtc; in vbox_set_up_input_mapping() local
158 width = max_t(u16, width, vbox_crtc->x_hint + in vbox_set_up_input_mapping()
160 height = max_t(u16, height, vbox_crtc->y_hint + in vbox_set_up_input_mapping()
178 struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc); in vbox_crtc_set_base_and_mode() local
184 vbox_crtc->width = crtc->state->mode.hdisplay; in vbox_crtc_set_base_and_mode()
185 vbox_crtc->height = crtc->state->mode.vdisplay; in vbox_crtc_set_base_and_mode()
188 vbox_crtc->x = x; in vbox_crtc_set_base_and_mode()
189 vbox_crtc->y = y; in vbox_crtc_set_base_and_mode()
190 vbox_crtc->fb_offset = drm_gem_vram_offset(gbo); in vbox_crtc_set_base_and_mode()
387 struct vbox_crtc *vbox_crtc = to_vbox_crtc(plane->state->crtc); in vbox_cursor_atomic_update() local
406 vbox_crtc->cursor_enabled = true; in vbox_cursor_atomic_update()
442 struct vbox_crtc *vbox_crtc = to_vbox_crtc(old_state->crtc); in vbox_cursor_atomic_disable() local
448 vbox_crtc->cursor_enabled = false; in vbox_cursor_atomic_disable()
573 static struct vbox_crtc *vbox_crtc_init(struct drm_device *dev, unsigned int i) in vbox_crtc_init()
578 struct vbox_crtc *vbox_crtc; in vbox_crtc_init() local
588 vbox_crtc = kzalloc(sizeof(*vbox_crtc), GFP_KERNEL); in vbox_crtc_init()
589 if (!vbox_crtc) in vbox_crtc_init()
608 vbox_crtc->crtc_id = i; in vbox_crtc_init()
610 ret = drm_crtc_init_with_planes(dev, &vbox_crtc->base, primary, cursor, in vbox_crtc_init()
615 drm_mode_crtc_set_gamma_size(&vbox_crtc->base, 256); in vbox_crtc_init()
616 drm_crtc_helper_add(&vbox_crtc->base, &vbox_crtc_helper_funcs); in vbox_crtc_init()
618 return vbox_crtc; in vbox_crtc_init()
629 kfree(vbox_crtc); in vbox_crtc_init()
743 if (vbox_connector->vbox_crtc->crtc_id == 0) in vbox_get_modes()
760 if (vbox_connector->vbox_crtc->x_hint != -1) in vbox_get_modes()
763 vbox_connector->vbox_crtc->x_hint); in vbox_get_modes()
768 if (vbox_connector->vbox_crtc->y_hint != -1) in vbox_get_modes()
771 vbox_connector->vbox_crtc->y_hint); in vbox_get_modes()
828 struct vbox_crtc *vbox_crtc, in vbox_connector_init() argument
839 vbox_connector->vbox_crtc = vbox_crtc; in vbox_connector_init()
901 struct vbox_crtc *vbox_crtc; in vbox_mode_init() local
915 vbox_crtc = vbox_crtc_init(dev, i); in vbox_mode_init()
916 if (IS_ERR(vbox_crtc)) { in vbox_mode_init()
917 ret = PTR_ERR(vbox_crtc); in vbox_mode_init()
925 ret = vbox_connector_init(dev, vbox_crtc, encoder); in vbox_mode_init()