From 7ce03327a1e6353ecba2163cae2bf18038f279ad Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 9 Aug 2018 00:21:16 -0700 Subject: Revert "gpu: nvgpu: allow all sizes in access fb API" This reverts commit b79c350d68bac79ec9ed80ef5f19f15a0d0eedf4. Underlying PRAMIN infrastructure enforces 4 byte aligned size only, so the API should enforce that too Bug 2285052 Change-Id: I2b4a209edd479d72992708b35e1d52940ff20637 Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/1795653 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/ioctl_dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/os/linux/ioctl_dbg.c') diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c index e7bb6700..ff4fcdca 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c @@ -1568,7 +1568,7 @@ static int nvgpu_dbg_gpu_ioctl_access_fb_memory(struct dbg_session_gk20a *dbg_s, u64 access_limit_size = SZ_4K; int err = 0; - if ((args->offset & 3) || (!args->size)) + if ((args->offset & 3) || (!args->size) || (args->size & 3)) return -EINVAL; dmabuf = dma_buf_get(args->dmabuf_fd); -- cgit v1.2.2