Skip to content

Commit bad3d80

Browse files
karolherbstBen Skeggs
authored and
Ben Skeggs
committed
drm/nouveau: Revert "bus: remove cpu_coherent flag"
This reverts commit aff5117. The commit caused fence timeouts within nvc0_screen_destroy and most likely other places as well. The most obvious effect is, that userspace processes take minutes to actually quit. Signed-off-by: Karol Herbst <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
1 parent 666ca3d commit bad3d80

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

drivers/gpu/drm/nouveau/include/nvkm/core/device.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ struct nvkm_device_func {
175175
void (*fini)(struct nvkm_device *, bool suspend);
176176
resource_size_t (*resource_addr)(struct nvkm_device *, unsigned bar);
177177
resource_size_t (*resource_size)(struct nvkm_device *, unsigned bar);
178+
bool cpu_coherent;
178179
};
179180

180181
struct nvkm_device_quirk {

drivers/gpu/drm/nouveau/nouveau_bo.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ nouveau_bo_new(struct drm_device *dev, int size, int align,
209209
nvbo->tile_flags = tile_flags;
210210
nvbo->bo.bdev = &drm->ttm.bdev;
211211

212-
nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED;
212+
if (!nvxx_device(&drm->device)->func->cpu_coherent)
213+
nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED;
213214

214215
nvbo->page_shift = 12;
215216
if (drm->client.vm) {

drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,6 +1614,7 @@ nvkm_device_pci_func = {
16141614
.fini = nvkm_device_pci_fini,
16151615
.resource_addr = nvkm_device_pci_resource_addr,
16161616
.resource_size = nvkm_device_pci_resource_size,
1617+
.cpu_coherent = !IS_ENABLED(CONFIG_ARM),
16171618
};
16181619

16191620
int

drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ nvkm_device_tegra_func = {
245245
.fini = nvkm_device_tegra_fini,
246246
.resource_addr = nvkm_device_tegra_resource_addr,
247247
.resource_size = nvkm_device_tegra_resource_size,
248+
.cpu_coherent = false,
248249
};
249250

250251
int

0 commit comments

Comments
 (0)