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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Cho KyongHo [Fri, 13 Apr 2018 04:52:11 +0000 (13:52 +0900)]
dma-buf: introduce dma-buf container
dma-buf container is a dma-buf that can contain multiple other dma-buf
objects. It is developed to deliver many dma-buf objects with a single
inter-process or user-kernel commnunication.
Change-Id: I2a13e0c0644f350fb4805120ee5900f101cd2c18
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Thu, 3 May 2018 08:09:42 +0000 (17:09 +0900)]
mm/hpa: add alloc_pages_highorder_except()
alloc_pages_highorder() allocates given number of pages of given order.
It is a page allocator with a restriction of page order. Therefore, it
is used by the drivers of H/Ws with a requirement of higher memory
alignment than PAGE_SIZE.
Moreover some H/W have additional restriction of memory addressing.
They are not accessible to some range of memory.
alloc_pages_highorder_except() provides a way to avoid unaccessible
memory area to HPA not to allocate inappropriate pages to the drivers.
Change-Id: I6c5fe40c7dd5367ea15eb69c7bf68325070dafa4
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
ChiHun Won [Tue, 29 May 2018 02:01:31 +0000 (11:01 +0900)]
[9610] fbdev: dpu20: updated panel backlight driver
Change-Id: I4d48dd221a538f6f51a931fa810945b0e738b924
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Mon, 28 May 2018 12:17:49 +0000 (21:17 +0900)]
Revert "[9610] fbdev: dpu20: fixed decon reg update timeout"
reviewed
This reverts commit
dcd6df9d93ce7f50c9171473541d5e71aa62366e.
Change-Id: Ic61af2126e43f4607a902614f92e81bff9c3adcb
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Mon, 28 May 2018 12:08:04 +0000 (21:08 +0900)]
[9610] fbdev: dpu20: updated dpp dma debug sfr
Change-Id: If68791ca39c60ab0ab2ea68aba8d19c609143209
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Sat, 26 May 2018 01:22:32 +0000 (10:22 +0900)]
[9610] arm64: config: enabled paritial window update
Change-Id: I0ba4f99e3a2a5f610c5cb36b1c70fec81dffa683
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Sat, 26 May 2018 01:09:00 +0000 (10:09 +0900)]
[9610] arm64: config: enabled hibernation mode
Change-Id: I80cea43618f6506dcf5e2c6af5efae8a3af528b3
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Sat, 26 May 2018 01:08:37 +0000 (10:08 +0900)]
[9610] arm64: dts: updated dpu device tree
Change-Id: I8366770fa3fd37473b377ea1968c7a106825bf66
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Sat, 26 May 2018 00:35:15 +0000 (09:35 +0900)]
fbdev: dpu20: power domain status check
reviewed
Change-Id: Ic95e7c4a9b3b511a0feaa54cf2afaccc323af3e1
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Fri, 25 May 2018 22:34:36 +0000 (07:34 +0900)]
fbdev: dpu20: added acquire fence logging
reviewed
Change-Id: Ib8f0e6dd3001afc84bc1ac36ab1e1f41826f6b0c
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Fri, 25 May 2018 08:04:42 +0000 (17:04 +0900)]
fbdev: dpu20: fixed decon init display DMA2CH mapping error
reviewed
Change-Id: I963d349427a2a0b8366cccd9ff6d176f91efb56c
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Fri, 25 May 2018 07:59:31 +0000 (16:59 +0900)]
fbdev: dpu20: added missing shadow update code
reviwed
Change-Id: Idb3241089d1628300a149d2eabe73db2e491c3b8
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Fri, 25 May 2018 07:44:35 +0000 (16:44 +0900)]
[9610] fbdev: dpu20: changed decon window shadow update
Change-Id: I1330abe6e8b42e3d9bb8e8c380d7ac438180d6e3
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Fri, 25 May 2018 07:40:33 +0000 (16:40 +0900)]
fbdev: dpu20: fixed decon pan display DMA2CH mapping error
Change-Id: I6c176d68c6104f1ac9cfa237223088e2d519698d
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Fri, 25 May 2018 07:37:25 +0000 (16:37 +0900)]
fbdev: dpu20: removed unnecessary sysreg read
Change-Id: I6284be05332f02fc092e4a1854360062cc7a8a6a
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Sat, 19 May 2018 02:31:59 +0000 (11:31 +0900)]
[9610] fbdev: dpu20: cal9610: changed dsim dphy reset
Change-Id: Ib1059982c8ca70a6ff574fd79497b6cca77e2f99
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
ChiHun Won [Fri, 25 May 2018 02:21:45 +0000 (11:21 +0900)]
Revert "[9610] fbdev: dpu: dphy reset method is changed by sysreg control"
This reverts commit
8abbf947e6187cf8338b45fd9ad014b00d7f3ebd.
Change-Id: Idde3cf7176a1c14ca22d4689dc10b4efad07e71f
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
hwangjae lee [Fri, 25 May 2018 05:26:45 +0000 (14:26 +0900)]
fbdev: dpu20: blocking mode set condition is modified
In the past, it was possible to set a blocking area in a bottom window
if the top window plane alpha value was 0. In this case, the top window
becomes transparent, and the blocking area of the window looks black.
So it is modified that when the top window plane alpha value was zero,
blocking area isn't set in the bottom window.
Change-Id: I2340369331082c939f4d7013c002452affd836bc
Signed-off-by: hwangjae lee <hj-yo.lee@samsung.com>
Signed-off-by: ChiHun Won <chihun.won@samsung.com>
Seungchul Kim [Mon, 28 May 2018 04:59:41 +0000 (13:59 +0900)]
[9610] arm64: defconfig: enable smfc
Change-Id: Iae0b15e4bd84f6cec44a9e680488ffab695a2019
Signed-off-by: Seungchul Kim <sc377.kim@samsung.com>
Seungchul Kim [Mon, 28 May 2018 04:58:43 +0000 (13:58 +0900)]
[9610] arm64: dtsi: add smfc node
Change-Id: Iecc579cc0fc712b88b3ee48887bc8c3aafa427bb
Signed-off-by: Seungchul Kim <sc377.kim@samsung.com>
Seungchul Kim [Fri, 23 Mar 2018 08:00:40 +0000 (17:00 +0900)]
[COMMON] media: smfc: fix security problem
The security problem has been reported in smfc driver.
If user sends a special ioctl command,
smfc driver can cause a kernel panic.
So it is modified to avoid kernel panic.
Change-Id: I7b5c4e295e8190cf0fb50d3c4b951a74470101ad
Signed-off-by: Seungchul Kim <sc377.kim@samsung.com>
Cho KyongHo [Wed, 21 Feb 2018 01:58:50 +0000 (10:58 +0900)]
media: smfc: set dma mask of 36-bit
SMFC driver needs to configure dma mask of 36-bit not to force
allocation of swiotlb buffers during dma-mapping.
Change-Id: I2cb2637462703d4c113f855b95bef4cafffd79ff
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Seungchul Kim [Fri, 24 Nov 2017 06:02:51 +0000 (15:02 +0900)]
[COMMON] media: smfc: fix prevent issue
This patch fixed below prevent issue about other violation types.
CID 201997, 201944, 200890, 200853
Change-Id: Icf94074d36c7d4526e13e25c9dc188875dabec77
Signed-off-by: Seungchul Kim <sc377.kim@samsung.com>
Cho KyongHo [Tue, 27 Dec 2016 11:29:11 +0000 (20:29 +0900)]
[COMMON] media: smfc: compare the conditions clearly
The recent versions of the compilers(e.g. GCC 5.3) warn that a unary
operator may be used without a care. Therefore, we should wrap the
operator and its operands with parenthesis to show clear precedence.
Change-Id: Ibc7e758dd67e62182a120bc705a561586a521c70
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Tue, 3 Jan 2017 16:21:35 +0000 (01:21 +0900)]
[COMMON] media: smfc: force non-shareable read
SMFC/JPEG is connected with MCSC by HWFC. Therefore write DMA of MCSC
and the read DMA of SMFC should be in the same shareability domain.
However MCSC is always in non-shareable domain by Exynos8895 and SMFC
is in inner-shareable domain in Exynos8895. Due to HWFC, SMFC should
not wait until MCSC driver to invalidate cache lines when MCSC
finishes DMA write because SMFC starts reading as soon as MCSC starts
writing.
Therefore, the read DMA of SMFC should be non-shareable and cache
maintenance operations do not effect if HWFC is enabled.
Change-Id: I8e5d7878b0b2f6e35a33903b0683b45a6dcd7514
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Thu, 5 Jan 2017 13:40:30 +0000 (22:40 +0900)]
[COMMON] media: smfc: fix missing vertical subasampling check
HWJPEG is unable to handle YUV410. Therefore, the driver should check
if both of the horizontal and vertical chroma subsampling factor is 4.
However, the driver checked horizontal factor instead of vertical
factor.
SVACE WGID 2521
Change-Id: I187ff5e4d0c3ff9cf1efdd97b86b7e09c4754af0
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Won Jung [Mon, 24 Oct 2016 05:18:15 +0000 (14:18 +0900)]
[COMMON] media: smfc: deactivate sysmmu for scaler
sysmmu is deactivated to prevent sfr access by sysMMU,
after smfc power domain is turned off.
Change-Id: I19e6dc9504a78cb88d705c6ba07f3889e4570516
Signed-off-by: Won Jung <w00.jung@samsung.com>
Won Jung [Thu, 22 Sep 2016 07:48:03 +0000 (16:48 +0900)]
[COMMON] media: smfc: add the shutdown callback
if shutdown, smfc driver should wait to finish the H/W
operation to avoid the access the power domain/ clk
after the detach of pm_domain
Change-Id: I7328be4c4c4ef15ba578c5c44e3ba5396592fcce
Signed-off-by: Won Jung <w00.jung@samsung.com>
Won Jung [Wed, 1 Jun 2016 06:48:09 +0000 (15:48 +0900)]
[8895] media: smfc: add sync mode for hwfc
add sync mode for hwfc. This mode is to inform camera
that hwjpeg compression is done in HWFC mode.
Change-Id: I7cdf276069b3ffb83a342aeb50f338bdf9d7c5ae
Signed-off-by: Won Jung <w00.jung@samsung.com>
Won Jung [Wed, 25 Nov 2015 08:04:05 +0000 (17:04 +0900)]
[8895] media: smfc: add cropping window
cropping window feature is added for encoding
and inefficient codes are removed
Change-Id: I975b57199124ed5c32b6030e2b4d9314fba9653f
Signed-off-by: Won Jung <w00.jung@samsung.com>
Cho KyongHo [Mon, 5 Oct 2015 16:08:22 +0000 (01:08 +0900)]
[COMMON] media: smfc: add support for custom quantization tables
Some users needs to configure their own quantization tables instead of
the quality factors that is the factor to calculate the quantization
tables based on the ones suggested by ITU-81 Appendix K.1 and K.2.
Now the driver supports for the new custom control variable,
V4L2_CID_JPEG_QTABLES2 that is an array of V4L2_CTRL_TYPE_U8 with
128 values (two arrays with 64 elements). One of the table is for
the quantization table of the Luma and the other table is for the
chroma components. The values in the quantization tables should be
specified in the zig-zag scan order.
Note that once the custom quantization tables are configured, it is
used for the compressions until a new quality factor or a new
quantization is configured.
Also note that the custom quantization tables are configured to H/W
even though the table stored in the v4l2_ctrl is in transient state.
Therefore, configuring new custom quantization tables with s_ctrl or
s_ext_ctrl during the H/W is working for the current context may cause
an unpredictable result which means the quantization tables that is
used by the H/W may be incorrect and it impacts the compression
quality of the compressed stream.
Change-Id: Ifa8e346e188b118c480e576676de8c6a46e1468d
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Tue, 29 Sep 2015 11:42:47 +0000 (20:42 +0900)]
[COMMON] media: smfc: fix bugs reported by Coverity
This patch includes the fixes for CID 187514, CID187540 and 187531.
Change-Id: I225fa93071e0e57f1e58825961d74cd6b315578e
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Sat, 19 Sep 2015 11:14:35 +0000 (20:14 +0900)]
[COMMON] media: smfc: fix resource leak in exynos_smfc_release()
SMFC driver overrides V4L2 control handlers when a new context is
created but it forgot to release the overridden handlers when the
context is released.
Change-Id: Id241dd029618d3eca7c37da28f8075e5e6a49360
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Fri, 11 Sep 2015 02:00:57 +0000 (11:00 +0900)]
[COMMON] media: smfc: add support for HWJPEG compatible with Exynos7870
The HWJPEG of Exynos7870 is equivalent to the HWJPEG of Exynos8890 but
HWFC. Therefore, it is required to distinguish them.
Change-Id: Ic4b82c2c0d1c4521d3adbf245ba71c2a67d45fd4
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Tue, 15 Sep 2015 01:40:19 +0000 (10:40 +0900)]
[COMMON] media: smfc: remove REG_MAIN_MAX_STREAM_SIZE register
It now no longer exists and was for lossless JPEG compression that
was an experimental feature of SMFC. But lossless JPEG compression
is not supported by SMFC in public.
Change-Id: I7c0c2e32b9ea5a37e510d99c9df7af70b3df624e
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Mon, 14 Sep 2015 15:53:57 +0000 (00:53 +0900)]
[COMMON] media: smfc: invalid the cache lines as little as possible
The amount of data to invalidate CPU cache lines of the destination
buffer of the JPEG compression is much smaller than the length of
the destination buffer because the userspace tends to qbuf the buffer
that is large enough to store the uncompressed image.
Therefore, the data amount of invaidation on the destination buffer
needs to be less than the buffer size for less delay in cache
invalidation and vb2_ion_buf_finish_exact() is for that purpose.
Change-Id: Ifc069a3e940f4e470a2947dc249704340cbe5abb
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Tue, 18 Aug 2015 16:07:22 +0000 (01:07 +0900)]
[COMMON] media: smfc: fix section mismatch
This fixes the following section mismatch problem:
WARNING: drivers/media/platform/exynos/built-in.o(.text+0x2c96c):
Section mismatch in reference from the function
exynos_smfc_probe() to the variable .init.rodata:exynos_smfc_match
The function exynos_smfc_probe() references the variable
__initconst exynos_smfc_match. This is often because
exynos_smfc_probe lacks a __initconst annotation or the annotation
of exynos_smfc_match is wrong.
Change-Id: Id3498e6d5ff70ce8bc96bb22250776a46092b382
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Mon, 10 Aug 2015 07:50:46 +0000 (16:50 +0900)]
[COMMON] media: smfc: change default JPEG version to exynos3475
FIMP JPEG H/W of Exynos3475 has the minimum functionality. Therefore
it is selected as the default H/W version if the dts does not specify
exact SoC name.
Change-Id: I43060be2ed860ef7dd0f2985b51d3528ffadcf9a
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Wed, 29 Jul 2015 12:13:17 +0000 (21:13 +0900)]
[COMMON] exynos: smfc: add support for the same H/W of different versions
SMFC that is also known as FIMP-JPEG has various H/W versions with
different capabilities. The HWJPEG of Exynos7420 is capable of
downscaling and cropping during decompression while that of Exynos8890
is not. HWJPEG of Exynos3450 does not have the decompression fuction.
Exynos8890, on the other hand, has the advanced functions such as the
hardware flow control(HWFC) and back-to-back compression.
The various version information is distinguished by different
compatible string and the detailed information about each version is
stored in the data field of of_device_id. The driver then uses the
version information in .probe().
Change-Id: Idd847a48167cdef872f7c770dd29d1d441a77eef
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Fri, 8 May 2015 02:28:33 +0000 (11:28 +0900)]
[COMMON] media: smfc: add support for JPEG decompression
HWJPEG is capable of decompression of baseline, sequaltial DCT, Huffman
coded JPEG streams to an arbitrary image format that is supported by
HWJPEG. HWJPEG requires the address of SOS marker to start
decompression. Thus the driver should configure quantization tables,
Huffman tables and chroma subsampling factors to HWJPEG separately with
the JPEG stream address (address of SOS marker).
It is convenient to parse a JPEG header in userspace. But the driver
require the address of SOI marker to parse JPEG headers in the driver
because the driver does not convice the userspace to provide correct
information for decompression. Moreover, V4L2 does not consider about
JPEG decompression. It does not provide interface for passing Huffman
tables and quantization tables to the driver from userspace.
JPEG stream can be simply decompressed by passing the address of SOI.
If the given JPEG stream has error or is not supported, the userspace
will get an error from the driver.
Change-Id: I92ea5a1dc91e29bc4588fba8545bf8def0da0cb8
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Fri, 8 May 2015 02:07:40 +0000 (11:07 +0900)]
[COMMON] media: smfc: change a function name to smfc_v4l2_prepare_s_fmt
smfc_v4l2_check_s_fmt() actually configures type for the current
vb2_queue and JPEG operation mode. 'check' in the function name
does not imply the function changes something.
Change-Id: I778a7d83f217224160a6fd4c34c20ffdfc15fb12
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Thu, 23 Jul 2015 08:07:25 +0000 (17:07 +0900)]
[COMMON] media: smfc: move v4l2 ioctl handlers in separate file
The implementation of v4l2 ioctl handlers occupies the half of smfc.c
The handlers are moved to another file for easier maintenance.
Change-Id: Ic65243aef0e173177f819be9b723bdea36c81ba9
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Wed, 22 Jul 2015 14:42:02 +0000 (23:42 +0900)]
[COMMON] media: smfc: use s/w timer if HWFC is enabled
If HWFC is enabled, the internal timer in the H/W is not available
because when the H/W finishes depends on the outside of SMFC itself.
Instead of the internal timer, S/W timer is used for the case of HWFC.
S/W timer is expired if the H/W is not completed in a second that is
quite huge amount of time.
Change-Id: I0a23448033b91bcb64523cebfeeee14d78c0f410
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Wed, 22 Jul 2015 08:04:12 +0000 (17:04 +0900)]
[COMMON] media: smfc: clean the dirty region by CPU in .buf_cleaup
Even though userspace gives V4L2_BUF_FLAG_NO_CACHE_CLEAN flag in
the v4l2_buffer on qbuf, it just guarantees that the buffer after
the specific offset is not cache dirty by CPU.
If the offset become smaller than the previous, H/W may starts to
write the compressed stream on the area that may have dirty cache
lines.
To prevent the problem, the driver should clean the dirty cache lines
if the offset becomes no longer valied.
Change-Id: I54baba493dd4c179eda740bedba3378d4abe8435
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Wed, 15 Jul 2015 05:08:01 +0000 (14:08 +0900)]
[COMMON] media: smfc: disable timeout interrupt during HWFC is on
If HWFC is enabled, MC Scaler that generates the source image of SMFC
may starts significantly later than SMFC. We have observed that SMFC
asserts timeout if MC Scalert starts working in the mean time. To
prevent unexpected timeout interrupt, it is reqruied to disable the
timeout interrupt.
Instead of timeout interrupt, hurry threashold interrupt should be
used to detect a problem during compression.
Change-Id: I92d3bf5bfcceb7f757a8600d3623da4127e1519c
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Wed, 15 Jul 2015 05:02:38 +0000 (14:02 +0900)]
[COMMON] media: smfc: fix missing secondary interrupt status
SMFC can asserts without no status indication bit of the main image set
if the secondary image causes the interrupt.
Therefor the driver should check the interrupt status of the secondary
image when the interrupt is occurred even though 0 is read from the
interrupt status register of the main image.
Change-Id: I9581213730c88a0f51f414aa29c84f08ed3783c2
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Wed, 15 Jul 2015 05:04:55 +0000 (14:04 +0900)]
[COMMON] media: smfc: fix incorrect image format check for HWFC
HWFC requires the source image is YUV422 1 plane or YUV420 2 plane.
Change-Id: I5dfeb95cd66a2e9ce5d7cb353a2b249fc469a825
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Wed, 15 Jul 2015 04:46:48 +0000 (13:46 +0900)]
[COMMON] media: smfc: do not chroma subsampling for thumbnail with HWFC
If Hardware Flow Control is enabled, we have observed that the SMFC
asserts the invalid thumbnail encoding configuration interrupt if the
chroma subsampling factor of the thumbnail JPEG stream is different
from the one of the main JPEG stream.
Change-Id: Ia003859ab08c89f2df3867da36789be476a84b26
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Wed, 1 Jul 2015 06:57:59 +0000 (15:57 +0900)]
[COMMON] media: smfc: fix missing buffer length for RGB32 formats
Change-Id: Ic2b20937eaa19b79f1264c86c9a46bb662e99714
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>
Cho KyongHo [Wed, 1 Jul 2015 06:22:23 +0000 (15:22 +0900)]
[COMMON] media: smfc: fix unexpected warning during .stop_streaming
Videobuf2 asserts warning when vb2_buffer_done() is called for non
active buffers. .stop_streaming() in the driver also has a problem
because it should cancel the queued buffers rather than canceling
all buffers.
Change-Id: I9041c34f6810d8e8aeeffd6b890db226dc2ef640
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>