amdgpu_amdkfd.c
Includes Linux kernel module headerAssigns a negative errno constant
SHA-256cece763dde1cccd924c67eb875be838234cb183696db4e5e201e2d569d0978ee
MaleculeO(Er)H(Os)
Evidence
1// SPDX-License-Identifier: MIT
2/*
3 * Copyright 2014 Advanced Micro Devices, Inc.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * th …
16:40… O THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTH …
19:67… RWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
22 */
23
24#include "amdgpu_amdkfd.h"
25#include "amd_pcie.h"
26#include "amd_shared.h"
27
28#include "amdgpu.h"
29#include "amdgpu_gfx.h"
30#include "amdgpu_dma_buf.h"
31#include <drm/ttm/ttm_tt.h>
32#include <linux/module.h>
33#include <linux/dma-buf.h>
34#include "amdgpu_xgmi.h"
35#include <uapi/linux/kfd_ioctl.h>
36#include "amdgpu_ras.h"
37#include "amdgpu_umc.h"
38#include "amdgpu_reset.h"
39
40/* Total memory size in system memory and all GPU VRAM. Used to
41 * estimate worst case amoun …
668:6… ult:
669 pr_err("Invalid engine in IB submission: %d\n", engine);
670 ret = -EINVAL;
671 goto err;
672 }
⋯7 lines
823:26… ;
824 int r = 0;
825
826 if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
827 return -EINVAL;
828
829 if (!kiq_ring->sched.ready || amdgpu_in_reset(adev))
⋯6 lines
836 ring = kzalloc_obj(*ring);
837 if (!ring) {
838 r = -ENOMEM;
839 goto free_ring_funcs;
840 }
⋯4 lines