Lines Matching refs:stdu

129 static void vmw_stdu_destroy(struct vmw_screen_target_display_unit *stdu);
164 struct vmw_screen_target_display_unit *stdu, in vmw_stdu_define_st() argument
180 cmd->body.stid = stdu->base.unit; in vmw_stdu_define_st()
188 stdu->base.set_gui_x = cmd->body.xRoot; in vmw_stdu_define_st()
189 stdu->base.set_gui_y = cmd->body.yRoot; in vmw_stdu_define_st()
193 stdu->defined = true; in vmw_stdu_define_st()
194 stdu->display_width = mode->hdisplay; in vmw_stdu_define_st()
195 stdu->display_height = mode->vdisplay; in vmw_stdu_define_st()
212 struct vmw_screen_target_display_unit *stdu, in vmw_stdu_bind_st() argument
223 if (!stdu->defined) { in vmw_stdu_bind_st()
239 cmd->body.stid = stdu->base.unit; in vmw_stdu_bind_st()
287 struct vmw_screen_target_display_unit *stdu) in vmw_stdu_update_st() argument
291 if (!stdu->defined) { in vmw_stdu_update_st()
300 vmw_stdu_populate_update(cmd, stdu->base.unit, in vmw_stdu_update_st()
301 0, stdu->display_width, in vmw_stdu_update_st()
302 0, stdu->display_height); in vmw_stdu_update_st()
318 struct vmw_screen_target_display_unit *stdu) in vmw_stdu_destroy_st() argument
329 if (unlikely(!stdu->defined)) in vmw_stdu_destroy_st()
339 cmd->body.stid = stdu->base.unit; in vmw_stdu_destroy_st()
348 stdu->defined = false; in vmw_stdu_destroy_st()
349 stdu->display_width = 0; in vmw_stdu_destroy_st()
350 stdu->display_height = 0; in vmw_stdu_destroy_st()
367 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_crtc_mode_set_nofb() local
372 stdu = vmw_crtc_to_stdu(crtc); in vmw_stdu_crtc_mode_set_nofb()
374 conn_state = stdu->base.connector.state; in vmw_stdu_crtc_mode_set_nofb()
377 if (stdu->defined) { in vmw_stdu_crtc_mode_set_nofb()
378 ret = vmw_stdu_bind_st(dev_priv, stdu, NULL); in vmw_stdu_crtc_mode_set_nofb()
382 (void) vmw_stdu_update_st(dev_priv, stdu); in vmw_stdu_crtc_mode_set_nofb()
384 ret = vmw_stdu_destroy_st(dev_priv, stdu); in vmw_stdu_crtc_mode_set_nofb()
388 stdu->content_fb_type = SAME_AS_DISPLAY; in vmw_stdu_crtc_mode_set_nofb()
398 ret = vmw_stdu_define_st(dev_priv, stdu, &crtc->mode, x, y); in vmw_stdu_crtc_mode_set_nofb()
419 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_crtc_atomic_disable() local
428 stdu = vmw_crtc_to_stdu(crtc); in vmw_stdu_crtc_atomic_disable()
431 if (stdu->defined) { in vmw_stdu_crtc_atomic_disable()
432 ret = vmw_stdu_bind_st(dev_priv, stdu, NULL); in vmw_stdu_crtc_atomic_disable()
436 (void) vmw_stdu_update_st(dev_priv, stdu); in vmw_stdu_crtc_atomic_disable()
438 ret = vmw_stdu_destroy_st(dev_priv, stdu); in vmw_stdu_crtc_atomic_disable()
442 stdu->content_fb_type = SAME_AS_DISPLAY; in vmw_stdu_crtc_atomic_disable()
493 struct vmw_screen_target_display_unit *stdu = in vmw_stdu_bo_fifo_commit() local
494 container_of(dirty->unit, typeof(*stdu), base); in vmw_stdu_bo_fifo_commit()
510 cmd->body.host.sid = stdu->display_srf->res.id; in vmw_stdu_bo_fifo_commit()
520 vmw_stdu_populate_update(&suffix[1], stdu->base.unit, in vmw_stdu_bo_fifo_commit()
527 stdu->display_srf->res.res_dirty = true; in vmw_stdu_bo_fifo_commit()
575 struct vmw_screen_target_display_unit *stdu = in vmw_stdu_bo_cpu_commit() local
576 container_of(dirty->unit, typeof(*stdu), base); in vmw_stdu_bo_cpu_commit()
581 struct vmw_diff_cpy diff = VMW_CPU_BLIT_DIFF_INITIALIZER(stdu->cpp); in vmw_stdu_bo_cpu_commit()
593 dst_pitch = stdu->display_srf->metadata.base_size.width * stdu->cpp; in vmw_stdu_bo_cpu_commit()
594 dst_bo = &stdu->display_srf->res.backup->base; in vmw_stdu_bo_cpu_commit()
595 dst_offset = ddirty->top * dst_pitch + ddirty->left * stdu->cpp; in vmw_stdu_bo_cpu_commit()
599 src_offset = ddirty->fb_top * src_pitch + ddirty->fb_left * stdu->cpp; in vmw_stdu_bo_cpu_commit()
610 width * stdu->cpp, height, &diff); in vmw_stdu_bo_cpu_commit()
624 ret = vmw_kms_update_proxy(&stdu->display_srf->res, &region, in vmw_stdu_bo_cpu_commit()
630 dev_priv = vmw_priv(stdu->base.crtc.dev); in vmw_stdu_bo_cpu_commit()
635 vmw_stdu_populate_update(cmd, stdu->base.unit, in vmw_stdu_bo_cpu_commit()
752 struct vmw_screen_target_display_unit *stdu = in vmw_kms_stdu_surface_clip() local
753 container_of(dirty->unit, typeof(*stdu), base); in vmw_kms_stdu_surface_clip()
755 if (sdirty->sid != stdu->display_srf->res.id) { in vmw_kms_stdu_surface_clip()
790 struct vmw_screen_target_display_unit *stdu = in vmw_kms_stdu_surface_fifo_commit() local
791 container_of(dirty->unit, typeof(*stdu), base); in vmw_kms_stdu_surface_fifo_commit()
802 if (sdirty->sid != stdu->display_srf->res.id) { in vmw_kms_stdu_surface_fifo_commit()
808 cmd->body.dest.sid = stdu->display_srf->res.id; in vmw_kms_stdu_surface_fifo_commit()
811 stdu->display_srf->res.res_dirty = true; in vmw_kms_stdu_surface_fifo_commit()
817 vmw_stdu_populate_update(update, stdu->base.unit, sdirty->left, in vmw_kms_stdu_surface_fifo_commit()
1190 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_bo_populate_dma() local
1194 stdu = container_of(update->du, typeof(*stdu), base); in vmw_stdu_bo_populate_dma()
1203 cmd_dma->body.host.sid = stdu->display_srf->res.id; in vmw_stdu_bo_populate_dma()
1233 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_bo_populate_update() local
1237 stdu = container_of(update->du, typeof(*stdu), base); in vmw_stdu_bo_populate_update()
1243 vmw_stdu_populate_update(&suffix[1], stdu->base.unit, bb->x1, bb->x2, in vmw_stdu_bo_populate_update()
1279 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_bo_populate_update_cpu() local
1290 stdu = container_of(update->du, typeof(*stdu), base); in vmw_stdu_bo_populate_update_cpu()
1296 diff.cpp = stdu->cpp; in vmw_stdu_bo_populate_update_cpu()
1298 dst_bo = &stdu->display_srf->res.backup->base; in vmw_stdu_bo_populate_update_cpu()
1299 dst_pitch = stdu->display_srf->metadata.base_size.width * stdu->cpp; in vmw_stdu_bo_populate_update_cpu()
1300 dst_offset = bb->y1 * dst_pitch + bb->x1 * stdu->cpp; in vmw_stdu_bo_populate_update_cpu()
1305 stdu->cpp; in vmw_stdu_bo_populate_update_cpu()
1308 src_offset, src_pitch, width * stdu->cpp, height, in vmw_stdu_bo_populate_update_cpu()
1316 cmd_img->body.image.sid = stdu->display_srf->res.id; in vmw_stdu_bo_populate_update_cpu()
1328 vmw_stdu_populate_update(cmd_update, stdu->base.unit, in vmw_stdu_bo_populate_update_cpu()
1467 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_surface_populate_copy() local
1471 stdu = container_of(update->du, typeof(*stdu), base); in vmw_stdu_surface_populate_copy()
1478 cmd_copy->body.dest.sid = stdu->display_srf->res.id; in vmw_stdu_surface_populate_copy()
1532 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_plane_update_surface() local
1535 stdu = vmw_crtc_to_stdu(plane->state->crtc); in vmw_stdu_plane_update_surface()
1552 if (vfbs->surface->res.id != stdu->display_srf->res.id) { in vmw_stdu_plane_update_surface()
1582 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_primary_plane_atomic_update() local
1592 stdu = vmw_crtc_to_stdu(crtc); in vmw_stdu_primary_plane_atomic_update()
1595 stdu->display_srf = vps->surf; in vmw_stdu_primary_plane_atomic_update()
1596 stdu->content_fb_type = vps->content_fb_type; in vmw_stdu_primary_plane_atomic_update()
1597 stdu->cpp = vps->cpp; in vmw_stdu_primary_plane_atomic_update()
1599 ret = vmw_stdu_bind_st(dev_priv, stdu, &stdu->display_srf->res); in vmw_stdu_primary_plane_atomic_update()
1614 stdu = vmw_crtc_to_stdu(crtc); in vmw_stdu_primary_plane_atomic_update()
1618 if (!stdu->defined) in vmw_stdu_primary_plane_atomic_update()
1621 ret = vmw_stdu_bind_st(dev_priv, stdu, NULL); in vmw_stdu_primary_plane_atomic_update()
1625 ret = vmw_stdu_update_st(dev_priv, stdu); in vmw_stdu_primary_plane_atomic_update()
1715 struct vmw_screen_target_display_unit *stdu; in vmw_stdu_init() local
1724 stdu = kzalloc(sizeof(*stdu), GFP_KERNEL); in vmw_stdu_init()
1725 if (!stdu) in vmw_stdu_init()
1728 stdu->base.unit = unit; in vmw_stdu_init()
1729 crtc = &stdu->base.crtc; in vmw_stdu_init()
1730 encoder = &stdu->base.encoder; in vmw_stdu_init()
1731 connector = &stdu->base.connector; in vmw_stdu_init()
1732 primary = &stdu->base.primary; in vmw_stdu_init()
1733 cursor = &stdu->base.cursor; in vmw_stdu_init()
1735 stdu->base.pref_active = (unit == 0); in vmw_stdu_init()
1736 stdu->base.pref_width = dev_priv->initial_width; in vmw_stdu_init()
1737 stdu->base.pref_height = dev_priv->initial_height; in vmw_stdu_init()
1738 stdu->base.is_implicit = false; in vmw_stdu_init()
1762 drm_plane_cleanup(&stdu->base.primary); in vmw_stdu_init()
1795 ret = drm_crtc_init_with_planes(dev, crtc, &stdu->base.primary, in vmw_stdu_init()
1796 &stdu->base.cursor, in vmw_stdu_init()
1822 kfree(stdu); in vmw_stdu_init()
1835 static void vmw_stdu_destroy(struct vmw_screen_target_display_unit *stdu) in vmw_stdu_destroy() argument
1837 vmw_du_cleanup(&stdu->base); in vmw_stdu_destroy()
1838 kfree(stdu); in vmw_stdu_destroy()