drm/panthor: Explicitly set the coherency mode
authorAkash Goel <akash.goel@arm.com>
Wed, 30 Oct 2024 22:54:06 +0000 (22:54 +0000)
committerLiviu Dudau <liviu.dudau@arm.com>
Tue, 19 Nov 2024 16:16:28 +0000 (16:16 +0000)
commitdd7db8d911a103cb17927cfdba69c2bdfa6e8a71
tree30bed814895b21456e6945355d8ae347a914daa9
parent06e931e0fcb8f24e929efba973fd242d6d6cd1e0
drm/panthor: Explicitly set the coherency mode

This commit fixes the potential misalignment between the value of device
tree property "dma-coherent" and default value of COHERENCY_ENABLE
register.
Panthor driver didn't explicitly program the COHERENCY_ENABLE register
with the desired coherency mode. The default value of COHERENCY_ENABLE
register is implementation defined, so it may not be always aligned with
the "dma-coherent" property value.
The commit also checks the COHERENCY_FEATURES register to confirm that
the coherency protocol is actually supported or not.

v2:
- Added R-b tags

Signed-off-by: Akash Goel <akash.goel@arm.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20241030225407.4077513-3-akash.goel@arm.com
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
drivers/gpu/drm/panthor/panthor_device.c
drivers/gpu/drm/panthor/panthor_gpu.c