Skip to content

Commit 745c041

Browse files
committed
GPU (Linux): fix some obvious bugs found in #1284
1 parent 4283d96 commit 745c041

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/detection/gpu/gpu_linux.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,17 @@ static const char* drmDetectAmdSpecific(const FFGPUOptions* options, FFGPUResult
9999
if (options->temp)
100100
{
101101
if (ffamdgpu_query_sensor_info(handle, AMDGPU_INFO_SENSOR_GPU_TEMP, sizeof(value), &value) >= 0)
102-
gpu->temperature = value;
102+
gpu->temperature = value / 1000.;
103103
}
104104

105105
ffStrbufSetS(&gpu->name, ffamdgpu_get_marketing_name(handle));
106106

107107
struct amdgpu_gpu_info gpuInfo;
108108
if (ffamdgpu_query_gpu_info(handle, &gpuInfo) >= 0)
109109
{
110-
gpu->coreCount = (int32_t) gpuInfo.num_shader_engines;
110+
gpu->coreCount = (int32_t) gpuInfo.cu_active_number;
111111
gpu->frequency = (uint32_t) (gpuInfo.max_engine_clk / 1000u);
112-
gpu->index = gpuInfo.asic_id;
112+
gpu->index = FF_GPU_INDEX_UNSET;
113113
gpu->type = gpuInfo.ids_flags & AMDGPU_IDS_FLAGS_FUSION ? FF_GPU_TYPE_INTEGRATED : FF_GPU_TYPE_DISCRETE;
114114

115115
struct amdgpu_heap_info heapInfo;

0 commit comments

Comments
 (0)