Lines Matching refs:vbox
33 struct vbox_private *vbox; in vbox_do_modeset() local
38 vbox = crtc->dev->dev_private; 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()
69 hgsmi_process_display_info(vbox->guest_pool, vbox_crtc->crtc_id, in vbox_do_modeset()
79 struct vbox_private *vbox = crtc->dev->dev_private; in vbox_set_view() local
93 p = hgsmi_buffer_alloc(vbox->guest_pool, sizeof(*p), in vbox_set_view()
100 p->view_size = vbox->available_vram_size - vbox_crtc->fb_offset + in vbox_set_view()
102 p->max_screen_size = vbox->available_vram_size - vbox_crtc->fb_offset; in vbox_set_view()
104 hgsmi_buffer_submit(vbox->guest_pool, p); in vbox_set_view()
105 hgsmi_buffer_free(vbox->guest_pool, p); in vbox_set_view()
115 static bool vbox_set_up_input_mapping(struct vbox_private *vbox) in vbox_set_up_input_mapping() argument
121 bool old_single_framebuffer = vbox->single_framebuffer; in vbox_set_up_input_mapping()
129 list_for_each_entry(crtci, &vbox->ddev.mode_config.crtc_list, head) { in vbox_set_up_input_mapping()
136 if (to_vbox_framebuffer(fb1) == &vbox->afb) in vbox_set_up_input_mapping()
146 vbox->single_framebuffer = true; in vbox_set_up_input_mapping()
147 vbox->input_mapping_width = fb1->width; in vbox_set_up_input_mapping()
148 vbox->input_mapping_height = fb1->height; in vbox_set_up_input_mapping()
149 return old_single_framebuffer != vbox->single_framebuffer; in vbox_set_up_input_mapping()
152 list_for_each_entry(connectori, &vbox->ddev.mode_config.connector_list, in vbox_set_up_input_mapping()
164 vbox->single_framebuffer = false; in vbox_set_up_input_mapping()
165 vbox->input_mapping_width = width; in vbox_set_up_input_mapping()
166 vbox->input_mapping_height = height; in vbox_set_up_input_mapping()
168 return old_single_framebuffer != vbox->single_framebuffer; in vbox_set_up_input_mapping()
177 struct vbox_private *vbox = crtc->dev->dev_private; in vbox_crtc_set_base_and_mode() local
181 mutex_lock(&vbox->hw_mutex); in vbox_crtc_set_base_and_mode()
193 if (needs_modeset && vbox_set_up_input_mapping(vbox)) { in vbox_crtc_set_base_and_mode()
196 list_for_each_entry(crtci, &vbox->ddev.mode_config.crtc_list, in vbox_crtc_set_base_and_mode()
208 hgsmi_update_input_mapping(vbox->guest_pool, 0, 0, in vbox_crtc_set_base_and_mode()
209 vbox->input_mapping_width, in vbox_crtc_set_base_and_mode()
210 vbox->input_mapping_height); in vbox_crtc_set_base_and_mode()
212 mutex_unlock(&vbox->hw_mutex); in vbox_crtc_set_base_and_mode()
385 struct vbox_private *vbox = in vbox_cursor_atomic_update() local
404 mutex_lock(&vbox->hw_mutex); in vbox_cursor_atomic_update()
411 mutex_unlock(&vbox->hw_mutex); in vbox_cursor_atomic_update()
424 copy_cursor_image(src, vbox->cursor_data, width, height, mask_size); in vbox_cursor_atomic_update()
429 hgsmi_update_pointer_shape(vbox->guest_pool, flags, in vbox_cursor_atomic_update()
432 width, height, vbox->cursor_data, data_size); in vbox_cursor_atomic_update()
434 mutex_unlock(&vbox->hw_mutex); in vbox_cursor_atomic_update()
440 struct vbox_private *vbox = in vbox_cursor_atomic_disable() local
446 mutex_lock(&vbox->hw_mutex); in vbox_cursor_atomic_disable()
450 list_for_each_entry(crtci, &vbox->ddev.mode_config.crtc_list, head) { in vbox_cursor_atomic_disable()
456 hgsmi_update_pointer_shape(vbox->guest_pool, 0, 0, 0, in vbox_cursor_atomic_disable()
459 mutex_unlock(&vbox->hw_mutex); in vbox_cursor_atomic_disable()
529 static struct drm_plane *vbox_create_plane(struct vbox_private *vbox, in vbox_create_plane() argument
558 err = drm_universal_plane_init(&vbox->ddev, plane, possible_crtcs, in vbox_create_plane()
575 struct vbox_private *vbox = in vbox_crtc_init() local
583 ret = hgsmi_query_conf(vbox->guest_pool, in vbox_crtc_init()
592 primary = vbox_create_plane(vbox, 1 << i, DRM_PLANE_TYPE_PRIMARY); in vbox_crtc_init()
599 cursor = vbox_create_plane(vbox, 1 << i, DRM_PLANE_TYPE_CURSOR); in vbox_crtc_init()
734 struct vbox_private *vbox = NULL; in vbox_get_modes() local
739 vbox = connector->dev->dev_private; in vbox_get_modes()
741 hgsmi_report_flags_location(vbox->guest_pool, GUEST_HEAP_OFFSET(vbox) + in vbox_get_modes()
744 vbox_report_caps(vbox); in vbox_get_modes()
762 vbox->ddev.mode_config.suggested_x_property, in vbox_get_modes()
766 vbox->ddev.mode_config.suggested_x_property, 0); in vbox_get_modes()
770 vbox->ddev.mode_config.suggested_y_property, in vbox_get_modes()
774 vbox->ddev.mode_config.suggested_y_property, 0); in vbox_get_modes()
864 struct vbox_private *vbox = in vbox_user_framebuffer_create() local
878 ret = vbox_framebuffer_init(vbox, vbox_fb, mode_cmd, obj); in vbox_user_framebuffer_create()
897 int vbox_mode_init(struct vbox_private *vbox) in vbox_mode_init() argument
899 struct drm_device *dev = &vbox->ddev; in vbox_mode_init()
914 for (i = 0; i < vbox->num_crtcs; ++i) { in vbox_mode_init()
938 void vbox_mode_fini(struct vbox_private *vbox) in vbox_mode_fini() argument
940 drm_mode_config_cleanup(&vbox->ddev); in vbox_mode_fini()