drm/tegra: Add job firewall
authorMikko Perttunen <mperttunen@nvidia.com>
Thu, 10 Jun 2021 11:04:55 +0000 (14:04 +0300)
committerThierry Reding <treding@nvidia.com>
Tue, 10 Aug 2021 15:04:05 +0000 (17:04 +0200)
commit8cc95f3fd35e1de3495d9e2acb051162c739cd25
treeeeabb697cdf949b5460fdefaf851dea5e9a0d338
parent13abe0bb15ceac2fb8e8853bd30c278426d95ad0
drm/tegra: Add job firewall

Add a firewall that validates jobs before submission to ensure
they don't do anything they aren't allowed to do, like accessing
memory they should not access.

The firewall is functionality-wise a copy of the firewall already
implemented in gpu/host1x. It is copied here as it makes more
sense for it to live on the DRM side, as it is only needed for
userspace job submissions, and generally the data it needs to
do its job is easier to access here.

In the future, the other implementation will be removed.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/Makefile
drivers/gpu/drm/tegra/firewall.c [new file with mode: 0644]
drivers/gpu/drm/tegra/submit.c
drivers/gpu/drm/tegra/submit.h