]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Apr 2020 08:50:08 +0000 (10:50 +0200)
commit0a34c55038fb3bff9a43d1b077fe133642456b33
tree86cbdcc81e304118877d9f5013b1e770adcdf260
parent4253148030988dcdbe3e707fa9cf0ba1a5d9e498
media: hantro: Read be32 words starting at every fourth byte

commit 541e9c87bc7e3563fd20e1a3a5c94ff0e6141ac9 upstream.

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: 242f21ad09b421 "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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/hantro/hantro_h1_jpeg_enc.c
drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c