Commit bad3d80f authored by Karol Herbst's avatar Karol Herbst Committed by Ben Skeggs

drm/nouveau: Revert "bus: remove cpu_coherent flag"

This reverts commit aff51175.

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: default avatarKarol Herbst <karolherbst@gmail.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 666ca3d8
...@@ -175,6 +175,7 @@ struct nvkm_device_func { ...@@ -175,6 +175,7 @@ struct nvkm_device_func {
void (*fini)(struct nvkm_device *, bool suspend); void (*fini)(struct nvkm_device *, bool suspend);
resource_size_t (*resource_addr)(struct nvkm_device *, unsigned bar); resource_size_t (*resource_addr)(struct nvkm_device *, unsigned bar);
resource_size_t (*resource_size)(struct nvkm_device *, unsigned bar); resource_size_t (*resource_size)(struct nvkm_device *, unsigned bar);
bool cpu_coherent;
}; };
struct nvkm_device_quirk { struct nvkm_device_quirk {
......
...@@ -209,7 +209,8 @@ nouveau_bo_new(struct drm_device *dev, int size, int align, ...@@ -209,7 +209,8 @@ nouveau_bo_new(struct drm_device *dev, int size, int align,
nvbo->tile_flags = tile_flags; nvbo->tile_flags = tile_flags;
nvbo->bo.bdev = &drm->ttm.bdev; nvbo->bo.bdev = &drm->ttm.bdev;
nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED; if (!nvxx_device(&drm->device)->func->cpu_coherent)
nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED;
nvbo->page_shift = 12; nvbo->page_shift = 12;
if (drm->client.vm) { if (drm->client.vm) {
......
...@@ -1614,6 +1614,7 @@ nvkm_device_pci_func = { ...@@ -1614,6 +1614,7 @@ nvkm_device_pci_func = {
.fini = nvkm_device_pci_fini, .fini = nvkm_device_pci_fini,
.resource_addr = nvkm_device_pci_resource_addr, .resource_addr = nvkm_device_pci_resource_addr,
.resource_size = nvkm_device_pci_resource_size, .resource_size = nvkm_device_pci_resource_size,
.cpu_coherent = !IS_ENABLED(CONFIG_ARM),
}; };
int int
......
...@@ -245,6 +245,7 @@ nvkm_device_tegra_func = { ...@@ -245,6 +245,7 @@ nvkm_device_tegra_func = {
.fini = nvkm_device_tegra_fini, .fini = nvkm_device_tegra_fini,
.resource_addr = nvkm_device_tegra_resource_addr, .resource_addr = nvkm_device_tegra_resource_addr,
.resource_size = nvkm_device_tegra_resource_size, .resource_size = nvkm_device_tegra_resource_size,
.cpu_coherent = false,
}; };
int int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment