core_vmid 39 drivers/gpu/drm/amd/display/modules/vmid/vmid.c container_of(mod_vmid, struct core_vmid, public) core_vmid 41 drivers/gpu/drm/amd/display/modules/vmid/vmid.c static void add_ptb_to_table(struct core_vmid *core_vmid, unsigned int vmid, uint64_t ptb) core_vmid 43 drivers/gpu/drm/amd/display/modules/vmid/vmid.c core_vmid->ptb_assigned_to_vmid[vmid] = ptb; core_vmid 44 drivers/gpu/drm/amd/display/modules/vmid/vmid.c core_vmid->num_vmids_available--; core_vmid 47 drivers/gpu/drm/amd/display/modules/vmid/vmid.c static void clear_entry_from_vmid_table(struct core_vmid *core_vmid, unsigned int vmid) core_vmid 49 drivers/gpu/drm/amd/display/modules/vmid/vmid.c core_vmid->ptb_assigned_to_vmid[vmid] = 0; core_vmid 50 drivers/gpu/drm/amd/display/modules/vmid/vmid.c core_vmid->num_vmids_available++; core_vmid 53 drivers/gpu/drm/amd/display/modules/vmid/vmid.c static void evict_vmids(struct core_vmid *core_vmid) core_vmid 56 drivers/gpu/drm/amd/display/modules/vmid/vmid.c uint16_t ord = dc_get_vmid_use_vector(core_vmid->dc); core_vmid 59 drivers/gpu/drm/amd/display/modules/vmid/vmid.c for (i = 1; i < core_vmid->num_vmid; i++) { core_vmid 61 drivers/gpu/drm/amd/display/modules/vmid/vmid.c clear_entry_from_vmid_table(core_vmid, i); core_vmid 66 drivers/gpu/drm/amd/display/modules/vmid/vmid.c static int get_existing_vmid_for_ptb(struct core_vmid *core_vmid, uint64_t ptb) core_vmid 70 drivers/gpu/drm/amd/display/modules/vmid/vmid.c for (i = 0; i < core_vmid->num_vmid; i++) { core_vmid 71 drivers/gpu/drm/amd/display/modules/vmid/vmid.c if (core_vmid->ptb_assigned_to_vmid[i] == ptb) core_vmid 79 drivers/gpu/drm/amd/display/modules/vmid/vmid.c static int get_next_available_vmid(struct core_vmid *core_vmid) core_vmid 83 drivers/gpu/drm/amd/display/modules/vmid/vmid.c for (i = 1; i < core_vmid->num_vmid; i++) { core_vmid 84 drivers/gpu/drm/amd/display/modules/vmid/vmid.c if (core_vmid->ptb_assigned_to_vmid[i] == 0) core_vmid 93 drivers/gpu/drm/amd/display/modules/vmid/vmid.c struct core_vmid *core_vmid = MOD_VMID_TO_CORE(mod_vmid); core_vmid 100 drivers/gpu/drm/amd/display/modules/vmid/vmid.c vmid = get_existing_vmid_for_ptb(core_vmid, ptb); core_vmid 103 drivers/gpu/drm/amd/display/modules/vmid/vmid.c struct dc_virtual_addr_space_config va_config = core_vmid->base_config; core_vmid 107 drivers/gpu/drm/amd/display/modules/vmid/vmid.c if (core_vmid->num_vmids_available == 0) core_vmid 108 drivers/gpu/drm/amd/display/modules/vmid/vmid.c evict_vmids(core_vmid); core_vmid 110 drivers/gpu/drm/amd/display/modules/vmid/vmid.c vmid = get_next_available_vmid(core_vmid); core_vmid 111 drivers/gpu/drm/amd/display/modules/vmid/vmid.c add_ptb_to_table(core_vmid, vmid, ptb); core_vmid 113 drivers/gpu/drm/amd/display/modules/vmid/vmid.c dc_setup_vm_context(core_vmid->dc, &va_config, vmid); core_vmid 121 drivers/gpu/drm/amd/display/modules/vmid/vmid.c struct core_vmid *core_vmid = MOD_VMID_TO_CORE(mod_vmid); core_vmid 123 drivers/gpu/drm/amd/display/modules/vmid/vmid.c core_vmid->num_vmids_available = core_vmid->num_vmid - 1; core_vmid 124 drivers/gpu/drm/amd/display/modules/vmid/vmid.c memset(core_vmid->ptb_assigned_to_vmid, 0, sizeof(core_vmid->ptb_assigned_to_vmid[0]) * MAX_VMID); core_vmid 132 drivers/gpu/drm/amd/display/modules/vmid/vmid.c struct core_vmid *core_vmid; core_vmid 140 drivers/gpu/drm/amd/display/modules/vmid/vmid.c core_vmid = kzalloc(sizeof(struct core_vmid), GFP_KERNEL); core_vmid 142 drivers/gpu/drm/amd/display/modules/vmid/vmid.c if (core_vmid == NULL) core_vmid 145 drivers/gpu/drm/amd/display/modules/vmid/vmid.c core_vmid->dc = dc; core_vmid 146 drivers/gpu/drm/amd/display/modules/vmid/vmid.c core_vmid->num_vmid = num_vmid; core_vmid 147 drivers/gpu/drm/amd/display/modules/vmid/vmid.c core_vmid->num_vmids_available = num_vmid - 1; core_vmid 148 drivers/gpu/drm/amd/display/modules/vmid/vmid.c core_vmid->base_config = *va_config; core_vmid 150 drivers/gpu/drm/amd/display/modules/vmid/vmid.c memset(core_vmid->ptb_assigned_to_vmid, 0, sizeof(core_vmid->ptb_assigned_to_vmid[0]) * MAX_VMID); core_vmid 152 drivers/gpu/drm/amd/display/modules/vmid/vmid.c return &core_vmid->public; core_vmid 163 drivers/gpu/drm/amd/display/modules/vmid/vmid.c struct core_vmid *core_vmid = MOD_VMID_TO_CORE(mod_vmid); core_vmid 165 drivers/gpu/drm/amd/display/modules/vmid/vmid.c kfree(core_vmid);