File Index
Files and directories
Sign in
FILE

ofa.c

File preview with syntax highlighting.

linux-6.19.14/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/ofa.c C
 1/* SPDX-License-Identifier: MIT
 2 *
 3 * Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
 4 */
 5#include <rm/engine.h>
 6
 7#include "nvrm/ofa.h"
 8
 9static int
10r570_ofa_alloc(struct nvkm_gsp_object *parent, u32 handle, u32 oclass, int inst,
11	       struct nvkm_gsp_object *ofa)
12{
13	NV_OFA_ALLOCATION_PARAMETERS *args;
14
15	args = nvkm_gsp_rm_alloc_get(parent, handle, oclass, sizeof(*args), ofa);
16	if (WARN_ON(IS_ERR(args)))
17		return PTR_ERR(args);
18
19	args->size = sizeof(*args);
20	args->engineInstance = inst;
21
22	return nvkm_gsp_rm_alloc_wr(ofa, args);
23}
24
25const struct nvkm_rm_api_engine
26r570_ofa = {
27	.alloc = r570_ofa_alloc,
28};
~/ Read-only file preview.