GitHub/LineageOS/android_kernel_motorola_exynos9610.git
6 years ago[COMMON] usi_v2: add usi_v2 driver to Kconfig and Makefile.
Youngmin Nam [Fri, 3 Feb 2017 04:38:52 +0000 (13:38 +0900)]
[COMMON] usi_v2: add usi_v2 driver to Kconfig and Makefile.

Change-Id: I8bc6dbc8b05b23b494d71f833d7ce80fb6ca92f9
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
6 years ago[COMMON] usi_v2: Fix prevent code.
Kyungwoo Kang [Thu, 23 Nov 2017 09:45:38 +0000 (18:45 +0900)]
[COMMON] usi_v2: Fix prevent code.

CID 201502 Comparison with signed and unsigned int might
cause infinite value.

Change-Id: I7376fa085a84e2e6263e78cbe1cb89461bd103c4
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
6 years ago[COMMON] usi_v2: Fix channel id alias
Kyungwoo Kang [Tue, 10 Oct 2017 02:24:08 +0000 (11:24 +0900)]
[COMMON] usi_v2: Fix channel id alias

To get Channel ID information from device tree file,
we need to match alias naming with driver code and Device tree.

Change-Id: I6d0e378b5cc46c78f9dd5039777bc6436ce75e6c
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
6 years ago[COMMON] usi_v2: USI version2 configuration driver.
Youngmin Nam [Thu, 2 Feb 2017 08:33:04 +0000 (17:33 +0900)]
[COMMON] usi_v2: USI version2 configuration driver.

Change-Id: I4bbb7654cfa6d3503a02f0a6239544713eeaaadb
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
6 years ago[COMMON] serial: samsung: add clk_set_rate
myung-su.cha [Thu, 26 Apr 2018 08:48:46 +0000 (17:48 +0900)]
[COMMON] serial: samsung: add clk_set_rate

Until now, UART only get clk rate from source clk.
But clk_set_rate is needed to make appropriate Baud rate which
cannot be made from source clk rate.

Change-Id: I38d15b545bf356814b9387b62ea94c38e81fc390
Signed-off-by: myung-su.cha <myung-su.cha@samsung.com>
6 years ago[COMMON] serial: samsung: Add interrupt masking before enable the channel & remove...
Kyungwoo Kang [Wed, 25 Apr 2018 08:51:28 +0000 (17:51 +0900)]
[COMMON] serial: samsung: Add interrupt masking before enable the channel & remove duplicaed function call.

1. If the UART channel is located in non-alive block, SFR values go to
the reset value after the system power mode. So the interrupt
should be masked before enabling the channel otherwise Tx interrupt
will be occurred without any purpose.

2. UART channel reset is called twice when resume sequence, so we
decided to remove one of reset function call.

Change-Id: Ie84c51b0c97c572d48d302b43ec3ee64ee5ea597
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
6 years ago[COMMON] serial: samsung: Add sfr dump function
Kyungwoo Kang [Mon, 23 Apr 2018 04:44:52 +0000 (13:44 +0900)]
[COMMON] serial: samsung: Add sfr dump function

Change-Id: Ie12bae705cc959db18e6237ce4b0589f7a12a6fe
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
6 years ago[COMMON] spi: s3c64xx: divide tranfer length in DMA mode.
myung-su.cha [Mon, 14 May 2018 04:12:50 +0000 (13:12 +0900)]
[COMMON] spi: s3c64xx: divide tranfer length in DMA mode.

When transfer length is over the max value of COUNT_VALUE in PACKET_CNT_REG,
spi H/W only perceives the bits of COUNT_VALUE, so spiclk is
generated less than expected numbers.
Therefore, transfer length must be divided under the max value of
PACKET_CNT COUNT_VALUE.

Change-Id: Ic3faa2dda2076544176f97d32507da63f46e24a3
Signed-off-by: myung-su.cha <myung-su.cha@samsung.com>
6 years ago[COMMON] i2c: s3c2410: Remove unnecessary pm runtime fucntion calls
Kyungwoo Kang [Thu, 17 May 2018 05:49:04 +0000 (14:49 +0900)]
[COMMON] i2c: s3c2410: Remove unnecessary pm runtime fucntion calls

At 4.4 linux migration code, unnecessary PM_RUNTIME functions were
added.

Change-Id: I40cbf4cdf478d261f007053498e217d7cfdb53ac
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
6 years ago[9610] arm64: dts: fix spi dt node
myung-su.cha [Fri, 25 May 2018 06:54:26 +0000 (15:54 +0900)]
[9610] arm64: dts: fix spi dt node

PDMA channel number and clock name of SPI channels are wrongly written.
So, this patch removes or fixes pdma channel number and clock name of SPI channels.

Change-Id: I5a313f49ad13495496134c99f9a460d3ad85a3c9
Signed-off-by: myung-su.cha <myung-su.cha@samsung.com>
6 years ago[9610] arm64: configs: erd9610: enable spi
myung-su.cha [Thu, 17 May 2018 07:42:24 +0000 (16:42 +0900)]
[9610] arm64: configs: erd9610: enable spi

