Lines Matching refs:vcotbl
183 struct vmw_cotable *vcotbl = vmw_cotable(res);
198 WARN_ON(vcotbl->ctx->id == SVGA3D_INVALID_ID);
202 cmd->body.cid = vcotbl->ctx->id;
203 cmd->body.type = vcotbl->type;
205 cmd->body.validSizeInBytes = vcotbl->size_read_back;
208 vcotbl->scrubbed = false;
258 struct vmw_cotable *vcotbl = vmw_cotable(res);
271 if (vcotbl->scrubbed)
274 if (co_info[vcotbl->type].unbind_func)
275 co_info[vcotbl->type].unbind_func(dev_priv,
276 &vcotbl->resource_list,
286 vcotbl->size_read_back = 0;
291 cmd0->body.cid = vcotbl->ctx->id;
292 cmd0->body.type = vcotbl->type;
294 vcotbl->size_read_back = res->guest_memory_size;
298 cmd1->body.cid = vcotbl->ctx->id;
299 cmd1->body.type = vcotbl->type;
303 vcotbl->scrubbed = true;
325 struct vmw_cotable *vcotbl = vmw_cotable(res);
337 if (!vcotbl->scrubbed)
338 vmw_dx_context_scrub_cotables(vcotbl->ctx, readback);
358 struct vmw_cotable *vcotbl = vmw_cotable(res);
367 if (!vcotbl->scrubbed) {
374 cmd->body.cid = vcotbl->ctx->id;
375 cmd->body.type = vcotbl->type;
376 vcotbl->size_read_back = res->guest_memory_size;
403 struct vmw_cotable *vcotbl = vmw_cotable(res);
407 size_t old_size_read_back = vcotbl->size_read_back;
427 cur_size_read_back = vcotbl->size_read_back;
428 vcotbl->size_read_back = old_size_read_back;
487 vcotbl->size_read_back = cur_size_read_back;
498 vcotbl->size_read_back = old_size_read_back;
506 res->id = vcotbl->type;
546 struct vmw_cotable *vcotbl = vmw_cotable(res);
552 needed_size = (vcotbl->seen_entries + 1) * co_info[vcotbl->type].size;
557 if (vcotbl->scrubbed && vmw_resource_mob_attached(res)) {
562 res->id = vcotbl->type;
603 struct vmw_cotable *vcotbl;
607 vcotbl = kzalloc(sizeof(*vcotbl), GFP_KERNEL);
608 if (unlikely(!vcotbl)) {
613 ret = vmw_resource_init(dev_priv, &vcotbl->res, true,
618 INIT_LIST_HEAD(&vcotbl->resource_list);
619 vcotbl->res.id = type;
620 vcotbl->res.guest_memory_size = PAGE_SIZE;
623 vcotbl->res.guest_memory_size = co_info[type].min_initial_entries *
625 vcotbl->res.guest_memory_size = PFN_ALIGN(vcotbl->res.guest_memory_size);
628 vcotbl->scrubbed = true;
629 vcotbl->seen_entries = -1;
630 vcotbl->type = type;
631 vcotbl->ctx = ctx;
633 vcotbl->res.hw_destroy = vmw_hw_cotable_destroy;
635 return &vcotbl->res;
638 kfree(vcotbl);
651 struct vmw_cotable *vcotbl = vmw_cotable(res);
655 (unsigned) vcotbl->type, id);
659 if (vcotbl->seen_entries < id) {
662 vcotbl->seen_entries = id;
677 struct vmw_cotable *vcotbl =
680 list_add_tail(head, &vcotbl->resource_list);