Skip to content

Commit ebac140

Browse files
committed
nvkms-dma: fix struct member references for 590.48.01
1 parent f235437 commit ebac140

File tree

1 file changed

+2
-52
lines changed

1 file changed

+2
-52
lines changed

src/nvidia-modeset/src/nvkms-dma.c

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ void nvDmaKickoffEvo(NVEvoChannelPtr pChannel)
6060

6161
static void EvoCoreKickoff(NVDmaBufferEvoPtr push_buffer, NvU32 putOffset)
6262
{
63-
NVEvoDmaPtr pDma = &push_buffer->dma;
6463
NVDevEvoPtr pDevEvo = push_buffer->pDevEvo;
6564
int i;
6665

@@ -75,55 +74,6 @@ static void EvoCoreKickoff(NVDmaBufferEvoPtr push_buffer, NvU32 putOffset)
7574
return;
7675
}
7776

78-
/* If needed, copy the chunk to be kicked off into each GPU's FB */
79-
if (pDma->isBar1Mapping) {
80-
int sd;
81-
82-
NV0080_CTRL_DMA_FLUSH_PARAMS flushParams = { 0 };
83-
NvU32 ret;
84-
85-
NvU32 *endAddress;
86-
87-
if (putOffset < push_buffer->put_offset) {
88-
/* If we've wrapped, copy to the end of the pushbuffer */
89-
nvAssert(putOffset == 0);
90-
endAddress = push_buffer->base + push_buffer->offset_max /
91-
sizeof(NvU32);
92-
} else {
93-
endAddress = push_buffer->buffer;
94-
}
95-
96-
for (sd = 0; sd < pDevEvo->numSubDevices; sd++) {
97-
NvU32 startOffset = push_buffer->put_offset / sizeof(NvU32);
98-
99-
NvU32 *src = push_buffer->base;
100-
NvU32 *dst = pDma->subDeviceAddress[sd];
101-
102-
nvAssert(dst != NULL);
103-
104-
src += startOffset;
105-
dst += startOffset;
106-
while (src < endAddress) {
107-
*dst++ = *src++;
108-
}
109-
}
110-
111-
/*
112-
* Finally, tell RM to flush so that the data actually lands in FB
113-
* before telling the GPU to fetch it.
114-
*/
115-
flushParams.targetUnit = DRF_DEF(0080_CTRL_DMA, _FLUSH_TARGET,
116-
_UNIT_FB, _ENABLE);
117-
118-
ret = nvRmApiControl(nvEvoGlobal.clientHandle,
119-
pDevEvo->deviceHandle,
120-
NV0080_CTRL_CMD_DMA_FLUSH,
121-
&flushParams, sizeof(flushParams));
122-
if (ret != NVOS_STATUS_SUCCESS) {
123-
nvAssert(!"NV0080_CTRL_CMD_DMA_FLUSH failed");
124-
}
125-
}
126-
12777
#if NVCPU_IS_X86_64
12878
__asm__ __volatile__ ("sfence\n\t" : : : "memory");
12979
#elif NVCPU_IS_FAMILY_ARM
@@ -346,7 +296,7 @@ void nvWriteEvoCoreNotifier(
346296
}
347297

348298
pSubChannel = &pDevEvo->core->notifiersDma[sd];
349-
pNotifiers = pSubChannel->subDeviceAddress[sd];
299+
pNotifiers = pSubChannel->cpuAddress;
350300

351301
EvoWriteNotifier(pNotifiers + offset, value);
352302
}
@@ -377,7 +327,7 @@ static NvBool EvoCheckNotifier(const NVDispEvoRec *pDispEvo,
377327
pSubChannel = &pDevEvo->core->notifiersDma[sd];
378328
p = &pDevEvo->core->pb;
379329

380-
pNotifier = pSubChannel->subDeviceAddress[sd];
330+
pNotifier = pSubChannel->cpuAddress;
381331

382332
nvAssert(pNotifier != NULL);
383333
pNotifier += offset;

0 commit comments

Comments
 (0)