Change-Id: Icee7f82b67a14ef8ab407347d8d890c4d30ffbf7
Signed-off-by: myung-su.cha <myung-su.cha@samsung.com>
6 years ago[COMMON] spi: s3c64xx: add CONFIG_ARM64_EXYNOS_CPUIDLE
myung-su.cha [Thu, 17 May 2018 05:37:34 +0000 (14:37 +0900)]
[COMMON] spi: s3c64xx: add CONFIG_ARM64_EXYNOS_CPUIDLE

Change-Id: I795a41f9a5f6259703e9be97953b4d38040d41bb
Signed-off-by: myung-su.cha <myung-su.cha@samsung.com>
6 years ago[COMMON] crypto: diskcipher: disable free_req
Boojin Kim [Thu, 24 May 2018 01:26:25 +0000 (10:26 +0900)]
[COMMON] crypto: diskcipher: disable free_req

Change-Id: Ibfa7f0def8b28f1d48330a647e87cdcfadaac339
Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
6 years ago[9610][ERD] arm64: configs: run savedefconfig
Youngmin Nam [Mon, 28 May 2018 06:32:33 +0000 (15:32 +0900)]
[9610][ERD] arm64: configs: run savedefconfig

Change-Id: I353dab4c8051a0d65efba6a76dfaaec5f1c8596b
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
6 years ago[9610] arm64: dts: Remove unnecessary memreserve
Youngmin Nam [Fri, 25 May 2018 06:34:03 +0000 (15:34 +0900)]
[9610] arm64: dts: Remove unnecessary memreserve

This patch removes unnecessary memreserve in device tree.
Without memreserve, bootloader handles memory region.

Change-Id: I0c9982f48b1f863e4d87ec2bff1d88408020df28
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
6 years ago[COMMON] pinctrl: samsung: change return code
Hyunki Koo [Thu, 24 May 2018 11:45:50 +0000 (20:45 +0900)]
[COMMON] pinctrl: samsung: change return code

This patch change return code to remove kmemleak

unreferenced object 0xffffffc8f0f0c300 (size 128):
  comm "swapper/0", pid 1, jiffies 4294892530 (age 1408.240s)
  hex dump (first 32 bytes):
    44 7c 41 08 80 ff ff ff 98 95 d1 f0 c8 ff ff ff  D|A.............
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffff8008ad4b9c>] kmemleak_alloc+0x3c/0x68
    [<ffffff8008223190>] __kmalloc+0x20c/0x41c
    [<ffffff8008125500>] request_threaded_irq+0xc4/0x154
    [<ffffff8008128800>] devm_request_threaded_irq+0x84/0xd0
    [<ffffff8008417ac0>] exynos_eint_gpio_init+0x50/0x1d4
    [<ffffff80084168c8>] samsung_pinctrl_probe+0x8cc/0x970
    [<ffffff800853a93c>] platform_drv_probe+0x58/0xac
    [<ffffff800853830c>] driver_probe_device+0x274/0x2b4
    [<ffffff8008538ac4>] __device_attach_driver+0x98/0xb0
    [<ffffff8008536a38>] bus_for_each_drv+0x74/0xbc
    [<ffffff800853843c>] __device_attach+0xa4/0x128
    [<ffffff80085384d0>] device_initial_probe+0x10/0x18
    [<ffffff8008536b9c>] bus_probe_device+0x30/0x8c
    [<ffffff80085342c8>] device_add+0x4b4/0x544
    [<ffffff8008821268>] of_device_add+0x34/0x44
    [<ffffff8008821c4c>] of_platform_device_create_pdata+0x7c/0xb0

Change-Id: Ib4544b7f998812fd4a17e17796d65178e783d2e6
Signed-off-by: Hyunki Koo <hyunki00.koo@samsung.com>
6 years ago[HACK] g2d: enable self protection not to use smc call
hyesoo.yu [Wed, 30 May 2018 01:45:39 +0000 (10:45 +0900)]
[HACK] g2d: enable self protection not to use smc call

Change-Id: I6e3addad86ce048f3d91b56431620ed6c0824819
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
6 years ago[9610][ERD] arm64: config: erd9610_defconfig: enable MFC
Sunyoung Kang [Mon, 21 May 2018 06:52:11 +0000 (15:52 +0900)]
[9610][ERD] arm64: config: erd9610_defconfig: enable MFC

Change-Id: I7c26974892a81888d15055ef59de5d5b28d80b78
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years ago[COMMON] qos: Add MFC related qos.
Chungwoo Park [Tue, 29 May 2018 04:10:39 +0000 (13:10 +0900)]
[COMMON] qos: Add MFC related qos.

Change-Id: I27921a0d40a7b99d818bd1ee4aae0dcb76f2ce30
Signed-off-by: Chungwoo Park <cww.park@samsung.com>
6 years ago[9610] bts: add scenario types
Taekki Kim [Mon, 28 May 2018 09:06:33 +0000 (18:06 +0900)]
[9610] bts: add scenario types

Change-Id: I45f524162eaffb638b74110adf91e55a91aff955
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
6 years ago[9610] arm64: dtsi: add hpa heap
hyesoo.yu [Tue, 29 May 2018 08:24:18 +0000 (17:24 +0900)]
[9610] arm64: dtsi: add hpa heap

Change-Id: I2ea3776556a70b8a2ca3ef1e351dc03e3043605b
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
6 years ago[9610] arm64: dts: add MFC device tree
Sunyoung Kang [Mon, 28 May 2018 08:31:38 +0000 (17:31 +0900)]
[9610] arm64: dts: add MFC device tree

This adds the MFC device tree file: exynos9610-mfc.dtsi

Change-Id: If7f27ec043bac4a852f6fa21573b343db421bf31
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years ago[COMMON] media: mfc: move to the new dma-buf-container
Cho KyongHo [Fri, 13 Apr 2018 05:02:46 +0000 (14:02 +0900)]
[COMMON] media: mfc: move to the new dma-buf-container

The new, working dma-buf-container is introduced by the commit
ee1d9055d ('dma-buf: introduce dma-buf container'). It still supports
the same API functions but the contexts are slightly changed because
the design of dma-buf-container is changed.

Specifically, dmabuf_container_get_count() now returns -EINVAL instead
of 0 for the dma-bufs that is not a dma-buf-container. This change of
return value comes from the fact that dma-buf-container allows having
no dma-buf by its design although it is impossible to create an empty
dma-buf-container in practice.

Change-Id: I38b7534b2e0bb30e8ec331d019a089736d847dbe
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
6 years ago[COMMON] media: mfc: skip itmon_notifier if master is null.
Jeonghee Kim [Mon, 28 May 2018 12:22:19 +0000 (21:22 +0900)]
[COMMON] media: mfc: skip itmon_notifier if master is null.

The master information can has null value,
if a complicated itmon error occurs due to bus problem.
Skip itmon_notifier at this time.

Change-Id: I111aa765025da42fd1a8e6d5fd047bec677f9d99
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: fix the plane number check.
Jeonghee Kim [Mon, 28 May 2018 11:56:17 +0000 (20:56 +0900)]
[COMMON] media: mfc: fix the plane number check.

In the DRM encoder scenario, a dma_buf with null value was used.
get_dmabuf should be called according to the number of fds,
not the number of planes.

Change-Id: Ia7eb1c2eb1b57712b2376d82fec78de8d3418d07
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: parse supported version of each feature
Jeonghee Kim [Fri, 25 May 2018 06:57:55 +0000 (15:57 +0900)]
[COMMON] media: mfc: parse supported version of each feature

Added to check the supported F/W version of each feature.

It is possible to check whether each feature is supported by using the command below.
echo 1 > d/mfc/mfc_info

Change-Id: I7b28ac5136951c8bac0c4ae5856bb9e9c37a0b3f
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: parse default param for encoder setting
Jeonghee Kim [Thu, 24 May 2018 04:44:44 +0000 (13:44 +0900)]
[COMMON] media: mfc: parse default param for encoder setting

Change-Id: Ib8a0edf87296ba128ffd54e01ceb99661174d85c
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: parse sysmmu info for checking sysmmu fault.
Jeonghee Kim [Thu, 24 May 2018 00:31:03 +0000 (09:31 +0900)]
[COMMON] media: mfc: parse sysmmu info for checking sysmmu fault.

If sysmmu is used with other IPs, it should be checked whether it's an MFC fault.

Change-Id: Ibc886b774a247d434a10db092d195f2039690e49
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: parse dts for checking features
Jeonghee Kim [Wed, 23 May 2018 04:04:38 +0000 (13:04 +0900)]
[COMMON] media: mfc: parse dts for checking features

Change-Id: I018b700dc0ca70b2c07b3e76537a9213bbe73644
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: parse dts for checking qos control
Jeonghee Kim [Fri, 18 May 2018 10:04:24 +0000 (19:04 +0900)]
[COMMON] media: mfc: parse dts for checking qos control

Change-Id: Ia65d9546fc2c1beba40ddae9bfd463fce549bdbc
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: parse dts for checking nal_q
Jeonghee Kim [Thu, 17 May 2018 10:37:07 +0000 (19:37 +0900)]
[COMMON] media: mfc: parse dts for checking nal_q

Change-Id: I39f8dd4fcdd601d7489c3c8208ffd1960c8a3dc0
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: parse dts for checking debug_mode
Jeonghee Kim [Thu, 17 May 2018 10:04:26 +0000 (19:04 +0900)]
[COMMON] media: mfc: parse dts for checking debug_mode

Change-Id: I0c48bb82030134cc10905e82f19c32abd3a3e1fe
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: remove unused variable parsing from dts
Jeonghee Kim [Wed, 16 May 2018 09:07:15 +0000 (18:07 +0900)]
[COMMON] media: mfc: remove unused variable parsing from dts

