mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-19 17:58:09 +02:00
Fixes the following building error:
../out_src/src/intel/common/intel_common.c:29:4: error: implicit declaration of function 'free' is invalid in C99 [-Werror,-Wimplicit-function-declarat
ion]
free(engine_info);
^
1 error generated.
Fixes: 5b8b4f78 ("intel/dev: Add engine_class_supported_count to intel_device_info")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29975>
32 lines
871 B
C
32 lines
871 B
C
/*
|
|
* Copyright 2024 Intel Corporation
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include "intel_common.h"
|
|
|
|
#include "intel_engine.h"
|
|
|
|
/* Updates intel_device_info fields that has dependencies on intel/common
|
|
* functions.
|
|
*/
|
|
void intel_common_update_device_info(int fd, struct intel_device_info *devinfo)
|
|
{
|
|
struct intel_query_engine_info *engine_info;
|
|
enum intel_engine_class klass;
|
|
|
|
engine_info = intel_engine_get_info(fd, devinfo->kmd_type);
|
|
if (!engine_info)
|
|
return;
|
|
|
|
devinfo->has_compute_engine = intel_engines_count(engine_info,
|
|
INTEL_ENGINE_CLASS_COMPUTE);
|
|
|
|
for (klass = 0; klass < INTEL_ENGINE_CLASS_INVALID; klass++)
|
|
devinfo->engine_class_supported_count[klass] =
|
|
intel_engines_supported_count(fd, devinfo, engine_info, klass);
|
|
|
|
free(engine_info);
|
|
}
|