Lines Matching refs:stdu
136 static void vmw_stdu_destroy(struct vmw_screen_target_display_unit *stdu);
170 struct vmw_screen_target_display_unit *stdu, in vmw_stdu_define_st() argument
186 cmd->body.stid = stdu->base.unit; in vmw_stdu_define_st()
194 stdu->base.set_gui_x = cmd->body.xRoot; in vmw_stdu_define_st()
195 stdu->base.set_gui_y = cmd->body.yRoot; in vmw_stdu_define_st()
199 stdu->defined = true; in vmw_stdu_define_st()
200 stdu->display_width = mode->hdisplay; in vmw_stdu_define_st()
201 stdu->display_height = mode->vdisplay; in vmw_stdu_define_st()
220 struct vmw_screen_target_display_unit *stdu, in vmw_stdu_bind_st() argument
231 if (!stdu->defined) { in vmw_stdu_bind_st()
247 cmd->body.stid = stdu->base.unit; in vmw_stdu_bind_st()
295 struct vmw_screen_target_display_unit *stdu) in vmw_stdu_update_st() argument
299 if (!stdu->defined) { in vmw_stdu_update_st()
308 vmw_stdu_populate_update(cmd, stdu->base.unit, in vmw_stdu_update_st()
309 0, stdu->display_width, in vmw_stdu_update_st()
310 0, stdu->display_height); in vmw_stdu_update_st()
329 struct vmw_screen_target_display_unit *stdu) in vmw_stdu_destroy_st() argument
340 if (unlikely(!stdu->defined)) in vmw_stdu_destroy_st()
350 cmd->body.stid = stdu->base.unit; in vmw_stdu_destroy_st()
359 stdu->defined = false; in vmw_stdu_destroy_st()
360 stdu->display_width = 0; in vmw_stdu_destroy_st()
361 stdu->display_height = 0; in vmw_stdu_destroy_st()
378 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_crtc_mode_set_nofb() local
383 stdu = vmw_crtc_to_stdu(crtc); in vmw_stdu_crtc_mode_set_nofb()
385 conn_state = stdu->base.connector.state; in vmw_stdu_crtc_mode_set_nofb()
388 if (stdu->defined) { in vmw_stdu_crtc_mode_set_nofb()
389 ret = vmw_stdu_bind_st(dev_priv, stdu, NULL); in vmw_stdu_crtc_mode_set_nofb()
393 (void) vmw_stdu_update_st(dev_priv, stdu); in vmw_stdu_crtc_mode_set_nofb()
395 ret = vmw_stdu_destroy_st(dev_priv, stdu); in vmw_stdu_crtc_mode_set_nofb()
399 stdu->content_fb_type = SAME_AS_DISPLAY; in vmw_stdu_crtc_mode_set_nofb()
409 ret = vmw_stdu_define_st(dev_priv, stdu, &crtc->mode, x, y); in vmw_stdu_crtc_mode_set_nofb()
420 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_crtc_atomic_disable() local
429 stdu = vmw_crtc_to_stdu(crtc); in vmw_stdu_crtc_atomic_disable()
436 if (stdu->defined) { in vmw_stdu_crtc_atomic_disable()
437 ret = vmw_stdu_bind_st(dev_priv, stdu, NULL); in vmw_stdu_crtc_atomic_disable()
441 (void) vmw_stdu_update_st(dev_priv, stdu); in vmw_stdu_crtc_atomic_disable()
451 ret = vmw_stdu_destroy_st(dev_priv, stdu); in vmw_stdu_crtc_atomic_disable()
455 stdu->content_fb_type = SAME_AS_DISPLAY; in vmw_stdu_crtc_atomic_disable()
501 struct vmw_screen_target_display_unit *stdu = in vmw_stdu_bo_cpu_commit() local
502 container_of(dirty->unit, typeof(*stdu), base); in vmw_stdu_bo_cpu_commit()
507 struct vmw_diff_cpy diff = VMW_CPU_BLIT_DIFF_INITIALIZER(stdu->cpp); in vmw_stdu_bo_cpu_commit()
519 src_pitch = stdu->display_srf->metadata.base_size.width * stdu->cpp; in vmw_stdu_bo_cpu_commit()
520 src_bo = stdu->display_srf->res.guest_memory_bo; in vmw_stdu_bo_cpu_commit()
521 src_offset = ddirty->top * src_pitch + ddirty->left * stdu->cpp; in vmw_stdu_bo_cpu_commit()
525 dst_offset = ddirty->fb_top * dst_pitch + ddirty->fb_left * stdu->cpp; in vmw_stdu_bo_cpu_commit()
529 width * stdu->cpp, height, &diff); in vmw_stdu_bo_cpu_commit()
626 struct vmw_screen_target_display_unit *stdu = in vmw_kms_stdu_surface_clip() local
627 container_of(dirty->unit, typeof(*stdu), base); in vmw_kms_stdu_surface_clip()
629 if (sdirty->sid != stdu->display_srf->res.id) { in vmw_kms_stdu_surface_clip()
664 struct vmw_screen_target_display_unit *stdu = in vmw_kms_stdu_surface_fifo_commit() local
665 container_of(dirty->unit, typeof(*stdu), base); in vmw_kms_stdu_surface_fifo_commit()
676 if (sdirty->sid != stdu->display_srf->res.id) { in vmw_kms_stdu_surface_fifo_commit()
682 cmd->body.dest.sid = stdu->display_srf->res.id; in vmw_kms_stdu_surface_fifo_commit()
685 stdu->display_srf->res.res_dirty = true; in vmw_kms_stdu_surface_fifo_commit()
691 vmw_stdu_populate_update(update, stdu->base.unit, sdirty->left, in vmw_kms_stdu_surface_fifo_commit()
1172 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_bo_populate_update_cpu() local
1183 stdu = container_of(update->du, typeof(*stdu), base); in vmw_stdu_bo_populate_update_cpu()
1189 diff.cpp = stdu->cpp; in vmw_stdu_bo_populate_update_cpu()
1191 dst_bo = stdu->display_srf->res.guest_memory_bo; in vmw_stdu_bo_populate_update_cpu()
1192 dst_pitch = stdu->display_srf->metadata.base_size.width * stdu->cpp; in vmw_stdu_bo_populate_update_cpu()
1193 dst_offset = bb->y1 * dst_pitch + bb->x1 * stdu->cpp; in vmw_stdu_bo_populate_update_cpu()
1198 stdu->cpp; in vmw_stdu_bo_populate_update_cpu()
1201 src_offset, src_pitch, width * stdu->cpp, height, in vmw_stdu_bo_populate_update_cpu()
1209 cmd_img->body.image.sid = stdu->display_srf->res.id; in vmw_stdu_bo_populate_update_cpu()
1221 vmw_stdu_populate_update(cmd_update, stdu->base.unit, in vmw_stdu_bo_populate_update_cpu()
1295 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_surface_populate_copy() local
1299 stdu = container_of(update->du, typeof(*stdu), base); in vmw_stdu_surface_populate_copy()
1306 cmd_copy->body.dest.sid = stdu->display_srf->res.id; in vmw_stdu_surface_populate_copy()
1360 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_plane_update_surface() local
1363 stdu = vmw_crtc_to_stdu(plane->state->crtc); in vmw_stdu_plane_update_surface()
1376 if (vmw_user_object_surface(&vfbs->uo)->res.id != stdu->display_srf->res.id) { in vmw_stdu_plane_update_surface()
1408 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_primary_plane_atomic_update() local
1417 stdu = vmw_crtc_to_stdu(crtc); in vmw_stdu_primary_plane_atomic_update()
1420 stdu->display_srf = vmw_user_object_surface(&vps->uo); in vmw_stdu_primary_plane_atomic_update()
1421 stdu->content_fb_type = vps->content_fb_type; in vmw_stdu_primary_plane_atomic_update()
1422 stdu->cpp = vps->cpp; in vmw_stdu_primary_plane_atomic_update()
1424 ret = vmw_stdu_bind_st(dev_priv, stdu, &stdu->display_srf->res); in vmw_stdu_primary_plane_atomic_update()
1439 stdu = vmw_crtc_to_stdu(crtc); in vmw_stdu_primary_plane_atomic_update()
1443 if (!stdu->defined) in vmw_stdu_primary_plane_atomic_update()
1446 ret = vmw_stdu_bind_st(dev_priv, stdu, NULL); in vmw_stdu_primary_plane_atomic_update()
1450 ret = vmw_stdu_update_st(dev_priv, stdu); in vmw_stdu_primary_plane_atomic_update()
1466 struct vmw_screen_target_display_unit *stdu = vmw_crtc_to_stdu(crtc); in vmw_stdu_crtc_atomic_flush() local
1469 vmw_vkms_set_crc_surface(crtc, stdu->display_srf); in vmw_stdu_crtc_atomic_flush()
1535 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_init() local
1544 stdu = kzalloc(sizeof(*stdu), GFP_KERNEL); in vmw_stdu_init()
1545 if (!stdu) in vmw_stdu_init()
1548 stdu->base.unit = unit; in vmw_stdu_init()
1549 crtc = &stdu->base.crtc; in vmw_stdu_init()
1550 encoder = &stdu->base.encoder; in vmw_stdu_init()
1551 connector = &stdu->base.connector; in vmw_stdu_init()
1552 primary = &stdu->base.primary; in vmw_stdu_init()
1553 cursor = &stdu->base.cursor; in vmw_stdu_init()
1555 stdu->base.pref_active = (unit == 0); in vmw_stdu_init()
1556 stdu->base.pref_width = dev_priv->initial_width; in vmw_stdu_init()
1557 stdu->base.pref_height = dev_priv->initial_height; in vmw_stdu_init()
1558 stdu->base.is_implicit = false; in vmw_stdu_init()
1582 drm_plane_cleanup(&stdu->base.primary); in vmw_stdu_init()
1633 vmw_du_init(&stdu->base); in vmw_stdu_init()
1644 kfree(stdu); in vmw_stdu_init()
1657 static void vmw_stdu_destroy(struct vmw_screen_target_display_unit *stdu) in vmw_stdu_destroy() argument
1659 vmw_du_cleanup(&stdu->base); in vmw_stdu_destroy()
1660 kfree(stdu); in vmw_stdu_destroy()