Change-Id: Idd47a43116066818d9367e578f3385446df89567
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: change compatible and data name
Jeonghee Kim [Wed, 16 May 2018 08:54:45 +0000 (17:54 +0900)]
[COMMON] media: mfc: change compatible and data name

Change-Id: I5178feabee53e01a83a29ada79f7ac6572756699
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: OTF: change otf initialization sequence.
Jeonghee Kim [Mon, 14 May 2018 05:01:50 +0000 (14:01 +0900)]
[COMMON] media: mfc: OTF: change otf initialization sequence.

An unnecessary error message was outputted at the time of booting
while trying to get HWFC information from a repeater driver that is not initialized.
So, the location requesting HWFC information has been changed. (open->s_fmt)

Change-Id: Iaefa9670dc367d7987721ec74847ac7e3cd50757
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: OTF: remove set_es_size
Jeonghee Kim [Fri, 4 May 2018 09:56:06 +0000 (18:56 +0900)]
[COMMON] media: mfc: OTF: remove set_es_size

This function is no longer in use.

Change-Id: I626e0e96a1906e19b2801d0cca75e3a233c53cdd
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: add ITMON notifier.
Jeonghee Kim [Wed, 9 May 2018 11:15:54 +0000 (20:15 +0900)]
[COMMON] media: mfc: add ITMON notifier.

Change-Id: I8fa23e382d902d6aace27194c0a57ff8fc6b36cc
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: NAL-Q: modified buffer full handling
Jeonghee Kim [Tue, 8 May 2018 03:46:47 +0000 (12:46 +0900)]
media: mfc: NAL-Q: modified buffer full handling

When the buffer full error occurs,
one input buffer is returned and the NAL-Q mode continues.

Change-Id: I2d93de8d9c1f2aaca0b6559d690f1eb5f10ce042
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: support the s5p_mfc_poll() ioctl
Sunyoung Kang [Fri, 27 Apr 2018 06:01:18 +0000 (15:01 +0900)]
media: mfc: support the s5p_mfc_poll() ioctl

To use poll() ioctl, wait POLLOUT event for source
and POLLIN event for destination.

Change-Id: I35f8f31dd47408ee2d8b720a020fc4a66754986a
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years agomedia: mfc: DRV4.0: remove unnecessary status
Ayoung Sim [Thu, 19 Apr 2018 01:11:17 +0000 (10:11 +0900)]
media: mfc: DRV4.0: remove unnecessary status

Change-Id: I6230ad09e3a6fb82b5fb6224d976a1ae541b0177
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: DRV4.0: fix buffer handling after encoding
Ayoung Sim [Wed, 18 Apr 2018 10:29:57 +0000 (19:29 +0900)]
media: mfc: DRV4.0: fix buffer handling after encoding

Buffers are dequeued such as below.
- Src buffer: whenever there is a encoded addr
- Dst buffer: whenever there are stream size

Change-Id: Ie5e63facdbcadd82acea39c348320fbd2b0a9362
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: DRV4.0: seperate mfc_nal_q_handle_stream_output
Ayoung Sim [Tue, 17 Apr 2018 06:51:55 +0000 (15:51 +0900)]
media: mfc: DRV4.0: seperate mfc_nal_q_handle_stream_output

Change-Id: I0e05108f6600367a91fbee2fb77814d5dec7c444
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: DRV4.0: remove previous enc DRC method
Ayoung Sim [Tue, 17 Apr 2018 06:33:25 +0000 (15:33 +0900)]
media: mfc: DRV4.0: remove previous enc DRC method

Change-Id: I4a5b896a7d643f070af43d0c6803543b62a92ba1
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: DRV4.0: support encoder DRC
Ayoung Sim [Tue, 17 Apr 2018 06:29:01 +0000 (15:29 +0900)]
media: mfc: DRV4.0: support encoder DRC

We support the DRC(Dynamic Resolution Change) using LASE_SEQ command.
So we can start from SEQ_START without CLOSE/OPEN.

Change-Id: I92a8e0e5beb889837164b3fb8917c74ec5b31ee9
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: DRV4.0: use the crop information for QoS
Ayoung Sim [Tue, 17 Apr 2018 10:22:54 +0000 (19:22 +0900)]
media: mfc: DRV4.0: use the crop information for QoS

When driver calculates the size for QoS control,
there is a difference between decoder and encoder.
- encoder: cropped width, cropped height
- decoder: full image width, full image height

So in case of decoder, crop_width and img_width have same value.

Change-Id: I92acf2448b8541999889fbfb4bd1cacf261272d4
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: DRV4.0: supports the encoder crop option
Ayoung Sim [Tue, 17 Apr 2018 10:21:22 +0000 (19:21 +0900)]
media: mfc: DRV4.0: supports the encoder crop option

Change-Id: I180f95791d35418053775713aa1456e648c5bf0a
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: NAL-Q: add clock control
Jeonghee Kim [Thu, 3 May 2018 09:13:52 +0000 (18:13 +0900)]
media: mfc: NAL-Q: add clock control

