aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/include
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@nvidia.com>2025-02-15 02:55:45 +1000
committerDave Airlie <airlied@redhat.com>2025-05-19 06:29:23 +1000
commitbefe75ae0db90dcbe94fe2670d94b8b7a4855666 (patch)
tree85a50d5043fbeb24b9c05059191052baaf3d9592 /drivers/gpu/drm/nouveau/include
parentdrm/nouveau/gsp: switch to a simpler GSP-RM header layout (diff)
downloadlinux-befe75ae0db90dcbe94fe2670d94b8b7a4855666.tar.gz
linux-befe75ae0db90dcbe94fe2670d94b8b7a4855666.zip
drm/nouveau/gsp: add gpu hal stubs
With GSP-RM handling the majority of the HW programming, NVKM's usual HALs are more elaborate than necessary, resulting in a fair amount of duplicated boilerplate. Adds 'nvkm_rm_gpu' which serves to provide GPU-specific constants and functions in a more streamlined manner. This is initially used in subsequent commits to store engine class IDs, and replace the per-engine/engobj boilerplate with common code for all GSP-RM supported engines - and is further extended when adding GH100, GB10x and GB20x support. Signed-off-by: Ben Skeggs <bskeggs@nvidia.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Timur Tabi <ttabi@nvidia.com> Tested-by: Timur Tabi <ttabi@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.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
index 3fd279be8340..eeaf72f6add3 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h
@@ -209,9 +209,7 @@ struct nvkm_gsp {
u8 tpcs;
} gr;
- const struct nvkm_gsp_rm {
- const struct nvkm_rm_api *api;
- } *rm;
+ struct nvkm_rm *rm;
struct {
struct mutex mutex;
@@ -467,7 +465,7 @@ static inline int
nvkm_gsp_device_event_ctor(struct nvkm_gsp_device *device, u32 handle, u32 id,
nvkm_gsp_event_func func, struct nvkm_gsp_event *event)
{
- const struct nvkm_gsp_rm *rm = device->object.client->gsp->rm;
+ struct nvkm_rm *rm = device->object.client->gsp->rm;
return rm->api->device->event.ctor(device, handle, id, func, event);
}