forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/drivers/gpu/drm/nouveau/nvkm/engine/disp/dmacgv100.c
....@@ -50,10 +50,12 @@
5050 gv100_disp_dmac_fini(struct nv50_disp_chan *chan)
5151 {
5252 struct nvkm_device *device = chan->disp->base.engine.subdev.device;
53
+ const u32 uoff = (chan->chid.ctrl - 1) * 0x1000;
5354 const u32 coff = chan->chid.ctrl * 0x04;
5455 nvkm_mask(device, 0x6104e0 + coff, 0x00000010, 0x00000000);
5556 gv100_disp_dmac_idle(chan);
5657 nvkm_mask(device, 0x6104e0 + coff, 0x00000002, 0x00000000);
58
+ chan->suspend_put = nvkm_rd32(device, 0x690000 + uoff);
5759 }
5860
5961 int
....@@ -71,7 +73,7 @@
7173 nvkm_wr32(device, 0x610b2c + poff, 0x00000040);
7274
7375 nvkm_mask(device, 0x6104e0 + coff, 0x00000010, 0x00000010);
74
- nvkm_wr32(device, 0x690000 + uoff, 0x00000000);
76
+ nvkm_wr32(device, 0x690000 + uoff, chan->suspend_put);
7577 nvkm_wr32(device, 0x6104e0 + coff, 0x00000013);
7678 return gv100_disp_dmac_idle(chan);
7779 }