Change-Id: Ia9498ddfeb5a3e02ff328859956db62935d3029d
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: support encoder static info
Jeonghee Kim [Wed, 25 Apr 2018 04:02:44 +0000 (13:02 +0900)]
media: mfc: support encoder static info

Change-Id: I0d7d157751d0b51fc95d6a9000398381fbd8d75c
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: use SYSTEM HEAP region for MFC normal F/W
Jeonghee Kim [Mon, 23 Apr 2018 05:51:36 +0000 (14:51 +0900)]
media: mfc: use SYSTEM HEAP region for MFC normal F/W

Change-Id: I9fba9b38ee47f238c25d702b51a3a0ee110f228e
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: get MFC H/W version from DT
Jeonghee Kim [Mon, 23 Apr 2018 05:08:20 +0000 (14:08 +0900)]
media: mfc: get MFC H/W version from DT

Change-Id: I7a54a29b7fa11588a9bce93757120662ea1c7378
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: remove MFC version in Kconfig
Jeonghee Kim [Mon, 23 Apr 2018 04:16:59 +0000 (13:16 +0900)]
media: mfc: remove MFC version in Kconfig

Change-Id: Ibffe4cdb87bc777e42958b22b889b356ca21d627
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: add MMCache handling for MFC only
Jeonghee Kim [Tue, 17 Apr 2018 07:54:49 +0000 (16:54 +0900)]
media: mfc: add MMCache handling for MFC only

Change-Id: I4c5368ad277013df30110774a4a445f25de89071
Signed-off-by: Jiho Chang <jiho04.chang@samsung.com>
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: supports B frame encoding of NAL_Q
Ayoung Sim [Wed, 11 Apr 2018 04:51:11 +0000 (13:51 +0900)]
media: mfc: supports B frame encoding of NAL_Q

Change-Id: Ib53621c9bae74b3d58281312c5dd69de9c9426a4
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: DRV3.2: parse the additional info in DT
Ayoung Sim [Fri, 30 Mar 2018 07:56:03 +0000 (16:56 +0900)]
media: mfc: DRV3.2: parse the additional info in DT

Informations that changes per every chip should be used
from device tree

Change-Id: Ib2d776372e954f7e3fe726505ec47501a9a69f80
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: DRV3.2: separate dump_info and stop_hw
Ayoung Sim [Mon, 2 Apr 2018 04:52:43 +0000 (13:52 +0900)]
media: mfc: DRV3.2: separate dump_info and stop_hw

When the sysmmu page fault is occured,
panic will be occured by iommu driver.
So, we don't need to occur panic when page fault is occured.

Change-Id: I2f6842333cbd46992f5b868b319532c774220b6d
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: DRV3.2: expand debugging mode
Ayoung Sim [Mon, 2 Apr 2018 04:49:38 +0000 (13:49 +0900)]
media: mfc: DRV3.2: expand debugging mode

Change-Id: I817e12b450ea0229b6cc9985c774012ac4974767
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: DRV3.2: support debugging mode
Ayoung Sim [Fri, 16 Mar 2018 10:36:03 +0000 (19:36 +0900)]
media: mfc: DRV3.2: support debugging mode

This patch supports the debugging mode,
we will enable it during the verification period.
First of all, it applies to the timeout of interrupt.

Change-Id: I3b1b402a3afadd1fe01d05f9f01c25eb46f43238
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: DRV3.2: support the SFR dump mode
Ayoung Sim [Wed, 14 Mar 2018 01:52:30 +0000 (10:52 +0900)]
media: mfc: DRV3.2: support the SFR dump mode

Whenever we want to check the SFRs,
we can control by as below sysfs command.
ex) echo 8 > /d/mfc/sfr_dump

Change-Id: I152cb042c1c2ef2217e840c9e38575ed6c0709a8
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: DRV3.2: support dump call-back function
Ayoung Sim [Wed, 14 Mar 2018 00:52:20 +0000 (09:52 +0900)]
media: mfc: DRV3.2: support dump call-back function

struct s5p_mfc_dump_ops supports the information dump function by call-back.
This is for maintain the layer of the driver.
Function of any layer can call the dump function using "call_dop()" macro,
because it exists in the lowest layer.

Change-Id: Ic452aa316d10ddb6194444fe7aa3f707080d49ae
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: OTF: Initialize after F/W allocation
Jeonghee Kim [Thu, 29 Mar 2018 09:43:31 +0000 (18:43 +0900)]
media: mfc: OTF: Initialize after F/W allocation

Change-Id: Idd526d9a85aab06cb46a8ad0fece1a0a486e6f43
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: set 2bit DPB size before NAL START & NAL QUEUE.
Jeonghee Kim [Thu, 5 Apr 2018 06:14:20 +0000 (15:14 +0900)]
media: mfc: set 2bit DPB size before NAL START & NAL QUEUE.

