Lines Matching refs:mc

144 void amdgpu_gmc_vram_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc,  in amdgpu_gmc_vram_location()  argument
149 mc->vram_start = base; in amdgpu_gmc_vram_location()
150 mc->vram_end = mc->vram_start + mc->mc_vram_size - 1; in amdgpu_gmc_vram_location()
151 if (limit && limit < mc->real_vram_size) in amdgpu_gmc_vram_location()
152 mc->real_vram_size = limit; in amdgpu_gmc_vram_location()
154 if (mc->xgmi.num_physical_nodes == 0) { in amdgpu_gmc_vram_location()
155 mc->fb_start = mc->vram_start; in amdgpu_gmc_vram_location()
156 mc->fb_end = mc->vram_end; in amdgpu_gmc_vram_location()
159 mc->mc_vram_size >> 20, mc->vram_start, in amdgpu_gmc_vram_location()
160 mc->vram_end, mc->real_vram_size >> 20); in amdgpu_gmc_vram_location()
174 void amdgpu_gmc_gart_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc) in amdgpu_gmc_gart_location() argument
181 mc->gart_size += adev->pm.smu_prv_buffer_size; in amdgpu_gmc_gart_location()
186 size_bf = mc->fb_start; in amdgpu_gmc_gart_location()
187 size_af = max_mc_address + 1 - ALIGN(mc->fb_end + 1, four_gb); in amdgpu_gmc_gart_location()
189 if (mc->gart_size > max(size_bf, size_af)) { in amdgpu_gmc_gart_location()
191 mc->gart_size = max(size_bf, size_af); in amdgpu_gmc_gart_location()
194 if ((size_bf >= mc->gart_size && size_bf < size_af) || in amdgpu_gmc_gart_location()
195 (size_af < mc->gart_size)) in amdgpu_gmc_gart_location()
196 mc->gart_start = 0; in amdgpu_gmc_gart_location()
198 mc->gart_start = max_mc_address - mc->gart_size + 1; in amdgpu_gmc_gart_location()
200 mc->gart_start &= ~(four_gb - 1); in amdgpu_gmc_gart_location()
201 mc->gart_end = mc->gart_start + mc->gart_size - 1; in amdgpu_gmc_gart_location()
203 mc->gart_size >> 20, mc->gart_start, mc->gart_end); in amdgpu_gmc_gart_location()
217 void amdgpu_gmc_agp_location(struct amdgpu_device *adev, struct amdgpu_gmc *mc) in amdgpu_gmc_agp_location() argument
224 mc->agp_start = 0xffffffff; in amdgpu_gmc_agp_location()
225 mc->agp_end = 0x0; in amdgpu_gmc_agp_location()
226 mc->agp_size = 0; in amdgpu_gmc_agp_location()
231 if (mc->fb_start > mc->gart_start) { in amdgpu_gmc_agp_location()
232 size_bf = (mc->fb_start & sixteen_gb_mask) - in amdgpu_gmc_agp_location()
233 ALIGN(mc->gart_end + 1, sixteen_gb); in amdgpu_gmc_agp_location()
234 size_af = mc->mc_mask + 1 - ALIGN(mc->fb_end + 1, sixteen_gb); in amdgpu_gmc_agp_location()
236 size_bf = mc->fb_start & sixteen_gb_mask; in amdgpu_gmc_agp_location()
237 size_af = (mc->gart_start & sixteen_gb_mask) - in amdgpu_gmc_agp_location()
238 ALIGN(mc->fb_end + 1, sixteen_gb); in amdgpu_gmc_agp_location()
242 mc->agp_start = (mc->fb_start - size_bf) & sixteen_gb_mask; in amdgpu_gmc_agp_location()
243 mc->agp_size = size_bf; in amdgpu_gmc_agp_location()
245 mc->agp_start = ALIGN(mc->fb_end + 1, sixteen_gb); in amdgpu_gmc_agp_location()
246 mc->agp_size = size_af; in amdgpu_gmc_agp_location()
249 mc->agp_end = mc->agp_start + mc->agp_size - 1; in amdgpu_gmc_agp_location()
251 mc->agp_size >> 20, mc->agp_start, mc->agp_end); in amdgpu_gmc_agp_location()