aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c
AgeCommit message (Collapse)Author
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-20media: s5p-jpeg: Clear JPEG_CODEC_ON bits in sw reset functionTony K Nadackal
Bits EXYNOS4_DEC_MODE and EXYNOS4_ENC_MODE do not get cleared on software reset. These bits need to be cleared explicitly. Even though the bits in question are already cleared in interrupt service routine, the reset should also clear them in case when e.g. bootloader uses the codec and leaves it in a bad state. [Updated commit message] Signed-off-by: Tony K Nadackal <tony.kn@samsung.com> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: s5p-jpeg: disable encoder/decoder in exynos4-like hardware after useAndrzej Pietrasiewicz
Clearing the bits turns off the encoder/decoder. If the hardware is not turned off after use, at subsequent uses it does not work in a stable manner, resulting in incorrect interrupt status value being read and e.g. erroneous read of compressed bitstream size. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] squash lines for simple wrapper functionsMasahiro Yamada
Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2015-10-01[media] s5p-jpeg: add support for 5433Andrzej Pietrasiewicz
JPEG IP found in Exynos5433 is similar to what is in Exynos4, but there are some subtle differences which this patch takes into account. The most important difference is in what is processed by the JPEG IP and what has to be provided to it. In case of 5433 the IP does not parse Huffman and quantisation tables, so this has to be performed with the CPU and the majority of the code in this patch does that. A small but important difference is in what address is passed to the JPEG IP. In case of 5433 it is the SOS (start of scan) position, which is natural, because the headers must be parsed elsewhere. There is also a difference in how the hardware is put to work in device_run. Data structures are extended as appropriate to accommodate the above changes. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Reviewed-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-09[media] s5p-jpeg: Fix compilation with COMPILE_TESTMauro Carvalho Chehab
ERROR: "__bad_ndelay" [drivers/media/platform/s5p-jpeg/s5p-jpeg.ko] undefined! That happens because asm-generic doesn't like any ndelay time bigger than 20us. Currently, usleep_range() couldn't simply be used, since exynos4_jpeg_sw_reset() is called with a spinlock held. So, let's use udelay() instead. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] s5p-jpeg: fix HUF_TBL_EN bit clearing pathJacek Anaszewski
Use proper bitwise operator while clearing HUF_TBL_EN bit. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] s5p-jpeg: avoid overwriting JPEG_CNTL register settingsJacek Anaszewski
Take into account the JPEG_CNTL register value read before setting SYS_INT_EN bit field. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] s5p-jpeg: remove stray call to readlJacek Anaszewski
There is no need to read INT_EN_REG before enabling interrupts. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-12-18[media] s5p-jpeg: JPEG codecJacek Anaszewski
Add hardware API for the exynos4x12 on s5p-jpeg. Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>