From b79c350d68bac79ec9ed80ef5f19f15a0d0eedf4 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 24 Jul 2018 13:23:58 +0530 Subject: gpu: nvgpu: allow all sizes in access fb API For IOCTL NVGPU_DBG_GPU_IOCTL_ACCESS_FB_MEMORY, we do not allow size of buffer which is not 4 byte aligned Remove this hard restriction and allow non 4 byte aligned buffer sizes too since we don't really need to enforce this restriction Bug 2265535 Change-Id: Ic4d60604be3698e8629f2b289c9e2d19e20ea525 Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/1784511 Reviewed-by: Kajetan Dutka Tested-by: Kajetan Dutka GVS: Gerrit_Virtual_Submit Reviewed-by: Vinod Gopalakrishnakurup Reviewed-by: Alex Waterman 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') diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c index d530492a..1989a5cb 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_dbg.c @@ -1561,7 +1561,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) || (args->size & 3)) + if ((args->offset & 3) || (!args->size)) return -EINVAL; dmabuf = dma_buf_get(args->dmabuf_fd); -- cgit v1.2.2