On 10/24/23 12:05, Philipp Stanner wrote:
On Tue, 2023-09-19 at 06:21 +1000, Ben Skeggs wrote:
From: Ben Skeggs <bskeggs@xxxxxxxxxx>
- (temporarily) disable if GSP-RM detected, will be added later
disable _what_?
The other commit messages at least briefly name the component. This one
should as well.
Furthermore, I'd say that the wording should be something like "will be
enabled again later, after XXX has been done".
True. However, I think the clue is in the commit title: mmu/tu102
So, here is how I would rewrite this commit message:
Disable kernel-side MMU management when using the GSP firmware. This
will be re-introduced as a call to the GSP firmware in a future commit.
The latter is partial speculation, but I hope this helps!
Cheers,
Martin
P.
Signed-off-by: Ben Skeggs <bskeggs@xxxxxxxxxx>
---
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/tu102.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/tu102.c
b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/tu102.c
index 8d060ce47f86..87979952df4b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/tu102.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/tu102.c
@@ -24,6 +24,7 @@
#include "vmm.h"
#include <core/option.h>
+#include <subdev/gsp.h>
#include <nvif/class.h>
@@ -54,5 +55,8 @@ int
tu102_mmu_new(struct nvkm_device *device, enum nvkm_subdev_type
type, int inst,
struct nvkm_mmu **pmmu)
{
+ if (nvkm_gsp_rm(device->gsp))
+ return -ENODEV;
+
return nvkm_mmu_new_(&tu102_mmu, device, type, inst, pmmu);
}