1 /* 2 * Copyright 2024 Intel Corporation 3 * SPDX-License-Identifier: MIT 4 */ 5 6 #include <stdlib.h> 7 8 #include "intel_common.h" 9 10 #include "intel_engine.h" 11 12 /* Updates intel_device_info fields that has dependencies on intel/common 13 * functions. 14 */ intel_common_update_device_info(int fd,struct intel_device_info * devinfo)15void intel_common_update_device_info(int fd, struct intel_device_info *devinfo) 16 { 17 struct intel_query_engine_info *engine_info; 18 enum intel_engine_class klass; 19 20 engine_info = intel_engine_get_info(fd, devinfo->kmd_type); 21 if (!engine_info) 22 return; 23 24 devinfo->has_compute_engine = intel_engines_count(engine_info, 25 INTEL_ENGINE_CLASS_COMPUTE); 26 27 for (klass = 0; klass < INTEL_ENGINE_CLASS_INVALID; klass++) 28 devinfo->engine_class_supported_count[klass] = 29 intel_engines_supported_count(fd, devinfo, engine_info, klass); 30 31 free(engine_info); 32 } 33