diff options
| author | Ben Skeggs <bskeggs@nvidia.com> | 2025-05-14 09:19:56 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2025-05-19 06:29:26 +1000 |
| commit | 1b9d7b9df8f3e33a577bf00861250d3669bf2000 (patch) | |
| tree | 8a8740103df89b58fb70ab5f1e4ddd35f2eb508a /drivers/gpu/drm/nouveau/include | |
| parent | drm/nouveau/gsp: add hal for gsp.sr_data_size() (diff) | |
| download | linux-1b9d7b9df8f3e33a577bf00861250d3669bf2000.tar.gz linux-1b9d7b9df8f3e33a577bf00861250d3669bf2000.zip | |
drm/nouveau/gsp: add common client alloc code
570.144 has incompatible changes to NV0000_ALLOC_PARAMETERS.
Factor out the common code so it can be shared.
Signed-off-by: Ben Skeggs <bskeggs@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/include')
| -rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h index 40e1b5300dff..4ad07f3ced69 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h @@ -411,21 +411,8 @@ nvkm_gsp_rm_free(struct nvkm_gsp_object *object) return 0; } -static inline int -nvkm_gsp_client_ctor(struct nvkm_gsp *gsp, struct nvkm_gsp_client *client) -{ - if (WARN_ON(!gsp->rm)) - return -ENOSYS; - - return gsp->rm->api->client->ctor(gsp, client); -} - -static inline void -nvkm_gsp_client_dtor(struct nvkm_gsp_client *client) -{ - if (client->gsp) - client->gsp->rm->api->client->dtor(client); -} +int nvkm_gsp_client_ctor(struct nvkm_gsp *, struct nvkm_gsp_client *); +void nvkm_gsp_client_dtor(struct nvkm_gsp_client *); static inline int nvkm_gsp_device_ctor(struct nvkm_gsp_client *client, struct nvkm_gsp_device *device) |
