Ben Skeggs
2023-Sep-18 20:21 UTC
[Nouveau] [PATCH 17/44] drm/nouveau/mmu/tu102-: prepare for GSP-RM
From: Ben Skeggs <bskeggs at redhat.com> - (temporarily) disable if GSP-RM detected, will be added later Signed-off-by: Ben Skeggs <bskeggs at redhat.com> --- 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); } -- 2.41.0
Philipp Stanner
2023-Oct-24 09:05 UTC
[Nouveau] [PATCH 17/44] drm/nouveau/mmu/tu102-: prepare for GSP-RM
On Tue, 2023-09-19 at 06:21 +1000, Ben Skeggs wrote:> From: Ben Skeggs <bskeggs at redhat.com> > > - (temporarily) disable if GSP-RM detected, will be added laterdisable _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". P.> > Signed-off-by: Ben Skeggs <bskeggs at redhat.com> > --- > ?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); > ?}