Change-Id: Ie0e9c2e79803f2c1e3065373e219b3e48e8dc94a
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: fix build error(clang)
Jeonghee Kim [Fri, 23 Mar 2018 09:10:06 +0000 (18:10 +0900)]
media: mfc: fix build error(clang)

Change-Id: Ib036206d2f0374d80065e8f8552f9749868839fd
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: fix prevent issue
Jeonghee Kim [Fri, 23 Mar 2018 10:01:07 +0000 (19:01 +0900)]
media: mfc: fix prevent issue

CID: 205513, 205513, 205435, 205436

Change-Id: I6e9434f60fae904d3dab0996dc75965f5616c650
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: support hierarchical bitrate control
Ayoung Sim [Fri, 23 Feb 2018 02:00:33 +0000 (11:00 +0900)]
media: mfc: support hierarchical bitrate control

HIERARCHICAL_BIT_RATE_CONTROL[8] set to 1,
FW alloate the bit rate for each temporal layer base on E_RC_BITRATE.

Change-Id: I9ffc34eed1fc78da6d66b67e8c637f85f98de881
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: change the format to right setting
Ayoung Sim [Tue, 20 Mar 2018 07:16:29 +0000 (16:16 +0900)]
media: mfc: change the format to right setting

When user set the 10bit or 422 format even if stream is 420 8bit,
driver changes the format to YUV420 8bit format.

Change-Id: Ifeb3fe541776dad89f6fbb51286bff33d5c6d555
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: change VIDEO_SIGNAL_TYPE setting
Jeonghee Kim [Sat, 17 Mar 2018 10:15:17 +0000 (19:15 +0900)]
media: mfc: change VIDEO_SIGNAL_TYPE setting

Set VIDEO_SIGNAL_TYPE_FLAG
only when the control of the color range is called.
Set COLOUR_DESCRIPTION_PRESENT_FLAG
only when the color information is not the reserved value.

Change-Id: I9bd980b3cffabd9cb8ef3a1198a1e69b15245621
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: add QoS request for MFC
Jeonghee Kim [Thu, 15 Mar 2018 08:51:20 +0000 (17:51 +0900)]
media: mfc: add QoS request for MFC

Change-Id: I144e96c6197c4eb5b1d48d85d64a17d0cc65cc67
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: change USE_LTR setting
Jeonghee Kim [Fri, 9 Mar 2018 04:34:40 +0000 (13:34 +0900)]
media: mfc: change USE_LTR setting

The control value of USE_LTR consists of a bitmap.
If setting value is 0x3, it means that index 0 or 1 frame are referenced.
To support this, the range of the control value was extended.

Change-Id: I00481d313f97e94a9d141487811970d2d8d78c2f
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: Fix the reference count pair.
Jeonghee Kim [Thu, 8 Mar 2018 09:31:09 +0000 (18:31 +0900)]
media: mfc: Fix the reference count pair.

When decoding and display status,
the release information of the referenced buffers without display should not be updated.
It will be reused.

When decoding only status,
the release information of the referenced buffers(except for reused buffer)
should be left to update when displayed.
It is an already displayed buffer.

Change-Id: I37df2bfd9d6cd3defde26edf1f2ac46ebb42ae8e
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: supports MFCv13.0
Ayoung Sim [Mon, 26 Feb 2018 10:13:50 +0000 (19:13 +0900)]
media: mfc: supports MFCv13.0

Change-Id: I046ad302f14e292610fc7e77c1da485387c867ac
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: support HEVC 422 10, VP9 version3 profile
Ayoung Sim [Fri, 9 Feb 2018 07:23:05 +0000 (16:23 +0900)]
media: mfc: support HEVC 422 10, VP9 version3 profile

Change-Id: I773b7638faf86cf67477c191e2900da3b70becf3
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: cleanup batch buffers after stop streaming
Ayoung Sim [Mon, 11 Dec 2017 06:38:12 +0000 (15:38 +0900)]
media: mfc: cleanup batch buffers after stop streaming

Change-Id: I6c9d153423f76f492ad415417751bed41822ce2b
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: change the map/unmap location
Ayoung Sim [Tue, 5 Dec 2017 00:26:47 +0000 (09:26 +0900)]
media: mfc: change the map/unmap location

before: buf_init / buf_cleanup
after: buf_prepare / buf_finish(IRQ)

Change-Id: Ia3577b6e69b768b224fa0f84d90b44da1e330d74
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: consider the single buffer when batch mode
Ayoung Sim [Wed, 29 Nov 2017 05:44:04 +0000 (14:44 +0900)]
media: mfc: consider the single buffer when batch mode

Change-Id: I45b7eb36df98a7730acbb615f069e48c460fd500
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: changed the framerate calculation method
Jeonghee Kim [Fri, 27 Oct 2017 09:24:41 +0000 (18:24 +0900)]
media: mfc: changed the framerate calculation method

Change-Id: If8c0d412671e9e0a52d19fc43a43aaf2b755319b
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: add missed put_dmabuf
Sunyoung Kang [Thu, 9 Nov 2017 08:20:24 +0000 (17:20 +0900)]
media: mfc: add missed put_dmabuf

