]> git.baikalelectronics.ru Git - kernel.git/commit
gpu: host1x: Use correct semantics for HOST1X_CHANNEL_DMAEND
authorThierry Reding <treding@nvidia.com>
Fri, 1 Feb 2019 13:28:29 +0000 (14:28 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 7 Feb 2019 17:28:58 +0000 (18:28 +0100)
commit6c8bd7b1fd67a7f30ccd3ff37a65dfc550f22c17
tree25b86a7d2e0c567f2e4d77360fce720cc99519f9
parent3688fb32ed80e8ae011d30aa75be52cb5747558e
gpu: host1x: Use correct semantics for HOST1X_CHANNEL_DMAEND

The HOST1X_CHANNEL_DMAEND is an offset relative to the value written to
the HOST1X_CHANNEL_DMASTART register, but it is currently treated as an
absolute address. This can cause SMMU faults if the CDMA fetches past a
pushbuffer's IOMMU mapping.

Properly setting the DMAEND prevents the CDMA from fetching beyond that
address and avoid such issues. This is currently not observed because a
whole (almost) page of essentially scratch space absorbs any excessive
prefetching by CDMA. However, changing the number of slots in the push
buffer can trigger these SMMU faults.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/host1x/hw/cdma_hw.c