Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aff51175 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Ben Skeggs
Browse files

drm/nouveau/bus: remove cpu_coherent flag



This flag's only remaining function is to ignore the uncached flag for
BOs on coherent architectures.

However the reason for allocating an object uncache on a non-coherent
architecture (namely because the cost of doing explicit flushes/
invalidations is higher than the benefit of caching the data because
accesses are few and far between) should also apply on architectures for
which coherency is maintained implicitly. Thus allocate coherent objects
as uncached on all architectures.

Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 36a471ba
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -175,7 +175,6 @@ struct nvkm_device_func {
	void (*fini)(struct nvkm_device *, bool suspend);
	resource_size_t (*resource_addr)(struct nvkm_device *, unsigned bar);
	resource_size_t (*resource_size)(struct nvkm_device *, unsigned bar);
	bool cpu_coherent;
};

struct nvkm_device_quirk {
+1 −2
Original line number Diff line number Diff line
@@ -209,7 +209,6 @@ nouveau_bo_new(struct drm_device *dev, int size, int align,
	nvbo->tile_flags = tile_flags;
	nvbo->bo.bdev = &drm->ttm.bdev;

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

	nvbo->page_shift = 12;
+0 −1
Original line number Diff line number Diff line
@@ -1614,7 +1614,6 @@ nvkm_device_pci_func = {
	.fini = nvkm_device_pci_fini,
	.resource_addr = nvkm_device_pci_resource_addr,
	.resource_size = nvkm_device_pci_resource_size,
	.cpu_coherent = !IS_ENABLED(CONFIG_ARM),
};

int
+0 −1
Original line number Diff line number Diff line
@@ -245,7 +245,6 @@ nvkm_device_tegra_func = {
	.fini = nvkm_device_tegra_fini,
	.resource_addr = nvkm_device_tegra_resource_addr,
	.resource_size = nvkm_device_tegra_resource_size,
	.cpu_coherent = false,
};

int