When using dmabuf container, put_dmabuf() was missed and it is
memory leak. So this adds put_dmabuf().

Change-Id: Ib0cf13f99409cebff5d5ca9af6a3c424776061ba
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years agomedia: mfc: add performance measuring
Jiho Chang [Sat, 7 Oct 2017 06:19:16 +0000 (06:19 +0000)]
media: mfc: add performance measuring

Change-Id: I347ddd5d3d2441ea2fc2eda7c838c1b42b72d9e4
Signed-off-by: Jiho Chang <jiho04.chang@samsung.com>
6 years agomedia: mfc: change the unmap location
Ayoung Sim [Wed, 11 Oct 2017 00:04:18 +0000 (09:04 +0900)]
media: mfc: change the unmap location

Dma buffers in buffer container is mapped in buf_init,
so it should be unmapped in buf_cleanup.

Change-Id: Id1d354e8d51a6652306ef6a98d92492a3ebaf980
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: create timestamp for buffer batch mode
Ayoung Sim [Wed, 2 Aug 2017 00:31:53 +0000 (09:31 +0900)]
media: mfc: create timestamp for buffer batch mode

Change-Id: I92027dbd134d70de5b6d1a2ceec7b802849bed24
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: Support buffer batch mode
Ayoung Sim [Tue, 25 Jul 2017 08:11:29 +0000 (17:11 +0900)]
media: mfc: Support buffer batch mode

Eight images in buffer container is handled

Change-Id: I12999f1a5800da019810de3618ce46d14fa41492
Signed-off-by: Jiho Chang <jiho04.chang@samsung.com>
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years agomedia: mfc: add debugging code
Jeonghee Kim [Fri, 2 Feb 2018 07:31:36 +0000 (16:31 +0900)]
media: mfc: add debugging code

- the number of ref/nal-q buffer is added in dump
- nal-q lock is moved to nal_q_handle
- nal-q info is added in dump
- consumed info is added in trace

Change-Id: I4fdfbb1da3cff919d737853670a3c5acc05197c6
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: NAL-Q: change work_bits handling.
Jeonghee Kim [Tue, 9 Jan 2018 06:19:35 +0000 (15:19 +0900)]
media: mfc: NAL-Q: change work_bits handling.

Change-Id: I230fde8ab018e3968ef5f8e5e693cff129bb41ba
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: initialize reserved2 after EOS
Jeonghee Kim [Fri, 2 Feb 2018 07:17:11 +0000 (16:17 +0900)]
media: mfc: initialize reserved2 after EOS

Change-Id: I39f9df83fbb23748222d6c94b42c74ef64cfb7f7
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: support encoder color aspect
Jeonghee Kim [Tue, 19 Dec 2017 10:28:18 +0000 (19:28 +0900)]
media: mfc: support encoder color aspect

Change-Id: I0225094b7a606297d3ff69c846f53f76c34a08ff
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: changed max value about temporal svc layer.
Jeonghee Kim [Fri, 22 Dec 2017 05:16:33 +0000 (14:16 +0900)]
media: mfc: changed max value about temporal svc layer.

Change-Id: I27f035aaa84352b8ede7d6ff4fb6945f0f80d76d
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: remove 0xD000~0xD074 SFR dump
Sunyoung Kang [Wed, 24 Jan 2018 23:58:58 +0000 (08:58 +0900)]
media: mfc: remove 0xD000~0xD074 SFR dump

The 0xD000~0xD074 SFR is shadow register using for encoder performance.
When dumping this region ITMON error is generated.
This SFR is unnecessary for debugging so this patch removes it.

Change-Id: Ica259c8c6fc2d1b8a51c2551a80e2b6a52db63cd
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years agomedia: mfc: clear ROI_ENABLE when SEQ_DONE
Sunyoung Kang [Wed, 24 Jan 2018 05:57:13 +0000 (14:57 +0900)]
media: mfc: clear ROI_ENABLE when SEQ_DONE

When HEVC encoding, the ROI is enabled at SEQ_START.
This adds to clear the ROI_ENABLE bit at SEQ_DONE.

Change-Id: If2ce5b25913915edbb8a7860232bdd71eeb028ba
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years agomedia: mfc: fix use of ION API for 4.14 kernel
Cho KyongHo [Mon, 12 Feb 2018 06:07:45 +0000 (15:07 +0900)]
media: mfc: fix use of ION API for 4.14 kernel

ION is dramatically changed in 4.14 kernel including kernel API and
the header files. But the symantics of ION API is not changed.

Change-Id: I75d56fa81c62d37b41aa7c973c42a4aa3a5895ff
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: support kernel 4.14
Jeonghee Kim [Fri, 26 Jan 2018 05:28:34 +0000 (14:28 +0900)]
media: mfc: support kernel 4.14

