forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c
....@@ -36,6 +36,16 @@
3636 return device->bar->func->bar1.vmm(device->bar);
3737 }
3838
39
+void
40
+nvkm_bar_bar1_reset(struct nvkm_device *device)
41
+{
42
+ struct nvkm_bar *bar = device->bar;
43
+ if (bar) {
44
+ bar->func->bar1.init(bar);
45
+ bar->func->bar1.wait(bar);
46
+ }
47
+}
48
+
3949 struct nvkm_vmm *
4050 nvkm_bar_bar2_vmm(struct nvkm_device *device)
4151 {
....@@ -49,6 +59,16 @@
4959 }
5060
5161 void
62
+nvkm_bar_bar2_reset(struct nvkm_device *device)
63
+{
64
+ struct nvkm_bar *bar = device->bar;
65
+ if (bar && bar->bar2) {
66
+ bar->func->bar2.init(bar);
67
+ bar->func->bar2.wait(bar);
68
+ }
69
+}
70
+
71
+void
5272 nvkm_bar_bar2_fini(struct nvkm_device *device)
5373 {
5474 struct nvkm_bar *bar = device->bar;