Lines Matching refs:xcp

66 	struct amdgpu_xcp *xcp;  in amdgpu_xcp_run_transition()  local
69 if (xcp_id >= MAX_XCP || !xcp_mgr->xcp[xcp_id].valid) in amdgpu_xcp_run_transition()
72 xcp = &xcp_mgr->xcp[xcp_id]; in amdgpu_xcp_run_transition()
74 xcp_ip = &xcp->ip[i]; in amdgpu_xcp_run_transition()
108 struct amdgpu_xcp *xcp; in __amdgpu_xcp_add_block() local
113 xcp = &xcp_mgr->xcp[xcp_id]; in __amdgpu_xcp_add_block()
114 xcp->ip[ip->ip_id] = *ip; in __amdgpu_xcp_add_block()
115 xcp->ip[ip->ip_id].valid = true; in __amdgpu_xcp_add_block()
117 xcp->valid = true; in __amdgpu_xcp_add_block()
133 xcp_mgr->xcp[i].valid = false; in amdgpu_xcp_init()
148 xcp_mgr->xcp[i].id = i; in amdgpu_xcp_init()
152 xcp_mgr, &xcp_mgr->xcp[i], &mem_id); in amdgpu_xcp_init()
156 xcp_mgr->xcp[i].mem_id = mem_id; in amdgpu_xcp_init()
259 adev->xcp_mgr->xcp->ddev = ddev; in amdgpu_xcp_dev_alloc()
272 adev->xcp_mgr->xcp[i].rdev = p_ddev->render->dev; in amdgpu_xcp_dev_alloc()
273 adev->xcp_mgr->xcp[i].pdev = p_ddev->primary->dev; in amdgpu_xcp_dev_alloc()
274 adev->xcp_mgr->xcp[i].driver = (struct drm_driver *)p_ddev->driver; in amdgpu_xcp_dev_alloc()
275 adev->xcp_mgr->xcp[i].vma_offset_manager = p_ddev->vma_offset_manager; in amdgpu_xcp_dev_alloc()
280 adev->xcp_mgr->xcp[i].ddev = p_ddev; in amdgpu_xcp_dev_alloc()
316 struct amdgpu_xcp *xcp; in amdgpu_xcp_get_partition() local
323 xcp = &xcp_mgr->xcp[i]; in amdgpu_xcp_get_partition()
324 if ((xcp->valid) && (xcp->ip[ip].valid) && in amdgpu_xcp_get_partition()
325 (xcp->ip[ip].inst_mask & BIT(instance))) in amdgpu_xcp_get_partition()
335 int amdgpu_xcp_get_inst_details(struct amdgpu_xcp *xcp, in amdgpu_xcp_get_inst_details() argument
339 if (!xcp->valid || !inst_mask || !(xcp->ip[ip].valid)) in amdgpu_xcp_get_inst_details()
342 *inst_mask = xcp->ip[ip].inst_mask; in amdgpu_xcp_get_inst_details()
356 if (!adev->xcp_mgr->xcp[i].ddev) in amdgpu_xcp_dev_register()
359 ret = drm_dev_register(adev->xcp_mgr->xcp[i].ddev, ent->driver_data); in amdgpu_xcp_dev_register()
376 if (!adev->xcp_mgr->xcp[i].ddev) in amdgpu_xcp_dev_unplug()
379 p_ddev = adev->xcp_mgr->xcp[i].ddev; in amdgpu_xcp_dev_unplug()
381 p_ddev->render->dev = adev->xcp_mgr->xcp[i].rdev; in amdgpu_xcp_dev_unplug()
382 p_ddev->primary->dev = adev->xcp_mgr->xcp[i].pdev; in amdgpu_xcp_dev_unplug()
383 p_ddev->driver = adev->xcp_mgr->xcp[i].driver; in amdgpu_xcp_dev_unplug()
384 p_ddev->vma_offset_manager = adev->xcp_mgr->xcp[i].vma_offset_manager; in amdgpu_xcp_dev_unplug()
399 if (!adev->xcp_mgr->xcp[i].ddev) in amdgpu_xcp_open_device()
402 if (file_priv->minor == adev->xcp_mgr->xcp[i].ddev->render) { in amdgpu_xcp_open_device()
403 if (adev->xcp_mgr->xcp[i].valid == FALSE) { in amdgpu_xcp_open_device()
416 adev->xcp_mgr->xcp[fpriv->xcp_id].mem_id; in amdgpu_xcp_open_device()
432 atomic_dec(&adev->xcp_mgr->xcp[ring->xcp_id].ref_cnt); in amdgpu_xcp_release_sched()