Lines Matching refs:mgpu_info
54 mutex_lock(&mgpu_info.mutex); in amdgpu_unregister_gpu_instance()
56 for (i = 0; i < mgpu_info.num_gpu; i++) { in amdgpu_unregister_gpu_instance()
57 gpu_instance = &(mgpu_info.gpu_ins[i]); in amdgpu_unregister_gpu_instance()
59 mgpu_info.gpu_ins[i] = in amdgpu_unregister_gpu_instance()
60 mgpu_info.gpu_ins[mgpu_info.num_gpu - 1]; in amdgpu_unregister_gpu_instance()
61 mgpu_info.num_gpu--; in amdgpu_unregister_gpu_instance()
63 mgpu_info.num_apu--; in amdgpu_unregister_gpu_instance()
65 mgpu_info.num_dgpu--; in amdgpu_unregister_gpu_instance()
70 mutex_unlock(&mgpu_info.mutex); in amdgpu_unregister_gpu_instance()
104 mutex_lock(&mgpu_info.mutex); in amdgpu_register_gpu_instance()
106 if (mgpu_info.num_gpu >= MAX_GPU_INSTANCE) { in amdgpu_register_gpu_instance()
108 mutex_unlock(&mgpu_info.mutex); in amdgpu_register_gpu_instance()
112 gpu_instance = &(mgpu_info.gpu_ins[mgpu_info.num_gpu]); in amdgpu_register_gpu_instance()
116 mgpu_info.num_gpu++; in amdgpu_register_gpu_instance()
118 mgpu_info.num_apu++; in amdgpu_register_gpu_instance()
120 mgpu_info.num_dgpu++; in amdgpu_register_gpu_instance()
122 mutex_unlock(&mgpu_info.mutex); in amdgpu_register_gpu_instance()