- add VIDEOBUF2_DMA_SG dependency
- remove videobuf2_ion
- remove unnecessary cache control
- change vb2_memops
- remove vb2_ion_buf_prepare/finish
- use __dma_map_area for clean/invalidate
- use vb2_dma_sg_plane_dma_addr to get daddr

Change-Id: I46e70140df56435060469ebbfab45e9a2226d1a1
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agoinclude: video: add videonode.h
Jeonghee Kim [Fri, 26 Jan 2018 06:31:32 +0000 (15:31 +0900)]
include: video: add videonode.h

Change-Id: I51deba2920cb44ba9a45f7aa4874351720df1e2d
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: use the address in struct s5p_mfc_buf
Jeonghee Kim [Fri, 19 Jan 2018 07:44:18 +0000 (16:44 +0900)]
media: mfc: use the address in struct s5p_mfc_buf

We will use the variable(struct s5p_mfc_buf -> addr[])all the time,
after we got the address from videobuf2 once.

Change-Id: I00057a270bc0ede781ba203af56f453169368f0a
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: add ifdef for smc call interface
Jeonghee Kim [Fri, 26 Jan 2018 05:23:19 +0000 (14:23 +0900)]
media: mfc: add ifdef for smc call interface

Change-Id: I005938342a29fc9f16a801ea590fafd31b7d073f
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: add ifdef for BTS interface.
Jeonghee Kim [Fri, 19 Jan 2018 02:02:27 +0000 (11:02 +0900)]
media: mfc: add ifdef for BTS interface.

Change-Id: I9e62082d35476446d4ff7722be220cb3c485085e
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: include linux header
Jeonghee Kim [Fri, 19 Jan 2018 01:57:09 +0000 (10:57 +0900)]
media: mfc: include linux header

Change-Id: I4c9420ad132f4c2ac8742c95854cadc75299cebf
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: modify build option for MFC
Jeonghee Kim [Mon, 15 Jan 2018 07:47:52 +0000 (16:47 +0900)]
media: mfc: modify build option for MFC

Change-Id: Ie065429e5c559cf66cf97b6db7a520a82cf1190e
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agomedia: mfc: add the MFC driver of kernel 4.9
Jeonghee Kim [Mon, 15 Jan 2018 07:46:47 +0000 (16:46 +0900)]
media: mfc: add the MFC driver of kernel 4.9

Change-Id: Iaeee190bb1a9ddced67691e6d696d358cfdfee62
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agoandroid: ion: add support for HPA exception area
Cho KyongHo [Thu, 3 May 2018 08:14:01 +0000 (17:14 +0900)]
android: ion: add support for HPA exception area

ION HPA Heap allocates pages for Secure DRM from HPA. But some memory
areas are not allowed to protect for Secure DRM.
The areas are declared in the property 'ion,hpa_alloc_exception' under
a device tree node 'ion-hpa-heap'. It should be found by ION during
heap initialization and passed to HPA when allocating Secure DRM
buffers.

Change-Id: I47585bad0a5b11dec140994714788f7aa918ccc1
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
6 years agodma-buf: add buffer mask to dma-buf container
Cho KyongHo [Wed, 18 Apr 2018 13:24:20 +0000 (22:24 +0900)]
dma-buf: add buffer mask to dma-buf container

Mask of dma-buf container is a bit-mask of buffers in the dma-buf
container. The bit order in the mask is the position of buffers in
the dma-buf container. LSB of the mask is the bit-mask of the buffer
0 in the dma-buf container.
The mask of a dma-buf container is zero on creation. This means that
all buffers in the dma-buf container are unmasked initially. Users
of dma-buf container can modify the mask of buffers later with the
following API functions/ioctl of dma-buf.
- dmabuf_container_set_mask()
- dmabuf_container_get_mask()
- DMA_BUF_IOCTL_CONTAINER_SET_MASK
- DMA_BUF_IOCTL_CONTAINER_GET_MASK

The mask of dma-buf container is not used by dma-buf container itself.
How to use the mask is entirely rely on the users. Users can configure
the activation information of buffers of a dma-buf container. Others
may use the mask to indicate buffers with special information.

Change-Id: I2cc7d68812c060ed4fabb50da89271d52ad01ddc
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
6 years agodma-buf: add test driver for dma-buf container
Cho KyongHo [Fri, 13 Apr 2018 11:39:04 +0000 (20:39 +0900)]
dma-buf: add test driver for dma-buf container

Change-Id: Ic7a9015dd828ca66560555a44955d625a301e715
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
6 years agodma-buf: include dma-buf container to kernel build
Cho KyongHo [Fri, 13 Apr 2018 05:09:01 +0000 (14:09 +0900)]
dma-buf: include dma-buf container to kernel build

This commit follows commut bdaed72c4 ("dma-buf: introduce dma-buf
container"). dma-buf container has been excluded from the kernel build
until the dmabuf container support by ION is removed by commit
e4af6c288 ("android: ion: remove linux/dmabuf_container.h") not to
cause kernel build break.

Change-Id: Id0d3e7f82ace28622efbbbd4e5fa263076059109
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>