]> git.baikalelectronics.ru Git - kernel.git/commit
media: hantro: Read be32 words starting at every fourth byte
authorAndrzej Pietrasiewicz <andrzej.p@collabora.com>
Mon, 27 Jan 2020 14:30:06 +0000 (15:30 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 24 Feb 2020 16:18:13 +0000 (17:18 +0100)
commit0cd98725b7e590459f023979fe08f39464a2a99b
treeced5bcecf9aa57dfd60c19e362291f5424da8f72
parent3e46f1a5a00b45c391c57d856c8eabb18c0eb593
media: hantro: Read be32 words starting at every fourth byte

Since (luma/chroma)_qtable is an array of unsigned char, indexing it
returns consecutive byte locations, but we are supposed to read the arrays
in four-byte words. Consequently, we should be pointing
get_unaligned_be32() at consecutive word locations instead.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Ezequiel Garcia <ezequiel@collabora.com>
Cc: stable@vger.kernel.org
Fixes: 8ef8aa11b92196 "media: rockchip vpu: remove some unused vars"
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/hantro/hantro_h1_jpeg_enc.c
drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c