diff options
author | Iskren Chernev <iskren.chernev@gmail.com> | 2020-12-30 17:29:43 +0200 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2021-01-07 09:12:53 -0800 |
commit | 3f7759e7b7585a0bffda06d4eddc6b0b850ef6c3 (patch) | |
tree | fbac337eaa0e99849172ec922f2233281a2f1e02 /drivers/gpu/drm/msm/adreno/a4xx_gpu.c | |
parent | d863f0c7b536288e2bd40cbc01c10465dd226b11 (diff) |
drm/msm: Add modparam to allow vram carveout
Using the GPU with a VRAM Carveout is a security vulnerability.
Nevertheless it is sometimes required, especially when no IOMMU
implementation is available for a certain platform.
Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/adreno/a4xx_gpu.c')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a4xx_gpu.c b/drivers/gpu/drm/msm/adreno/a4xx_gpu.c index c0be3a0f36b2..82bebb40234d 100644 --- a/drivers/gpu/drm/msm/adreno/a4xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a4xx_gpu.c @@ -692,8 +692,10 @@ struct msm_gpu *a4xx_gpu_init(struct drm_device *dev) * implement a cmdstream validator. */ DRM_DEV_ERROR(dev->dev, "No memory protection without IOMMU\n"); - ret = -ENXIO; - goto fail; + if (!allow_vram_carveout) { + ret = -ENXIO; + goto fail; + } } icc_path = devm_of_icc_get(&pdev->dev, "gfx-mem"); |