aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/drm/panfrost_drm.h
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2019-07-11 15:56:14 -0600
committerRob Herring <robh@kernel.org>2019-08-12 14:20:06 -0600
commit203270c025be02d52feca729d9193860317c2e82 (patch)
tree0c748c451696bcb4d4e2c1cfb64d0e994cfa4ed9 /include/uapi/drm/panfrost_drm.h
parentdrm/panfrost: Split panfrost_mmu_map SG list mapping to its own function (diff)
downloadlinux-dev-203270c025be02d52feca729d9193860317c2e82.tar.xz
linux-dev-203270c025be02d52feca729d9193860317c2e82.zip
drm/panfrost: Add a no execute flag for BO allocations
Executable buffers have an alignment restriction that they can't cross 16MB boundary as the GPU program counter is 24-bits. This restriction is currently not handled and we just get lucky. As current userspace assumes all BOs are executable, that has to remain the default. So add a new PANFROST_BO_NOEXEC flag to allow userspace to indicate which BOs are not executable. There is also a restriction that executable buffers cannot start or end on a 4GB boundary. This is mostly avoided as there is only 4GB of space currently and the beginning is already blocked out for NULL ptr detection. Add support to handle this restriction fully regardless of the current constraints. For existing userspace, all created BOs remain executable, but the GPU VA alignment will be increased to the size of the BO. This shouldn't matter as there is plenty of GPU VA space. Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Boris Brezillon <boris.brezillon@collabora.com> Cc: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Steven Price <steven.price@arm.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190808222200.13176-6-robh@kernel.org
Diffstat (limited to 'include/uapi/drm/panfrost_drm.h')
-rw-r--r--include/uapi/drm/panfrost_drm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/drm/panfrost_drm.h b/include/uapi/drm/panfrost_drm.h
index 1e547f9692e9..b80c20d17dec 100644
--- a/include/uapi/drm/panfrost_drm.h
+++ b/include/uapi/drm/panfrost_drm.h
@@ -84,6 +84,8 @@ struct drm_panfrost_wait_bo {
__s64 timeout_ns; /* absolute */
};
+#define PANFROST_BO_NOEXEC 1
+
/**
* struct drm_panfrost_create_bo - ioctl argument for creating Panfrost BOs.
*