From a477caa8953295e92f9d42861dbfbb4dd070f1f3 Mon Sep 17 00:00:00 2001 From: Ketan Patil Date: Fri, 7 Mar 2025 16:52:35 +0000 Subject: [PATCH] video: tegra: nvmap: Disable read/write APIs for prod_nsr NvRmMemRead/NvRmMemWrite APIs don't have corresponding requirements in DriveOS 7.0 Linux NSR. We have taken sign-off from the stakeholders to confirm that they are not using these APIs in T264 Linux Prod NSR variant. But some of them are using these APIs in dev_nsr and did not agree to remove it from dev-nsr, L4T, HOS etc. Hence we need to make sure that they do not accidentally start using these APIs. Add bug_on when the corresponding ioctl is called in prod_nsr. Bug 4980658 Change-Id: Ie9aaa9cc52fc1971b82243bb652d0ee9ce1017ca Signed-off-by: Ketan Patil Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3315736 GVS: buildbot_gerritrpt Reviewed-by: Pritesh Raithatha --- drivers/video/tegra/nvmap/nvmap_ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/tegra/nvmap/nvmap_ioctl.c b/drivers/video/tegra/nvmap/nvmap_ioctl.c index 78bfcfc9..f9d508d4 100644 --- a/drivers/video/tegra/nvmap/nvmap_ioctl.c +++ b/drivers/video/tegra/nvmap/nvmap_ioctl.c @@ -540,6 +540,7 @@ int nvmap_ioctl_rw_handle(struct file *filp, int is_read, void __user *arg, int handle; bool is_ro = false; + BUG_ON(nvmap_dev->support_debug_features == 0); if (copy_from_user(&op, arg, sizeof(op))) return -EFAULT; addr = op.addr;