From: Marek Szyprowski Date: Wed, 4 Mar 2015 13:55:21 +0000 (-0800) Subject: [media] media: s5p-mfc: fix mmap support for 64bit arch X-Git-Tag: v3.18.13~47 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9785703f29f13b04e70dfa179fe8918f8c8747fc;p=profile%2Fwearable%2Fplatform%2Fkernel%2Flinux-3.18-exynos7270.git [media] media: s5p-mfc: fix mmap support for 64bit arch [ Upstream commit 05b676ab42f624425d5f6519276e506b812fa058 ] TASK_SIZE is depends on the systems architecture (32 or 64 bits) and it should not be used for defining offset boundary for mmaping buffers for CAPTURE and OUTPUT queues. This patch fixes support for MMAP calls on the CAPTURE queue on 64bit architectures (like ARM64). Cc: stable@vger.kernel.org Signed-off-by: Marek Szyprowski Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h index 3e41ca1..6849c7e 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h @@ -29,7 +29,7 @@ /* Offset base used to differentiate between CAPTURE and OUTPUT * while mmaping */ -#define DST_QUEUE_OFF_BASE (TASK_SIZE / 2) +#define DST_QUEUE_OFF_BASE (1 << 30) #define MFC_BANK1_ALLOC_CTX 0 #define MFC_BANK2_ALLOC_CTX 1