]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/nouveau/gsp: add hal for gsp.drop_send_user_shared_data()
authorBen Skeggs <bskeggs@nvidia.com>
Thu, 14 Nov 2024 03:02:37 +0000 (13:02 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 18 May 2025 20:29:24 +0000 (06:29 +1000)
545.23.06 removes NV_VGPU_MSG_EVENT_GSP_SEND_USER_SHARED_DATA, but has
another event (NVLINK_FAULT_UP) in its place.

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>
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/rm.h

index 65640b43f4777a1264f941ce4111cc6dffd03e2b..f7cc8e03d9995573e042c3325fc9afaa5eee39cf 100644 (file)
@@ -2092,6 +2092,12 @@ r535_gsp_dtor(struct nvkm_gsp *gsp)
        nvkm_gsp_mem_dtor(&gsp->logrm);
 }
 
+static void
+r535_gsp_drop_send_user_shared_data(struct nvkm_gsp *gsp)
+{
+       r535_gsp_msg_ntfy_add(gsp, NV_VGPU_MSG_EVENT_GSP_SEND_USER_SHARED_DATA, NULL, NULL);
+}
+
 int
 r535_gsp_oneinit(struct nvkm_gsp *gsp)
 {
@@ -2139,7 +2145,9 @@ r535_gsp_oneinit(struct nvkm_gsp *gsp)
        r535_gsp_msg_ntfy_add(gsp, NV_VGPU_MSG_EVENT_OS_ERROR_LOG, r535_gsp_msg_os_error_log, gsp);
        r535_gsp_msg_ntfy_add(gsp, NV_VGPU_MSG_EVENT_PERF_BRIDGELESS_INFO_UPDATE, NULL, NULL);
        r535_gsp_msg_ntfy_add(gsp, NV_VGPU_MSG_EVENT_UCODE_LIBOS_PRINT, NULL, NULL);
-       r535_gsp_msg_ntfy_add(gsp, NV_VGPU_MSG_EVENT_GSP_SEND_USER_SHARED_DATA, NULL, NULL);
+       if (rmapi->gsp->drop_send_user_shared_data)
+               rmapi->gsp->drop_send_user_shared_data(gsp);
+
        ret = r535_gsp_rm_boot_ctor(gsp);
        if (ret)
                return ret;
@@ -2169,4 +2177,5 @@ r535_gsp = {
        .set_system_info = r535_gsp_set_system_info,
        .get_static_info = r535_gsp_get_static_info,
        .xlat_mc_engine_idx = r535_gsp_xlat_mc_engine_idx,
+       .drop_send_user_shared_data = r535_gsp_drop_send_user_shared_data,
 };
index aecb066982d85bbe7b477408e787ab1836c1f5e0..4a27e8bfafccb816f0bce4b6fed6c6efa93e6903 100644 (file)
@@ -30,6 +30,7 @@ struct nvkm_rm_api {
                int (*set_system_info)(struct nvkm_gsp *);
                int (*get_static_info)(struct nvkm_gsp *);
                bool (*xlat_mc_engine_idx)(u32 mc_engine_idx, enum nvkm_subdev_type *, int *inst);
+               void (*drop_send_user_shared_data)(struct nvkm_gsp *);
        } *gsp;
 
        const struct nvkm_rm_api_rpc {