Home | History | Annotate | Download | only in vmwgfx

Lines Matching defs:stdu

134 static void vmw_stdu_destroy(struct vmw_screen_target_display_unit *stdu);
144 * vmw_stdu_crtc_destroy - cleans up the STDU
146 * @crtc: used to get a reference to the containing STDU
157 * @stdu: display unit to create a Screen Target for
162 * Creates a STDU that we can used later. This function is called whenever the
169 struct vmw_screen_target_display_unit *stdu,
185 cmd->body.stid = stdu->base.unit;
193 stdu->base.set_gui_x = cmd->body.xRoot;
194 stdu->base.set_gui_y = cmd->body.yRoot;
198 stdu->defined = true;
199 stdu->display_width = mode->hdisplay;
200 stdu->display_height = mode->vdisplay;
211 * @stdu: display unit affected
217 struct vmw_screen_target_display_unit *stdu,
228 if (!stdu->defined) {
244 cmd->body.stid = stdu->base.unit;
282 * @stdu: display unit affected
292 struct vmw_screen_target_display_unit *stdu)
296 if (!stdu->defined) {
305 vmw_stdu_populate_update(cmd, stdu->base.unit,
306 0, stdu->display_width,
307 0, stdu->display_height);
320 * @stdu: display unit to destroy
323 struct vmw_screen_target_display_unit *stdu)
334 if (unlikely(!stdu->defined))
344 cmd->body.stid = stdu->base.unit;
353 stdu->defined = false;
354 stdu->display_width = 0;
355 stdu->display_height = 0;
372 struct vmw_screen_target_display_unit *stdu;
377 stdu = vmw_crtc_to_stdu(crtc);
379 conn_state = stdu->base.connector.state;
382 if (stdu->defined) {
383 ret = vmw_stdu_bind_st(dev_priv, stdu, NULL);
387 (void) vmw_stdu_update_st(dev_priv, stdu);
389 ret = vmw_stdu_destroy_st(dev_priv, stdu);
393 stdu->content_fb_type = SAME_AS_DISPLAY;
403 ret = vmw_stdu_define_st(dev_priv, stdu, &crtc->mode, x, y);
424 struct vmw_screen_target_display_unit *stdu;
433 stdu = vmw_crtc_to_stdu(crtc);
436 if (stdu->defined) {
437 ret = vmw_stdu_bind_st(dev_priv, stdu, NULL);
441 (void) vmw_stdu_update_st(dev_priv, stdu);
443 ret = vmw_stdu_destroy_st(dev_priv, stdu);
447 stdu->content_fb_type = SAME_AS_DISPLAY;
498 struct vmw_screen_target_display_unit *stdu =
499 container_of(dirty->unit, typeof(*stdu), base);
515 cmd->body.host.sid = stdu->display_srf->res.id;
525 vmw_stdu_populate_update(&suffix[1], stdu->base.unit,
532 stdu->display_srf->res.res_dirty = true;
580 struct vmw_screen_target_display_unit *stdu =
581 container_of(dirty->unit, typeof(*stdu), base);
586 struct vmw_diff_cpy diff = VMW_CPU_BLIT_DIFF_INITIALIZER(stdu->cpp);
598 dst_pitch = stdu->display_srf->base_size.width * stdu->cpp;
599 dst_bo = &stdu->display_srf->res.backup->base;
600 dst_offset = ddirty->top * dst_pitch + ddirty->left * stdu->cpp;
604 src_offset = ddirty->fb_top * src_pitch + ddirty->fb_left * stdu->cpp;
615 width * stdu->cpp, height, &diff);
629 ret = vmw_kms_update_proxy(&stdu->display_srf->res, &region,
635 dev_priv = vmw_priv(stdu->base.crtc.dev);
640 vmw_stdu_populate_update(cmd, stdu->base.unit,
668 * @crtc: If crtc is passed, perform stdu dma on that crtc only.
757 struct vmw_screen_target_display_unit *stdu =
758 container_of(dirty->unit, typeof(*stdu), base);
760 if (sdirty->sid != stdu->display_srf->res.id) {
795 struct vmw_screen_target_display_unit *stdu =
796 container_of(dirty->unit, typeof(*stdu), base);
807 if (sdirty->sid != stdu->display_srf->res.id) {
813 cmd->body.dest.sid = stdu->display_srf->res.id;
816 stdu->display_srf->res.res_dirty = true;
822 vmw_stdu_populate_update(update, stdu->base.unit, sdirty->left,
933 * vmw_stdu_encoder_destroy - cleans up the STDU
935 * @encoder: used the get the containing STDU
958 * vmw_stdu_connector_destroy - cleans up the STDU
960 * @connector: used to get the containing STDU
1141 DRM_ERROR("Couldn't allocate STDU surface.\n");
1207 struct vmw_screen_target_display_unit *stdu;
1211 stdu = container_of(update->du, typeof(*stdu), base);
1220 cmd_dma->body.host.sid = stdu->display_srf->res.id;
1250 struct vmw_screen_target_display_unit *stdu;
1254 stdu = container_of(update->du, typeof(*stdu), base);
1260 vmw_stdu_populate_update(&suffix[1], stdu->base.unit, bb->x1, bb->x2,
1296 struct vmw_screen_target_display_unit *stdu;
1307 stdu = container_of(update->du, typeof(*stdu), base);
1313 diff.cpp = stdu->cpp;
1315 dst_bo = &stdu->display_srf->res.backup->base;
1316 dst_pitch = stdu->display_srf->base_size.width * stdu->cpp;
1317 dst_offset = bb->y1 * dst_pitch + bb->x1 * stdu->cpp;
1322 stdu->cpp;
1325 src_offset, src_pitch, width * stdu->cpp, height,
1333 cmd_img->body.image.sid = stdu->display_srf->res.id;
1345 vmw_stdu_populate_update(cmd_update, stdu->base.unit,
1484 struct vmw_screen_target_display_unit *stdu;
1488 stdu = container_of(update->du, typeof(*stdu), base);
1495 cmd_copy->body.dest.sid = stdu->display_srf->res.id;
1549 struct vmw_screen_target_display_unit *stdu;
1552 stdu = vmw_crtc_to_stdu(plane->state->crtc);
1569 if (vfbs->surface->res.id != stdu->display_srf->res.id) {
1584 * vmw_stdu_primary_plane_atomic_update - formally switches STDU to new plane
1588 * Formally update stdu->display_srf to the new plane, and bind the new
1589 * plane STDU. This function is called during the commit phase when
1599 struct vmw_screen_target_display_unit *stdu;
1609 stdu = vmw_crtc_to_stdu(crtc);
1612 stdu->display_srf = vps->surf;
1613 stdu->content_fb_type = vps->content_fb_type;
1614 stdu->cpp = vps->cpp;
1616 ret = vmw_stdu_bind_st(dev_priv, stdu, &stdu->display_srf->res);
1618 DRM_ERROR("Failed to bind surface to STDU.\n");
1628 DRM_ERROR("Failed to update STDU.\n");
1631 stdu = vmw_crtc_to_stdu(crtc);
1634 /* Blank STDU when fb and crtc are NULL */
1635 if (!stdu->defined)
1638 ret = vmw_stdu_bind_st(dev_priv, stdu, NULL);
1640 DRM_ERROR("Failed to blank STDU\n");
1642 ret = vmw_stdu_update_st(dev_priv, stdu);
1644 DRM_ERROR("Failed to update STDU.\n");
1728 * out encoder and connector, they are represented as part of the STDU as well.
1732 struct vmw_screen_target_display_unit *stdu;
1741 stdu = kzalloc(sizeof(*stdu), GFP_KERNEL);
1742 if (!stdu)
1745 stdu->base.unit = unit;
1746 crtc = &stdu->base.crtc;
1747 encoder = &stdu->base.encoder;
1748 connector = &stdu->base.connector;
1749 primary = &stdu->base.primary;
1750 cursor = &stdu->base.cursor;
1752 stdu->base.pref_active = (unit == 0);
1753 stdu->base.pref_width = dev_priv->initial_width;
1754 stdu->base.pref_height = dev_priv->initial_height;
1755 stdu->base.is_implicit = false;
1783 drm_plane_cleanup(&stdu->base.primary);
1819 ret = drm_crtc_init_with_planes(dev, crtc, &stdu->base.primary,
1820 &stdu->base.cursor,
1846 kfree(stdu);
1855 * @stdu: Screen Target Display Unit to be destroyed
1859 static void vmw_stdu_destroy(struct vmw_screen_target_display_unit *stdu)
1861 vmw_du_cleanup(&stdu->base);
1862 kfree(stdu);
1909 DRM_ERROR("Failed to initialize STDU %d", i);