GitHub/LineageOS/android_kernel_motorola_exynos9610.git
6 years ago[COMMON] media: mfc: DRV4.0: encapsulate mfc_ctx_ready()
Sunyoung Kang [Mon, 2 Jul 2018 06:53:37 +0000 (15:53 +0900)]
[COMMON] media: mfc: DRV4.0: encapsulate mfc_ctx_ready()

The mfc_ctx_ready() calls mfc_dec_ctx_ready() or mfc_enc_ctx_ready()
according to ctx->type. This changes mfc_dec/enc_ctx_ready() to static
and caller uses only mfc_ctx_ready().

Change-Id: Ica665363a32316a72e9f385f2f884ac68a5ab5e9
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: adjust variable order
Ayoung Sim [Fri, 29 Jun 2018 07:54:53 +0000 (16:54 +0900)]
[COMMON] media: mfc: DRV4.0: adjust variable order

Variables should be defined consider with type on memory

Change-Id: I368167fbcfb266a463ca96ded9dc071268d119af
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: clean up the some debug log
Ayoung Sim [Fri, 29 Jun 2018 05:42:44 +0000 (14:42 +0900)]
[COMMON] media: mfc: DRV4.0: clean up the some debug log

Change-Id: I82982e2dc7475c567bdb2dfec94df59817ff8b55
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: replace opr and ctrl to run
Sunyoung Kang [Thu, 28 Jun 2018 08:56:34 +0000 (17:56 +0900)]
[COMMON] media: mfc: DRV4.0: replace opr and ctrl to run

The mfc_opr and mfc_ctrl perform a similar function to operate HW.
This merges the both together and changes the name to mfc_run.

- apply "mfc_run" prefix to function name in mfc_run
- move hwlock code in sleep/wakeup function to caller
- remove unnecessary code

Change-Id: I23320d6c454c353de30e9c761b3f581e20d28a7b
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: delete mfc_inst
Sunyoung Kang [Tue, 26 Jun 2018 07:34:00 +0000 (16:34 +0900)]
[COMMON] media: mfc: DRV4.0: delete mfc_inst

Ths mfc_inst is similar to mfc_cmd, so it is merged to cmd.
In this process, the following changes were made.

< merge >
- mfc_open_inst => mfc_cmd_open_inst
- mfc_close_inst => mfc_cmd_close_inst
< rename >
- mfc_abort_inst => mfc_cmd_abort_inst
- mfc_init_decode => mfc_cmd_init_decode
- mfc_decode_one_frame => mfc_cmd_dec_one_frame
- mfc_init_encode => mfc_cmd_init_encode
- mfc_encode_one_frame => mfc_cmd_enc_one_frame
< move >
- mfc_h264_set_aso_slice_order =>
mfc_set_aso_slice_order_h264 in enc_param.c
< add >
- mfc_set_enc_params() in enc_param.c

And unnecessary code in mfc_cmd has been removed.

Change-Id: I638f02ff0100921f2e82c19ed1089538a6add0c1
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: change to intuitive file name.
Sunyoung Kang [Tue, 26 Jun 2018 06:10:09 +0000 (15:10 +0900)]
[COMMON] media: mfc: DRV4.0: change to intuitive file name.

This changes the file names more intuitively.

mfc_regs_v10.h => mfc_regs.h
mfc_reg.c/h => mfc_reg_api.c/h
mfc_cal.c/h => mfc_hw_reg_api.c/h
mfc_dec_ops.c => mfc_dec_ctrl.c
mfc_enc_ops.c => mfc_enc_ctrl.c
mfc_dec.c/h => mfc_dec_v4l2.c/h
mfc_enc.c/h => mfc_enc_v4l2.c/h
mfc_dec_vb2_ops.c => mfc_dec_vb2.c
mfc_enc_vb2_ops.c => mfc_enc_vb2.c
mfc_irq.c/h => mfc_isr.c/h

Change-Id: Ie217f5ccead5ab12888ec3fe83c292be10a0f553
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: remove "s5p" prefix in mfc hwfc
Sunyoung Kang [Tue, 26 Jun 2018 05:05:00 +0000 (14:05 +0900)]
[COMMON] media: mfc: DRV4.0: remove "s5p" prefix in mfc hwfc

The mfc hwfc has been modified like below.

- header file rename: s5p_mfc_hwfc.h => mfc_hwfc.h
- function rename: s5p_mfc_hwfc_encode => mfc_hwfc_encode

Change-Id: I6b7b471e02c0dc5721748869ed95c1608db1e76e
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: remove "s5p" prefix in all files.
Sunyoung Kang [Tue, 26 Jun 2018 04:44:45 +0000 (13:44 +0900)]
[COMMON] media: mfc: DRV4.0: remove "s5p" prefix in all files.

The "s5p" prefix is no longer meaningful and removed.
The function and register names have been modified as shown below.

- normal function name: s5p_mfc_xxx => mfc_xxx
- static function name: mfc_xxx => __mfc_xxx
- register definition:   S5P_FIMV_xxx => MFC_REG_xxx
- structure name: s5p_mfc_xxx => mfc_xxx
- macro name: S5P_MFC_xxx => MFC_xxx

Change-Id: I0e8726af7c0f2d244c49e0166fcdbe1617b0a7c8
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: remove "s5p" prefix in file name.
Sunyoung Kang [Mon, 25 Jun 2018 06:43:24 +0000 (15:43 +0900)]
[COMMON] media: mfc: DRV4.0: remove "s5p" prefix in file name.

The "s5p" prefix is no longer meaningful so this renames
all files.

Change-Id: I46662fd4660c66eeafd0322053292a61e9b3c3e1
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years ago[COMMON] media: mfc: check low memory device
Jeonghee Kim [Tue, 26 Jun 2018 02:23:31 +0000 (11:23 +0900)]
[COMMON] media: mfc: check low memory device

Returns error if the total memory is less than 1.5GB and DPB size is too big
to pass android.security.cts.StagefrightTest#testBug_37930177

Change-Id: I62f82f73ea49a490317e54faf80adf467474be70
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: check max/min resoltion for encoder
Jeonghee Kim [Thu, 21 Jun 2018 11:40:44 +0000 (20:40 +0900)]
[COMMON] media: mfc: check max/min resoltion for encoder

- Encoder max resolution
HEVC(422), BPG: 65536x8192 or 8192x65536
HEVC(420), H.264, VP8: 8192x8192
VP9: 4096x8192
MPEG4: 2048x2048
H.263: 2048x1152
- Encoder min resolution
HEVC, BPG, VP9: 64x64
H.264, VP8, MPEG4, H.263: 32x32

Change-Id: I8718b609b02c854360a70abfcfe8570b66846bc0
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: fix the QoS calculation
Jeonghee Kim [Tue, 19 Jun 2018 12:00:46 +0000 (21:00 +0900)]
[COMMON] media: mfc: fix the QoS calculation

If too many instances are open,
'total_fps * sw_time' can exceed 1 second and total_mb value can be zero.
When the total_mb is zero,
we can't request a high QoS level in qos_on function
and QoS remove will be called unconditionally in qos_off function.
In order to defend this problem,
It has been modified to use max_mb value if SW time exceeds 1 second.

Change-Id: I833bc27b5c547c8d92c5eddc9f685d26677b179f
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [BUFCON]
Ayoung Sim [Fri, 22 Jun 2018 05:45:08 +0000 (14:45 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [BUFCON]

Change-Id: Id99b130f2602f47f374856d08e8aa22800e51f81
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: use the rc_framerate for timestamp calculation
Ayoung Sim [Fri, 22 Jun 2018 05:04:43 +0000 (14:04 +0900)]
[COMMON] media: mfc: use the rc_framerate for timestamp calculation

Change-Id: I8ebb3144da1098c3a8335ef03d973ac53e88a2ab
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: change the variable name
Ayoung Sim [Fri, 22 Jun 2018 05:43:01 +0000 (14:43 +0900)]
[COMMON] media: mfc: change the variable name

'num_bufs_in_vb' is mean the number of valid buffers.

Change-Id: I5985cfdbc4d3a30a4fb60e0cec2bc66220d28dd5
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: add buffer mask to dma-buf container
Ayoung Sim [Fri, 22 Jun 2018 04:55:32 +0000 (13:55 +0900)]
[COMMON] media: mfc: add buffer mask to dma-buf container

Change-Id: I0f2d92331b4e131bf1f67519ad1866894a1986a0
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: done_index is increased after timestamp is copied
Ayoung Sim [Fri, 22 Jun 2018 04:44:58 +0000 (13:44 +0900)]
[COMMON] media: mfc: done_index is increased after timestamp is copied

Change-Id: I5c6c8b7564864bfc6bcbeaf1cceb5d4d62de388d
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: remove the unnecessary mark
Ayoung Sim [Thu, 21 Jun 2018 23:57:34 +0000 (08:57 +0900)]
[COMMON] media: mfc: DRV4.0: remove the unnecessary mark

Change-Id: I8b3416ff4056140e290a5aaf486b5049edce755c
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [OTF]
Ayoung Sim [Thu, 21 Jun 2018 08:22:32 +0000 (17:22 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [OTF]

Change-Id: Ia4ff5d63a40fbceb00675eaac1ba736e34b9e8ab
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [NALQ]
Ayoung Sim [Wed, 20 Jun 2018 08:09:49 +0000 (17:09 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [NALQ]

Change-Id: I509e015411e821705f8ca85ecd6d933280f198b3
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [MULTIFRAME]
Ayoung Sim [Wed, 20 Jun 2018 07:47:18 +0000 (16:47 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [MULTIFRAME]

Change-Id: I667454a40f65755b628f4c0e2c8a08d987e9e753
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [CTRLS]
Ayoung Sim [Wed, 20 Jun 2018 07:24:27 +0000 (16:24 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [CTRLS]

Change-Id: I9eadb7876eb598c7955b3c7079bbb2738a9c8189
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [BUFINFO]
Ayoung Sim [Wed, 20 Jun 2018 06:22:47 +0000 (15:22 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [BUFINFO]

Change-Id: I8439b59c2707cb8fd61682c23edf2d4cfe2074fc
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [STREAM]
Ayoung Sim [Wed, 20 Jun 2018 04:21:40 +0000 (13:21 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [STREAM]

Change-Id: I7fd785f5fc4f8485ea3c6ff202e39ef3bd5c3e3b
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [FRAME]
Ayoung Sim [Wed, 20 Jun 2018 00:24:16 +0000 (09:24 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [FRAME]

Change-Id: I25ca69ac74814219bde3294583f4eb792daa6ff9
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [MEMINFO][F/W]
Ayoung Sim [Tue, 19 Jun 2018 07:59:41 +0000 (16:59 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [MEMINFO][F/W]

Change-Id: If80c8b5093a83f5ab5ed391b334998fe52fddffa
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [10BIT]
Ayoung Sim [Mon, 18 Jun 2018 08:33:51 +0000 (17:33 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [10BIT]

Change-Id: Ie43c401e9eae1ef9a03a4bee0b826a287d7d934e
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [DPB]
Ayoung Sim [Mon, 18 Jun 2018 07:49:21 +0000 (16:49 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [DPB]

Change-Id: I446df75e07f08bbb85116351bb023962c8131fc6
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [HDR]
Ayoung Sim [Mon, 18 Jun 2018 02:25:29 +0000 (11:25 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [HDR]

Change-Id: Ic2d727a5785999a72e1d3de157f75d87fec4677d
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [DRC]
Ayoung Sim [Mon, 18 Jun 2018 02:22:37 +0000 (11:22 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [DRC]

Change-Id: Ib9379c00da450026723b1f76b2472ac60bd60be1
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [HIERARCHICAL]
Ayoung Sim [Fri, 15 Jun 2018 08:20:28 +0000 (17:20 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [HIERARCHICAL]

Change-Id: If14197adfdc77bd9f10382c9fa80a0d41196d5c1
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [ROI]
Ayoung Sim [Fri, 15 Jun 2018 07:40:29 +0000 (16:40 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [ROI]

Change-Id: I29b23d18f1ce0d45f9e2ce4aa9d08b3b63654b5a
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [INTERLACE]
Ayoung Sim [Fri, 15 Jun 2018 07:29:30 +0000 (16:29 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [INTERLACE]

Change-Id: Ia2d39a9e096c92a1e7329476399e50beb52278bc
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [BLACKBAR]
Ayoung Sim [Fri, 15 Jun 2018 07:15:29 +0000 (16:15 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [BLACKBAR]

Change-Id: I2a094c0c23fd2b071ecfa0237b1b5c6ed16c6253
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: update prefix [QoS][TS]
Ayoung Sim [Fri, 15 Jun 2018 07:07:28 +0000 (16:07 +0900)]
[COMMON] media: mfc: DRV4.0: update prefix [QoS][TS]

Change-Id: I7e5275f499170304eb86612ad776691f859f7686
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: parse supported format information
Jeonghee Kim [Fri, 15 Jun 2018 11:07:43 +0000 (20:07 +0900)]
[COMMON] media: mfc: parse supported format information

MFC driver returns the error when the set format is not supported.
In addition, it does not change the format after header parsing if it is not supported.

Change-Id: Id7927f62c9348d5ca362039e3526f1a199d1014d
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[9610] arm64: dts: add supported format information for mfc
Jeonghee Kim [Fri, 15 Jun 2018 11:05:36 +0000 (20:05 +0900)]
[9610] arm64: dts: add supported format information for mfc

Change-Id: Ie0a4560176815f5621c266bb00de750b55d92463
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[9610] arm64: dts: change the HWFC address
Ayoung Sim [Fri, 13 Jul 2018 01:52:13 +0000 (10:52 +0900)]
[9610] arm64: dts: change the HWFC address

Change-Id: I91207193b759c9ca3cfed07fa812d5a473238756
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: support performance boost mode
Ayoung Sim [Fri, 8 Jun 2018 02:23:55 +0000 (11:23 +0900)]
[COMMON] media: mfc: DRV4.0: support performance boost mode

This mode should be used only for test
and user should set before MFC start(open).

Change-Id: I752d77334227f49e485604d2979aa965c8463522
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[9610] arm64: dts: add the new QoS table for performance boost
Ayoung Sim [Thu, 14 Jun 2018 06:01:46 +0000 (15:01 +0900)]
[9610] arm64: dts: add the new QoS table for performance boost

Change-Id: I943b3e9d8eb5d7dbe265e990a5488e07ca769ddb
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: fix the memory leak
Ayoung Sim [Tue, 29 May 2018 07:53:37 +0000 (16:53 +0900)]
[COMMON] media: mfc: fix the memory leak

If driver failed to get dmabuf of specific plane not plane0,
the dmabuf of previous plane doesn't be released.

Change-Id: I7c41ac3717fbd274a2213a56be2f2f98401fb993
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: parse default 10bit format for decoding
Jeonghee Kim [Fri, 8 Jun 2018 05:44:18 +0000 (14:44 +0900)]
[COMMON] media: mfc: parse default 10bit format for decoding

Change-Id: I991532cd6f68a434109af8f84c66570c1f09498c
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[9610] arm64: dts: add default 10bit format for decoding
Jeonghee Kim [Mon, 11 Jun 2018 04:42:30 +0000 (13:42 +0900)]
[9610] arm64: dts: add default 10bit format for decoding

Change-Id: I903f778a8c107dbd714886bb5a3b460ddd4ec1ab
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: DRV4.0: find dec/enc formats using pixelformat
Jeonghee Kim [Fri, 8 Jun 2018 04:54:49 +0000 (13:54 +0900)]
[COMMON] media: mfc: DRV4.0: find dec/enc formats using pixelformat

Change-Id: I9dfcf2ee5a93672cf7dfc9e996103fa120ca279e
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: use released buffer in dec only
Jeonghee Kim [Thu, 7 Jun 2018 10:07:21 +0000 (19:07 +0900)]
[COMMON] media: mfc: use released buffer in dec only

Change-Id: I42dff38672689eee66890781e06e5b94aca7565b
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years ago[COMMON] media: mfc: change the number of NAL_Q slot
Ayoung Sim [Tue, 5 Jun 2018 01:50:03 +0000 (10:50 +0900)]
[COMMON] media: mfc: change the number of NAL_Q slot

If MFC run with max multi-instance in NAL_Q mode,
32 slot is needed because one slot is needed for one command(job).
Becuase one instance can get 5 jobs at the same time,
we increase the slot size to 32KB such as below.
- 32 instance * 4 jobs = 128 slot.
- 256 byte(one slot size) * 128 = total 32KB.

Change-Id: I1b32235febc63d4ec4eb2144601c605371cf3bf8
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: change the default 10bit format
Ayoung Sim [Tue, 15 May 2018 06:33:31 +0000 (15:33 +0900)]
[COMMON] media: mfc: change the default 10bit format

Default 10bit format is changed to P010 format and
default MEM_TYPE_10B is changed too,
because P010 format should set the MEM_TYPE_10B to 1.
Also, MEM_TYPE_10B should be set when SEQ_START.

Change-Id: I1c4d9748b1681dd485550a49614b772e0802a783
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: support the MBAFF frame
Ayoung Sim [Wed, 30 May 2018 06:47:26 +0000 (15:47 +0900)]
[COMMON] media: mfc: support the MBAFF frame

Change-Id: I1416910f0822afd43d0f7d0d7e32b599eb577fe7
Signed-off-by: Ayoung Sim <a.sim@samsung.com>
6 years ago[COMMON] media: mfc: fix gcc build warning
Jeonghee Kim [Mon, 11 Jun 2018 00:56:23 +0000 (09:56 +0900)]
[COMMON] media: mfc: fix gcc build warning

Change-Id: I5bbfa369600e7ce3d0dafe6d78a0f7713196d7d0
Signed-off-by: Jeonghee Kim <jhhhh.kim@samsung.com>
6 years agoRevert "[COMMON] media: mfc: remove debug mode when "But error""
Sunyoung Kang [Fri, 20 Jul 2018 09:06:14 +0000 (18:06 +0900)]
Revert "[COMMON] media: mfc: remove debug mode when "But error""

This reverts commit 03754e461cb0014cbd7879fc7f5e82d60107c523.

Change-Id: Iccb0f095f98d2b12a3ff60b77c12dac387e71fcc
Signed-off-by: Sunyoung Kang <sy0816.kang@samsung.com>
6 years agoANDROID: cpufreq: track per-task time in state.
Connor O'Brien [Thu, 1 Feb 2018 02:11:57 +0000 (18:11 -0800)]
ANDROID: cpufreq: track per-task time in state.

Add time in state data to task structs, and create
/proc/<pid>/time_in_state files to show how long each individual task
has run at each frequency.
Create a CONFIG_CPU_FREQ_TIMES option to enable/disable this tracking.

Signed-off-by: Connor O'Brien <connoro@google.com>
Bug: 72339335
Test: Read /proc/<pid>/time_in_state
Change-Id: Ia6456754f4cb1e83b2bc35efa8fbe9f8696febc8

6 years agosched: ems: ontime: Use get_cpu_max_capacity instead of capacity_orig_of function.
Daeyeong Lee [Tue, 19 Jun 2018 06:19:07 +0000 (15:19 +0900)]
sched: ems: ontime: Use get_cpu_max_capacity instead of capacity_orig_of function.

Change-Id: I0ffb28f2680b9f3603a82eb0fbfbce8213c4c83f
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
6 years agosched: ems: provide API for cpu max capacity
Park Bumgyu [Tue, 19 Jun 2018 06:10:01 +0000 (15:10 +0900)]
sched: ems: provide API for cpu max capacity

Change-Id: Iaef589d777ce55ab21f642f4f9333d753309069e
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
6 years agoarm64: cpuinfo: change print level for I-cache
Youngtae Lee [Mon, 18 Jun 2018 08:00:55 +0000 (17:00 +0900)]
arm64: cpuinfo: change print level for I-cache

Change-Id: I582c493c1cd371ce94417b671c5e51bf4e69beb9
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agosamsung: Change print level for emc and cpuhp
Youngtae Lee [Mon, 18 Jun 2018 07:49:28 +0000 (16:49 +0900)]
samsung: Change print level for emc and cpuhp

Change-Id: Ifd39e1c4d7aaabd0f83cdba83fd3b0c851b7df7e
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agosched: ems: update cpu_scale when policy is updated
Park Bumgyu [Wed, 2 May 2018 02:27:23 +0000 (11:27 +0900)]
sched: ems: update cpu_scale when policy is updated

When policy->max is pressed, the performance of the cpu is
constrained. In the constrained state, the cpu capacity also
changes, and the overutil condition changes accordingly, so
the cpu scale is updated whenever policy is changed.

Change-Id: Ie6938e605d55cf700164a7512ffd6c41a747cbbc
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
6 years agosched: ems: ontime: Modify to initialize the boundary value by ratio
Daeyeong Lee [Mon, 18 Jun 2018 02:44:00 +0000 (11:44 +0900)]
sched: ems: ontime: Modify to initialize the boundary value by ratio

Change-Id: Iab4450579898d8b5d561d00f7c627d7c88ce88ab
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
6 years agosamsung: emc: make strong API for setting boost frequency
Choonghoon Park [Fri, 15 Jun 2018 10:22:32 +0000 (19:22 +0900)]
samsung: emc: make strong API for setting boost frequency

Change-Id: I0ea3b00ce1b3e07864bbddd370319538e037629e

6 years agohafm: deliver zero pb when frequency is equal to or above threshold
Choonghoon Park [Fri, 15 Jun 2018 09:24:16 +0000 (18:24 +0900)]
hafm: deliver zero pb when frequency is equal to or above threshold

This zero value notifies hwboost plugin that
the plugin have to use the power budget it stored recently.

Change-Id: I8157aa07de4ed6306c68fb7daecd8b9608c31f74

6 years agohafm/hafm-tb: make strong API for setting boost frequency
Choonghoon Park [Fri, 15 Jun 2018 08:45:31 +0000 (17:45 +0900)]
hafm/hafm-tb: make strong API for setting boost frequency

Change-Id: I13845d6da6440bf2f9bceda1167c059219fd043c

6 years agoarm64: dts: modify fields for setting hafm boost frequency
Choonghoon Park [Fri, 15 Jun 2018 08:39:57 +0000 (17:39 +0900)]
arm64: dts: modify fields for setting hafm boost frequency

Change-Id: I77de428cc7ef3276bc100ddf3f2ee2bc22f89d35

6 years agocpufreq: acme: move API under interface category
Choonghoon Park [Fri, 15 Jun 2018 10:35:15 +0000 (19:35 +0900)]
cpufreq: acme: move API under interface category

Change-Id: I9829edbd35287f0f27f324b88b029f84e9a50c44

6 years agocpufreq: acme: add API to get boost freq
Choonghoon Park [Fri, 15 Jun 2018 08:36:40 +0000 (17:36 +0900)]
cpufreq: acme: add API to get boost freq

Change-Id: Ifdb43b4fda98b46a7d33be0818db580ec42759da

6 years agosamsung: emc: Fix emc_enabled/disabled bug
Youngtae Lee [Fri, 15 Jun 2018 10:11:52 +0000 (19:11 +0900)]
samsung: emc: Fix emc_enabled/disabled bug

Change-Id: Ie6fd186d2932367b1cfc5f2305d6248cc67eebe7
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agodriver: Change P-state boost name
Youngtae Lee [Fri, 15 Jun 2018 07:59:35 +0000 (16:59 +0900)]
driver: Change P-state boost name

Change-Id: I18799a3e36cac1501d0e2385bffe7c4752502e9d
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agocpufre: Kconfig: Change and Add P-State boost config name
Youngtae Lee [Fri, 15 Jun 2018 07:58:42 +0000 (16:58 +0900)]
cpufre: Kconfig: Change and Add P-State boost config name

change P-state boost name and add mode changer

Change-Id: I4ffe10885ac81a63f0792a7c0c6491a0abb26ec6
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agocpufreq: eff: fix configuration
Choonghoon Park [Fri, 15 Jun 2018 00:26:53 +0000 (09:26 +0900)]
cpufreq: eff: fix configuration

Fix typo PSTATE_EXYNOS_HAFM to CONFIG_PSTATE_EXYNOS_HAFM

Change-Id: I541dd9cf2f90a7fd6d2a15fa22dd7ec494e5e68c

6 years agosched: ems: Don't check lbt_bring_overutilize when wake balance
Daeyeong Lee [Thu, 14 Jun 2018 06:56:50 +0000 (15:56 +0900)]
sched: ems: Don't check lbt_bring_overutilize when wake balance

Change-Id: I2b3cd086d0a4329270c7b877967897ce4735e5a0
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
6 years agosamsung: emc: Fix bug that max_constraints violation bug.
Youngtae Lee [Thu, 14 Jun 2018 05:47:16 +0000 (14:47 +0900)]
samsung: emc: Fix bug that max_constraints violation bug.

This fxixes bug that current and real frequency is higher than
max frequency.

Change-Id: I3d488b642cea350e6dcc7d84eab9389d34639555
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agocpufreq: acme: Add exynos_cpufreq_get_locked.
Youngtae Lee [Thu, 14 Jun 2018 05:44:27 +0000 (14:44 +0900)]
cpufreq: acme: Add exynos_cpufreq_get_locked.

It is accompanied by a lock job to prevent
reading frequency during frequency change

Change-Id: Iaf163321dff7437ad215b200f10589225a73c4f7
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agosched: fix wrong declaration of inline extern function.
Park Bumgyu [Thu, 14 Jun 2018 05:42:44 +0000 (14:42 +0900)]
sched: fix wrong declaration of inline extern function.

To fix build error, remove inline term at extern declared function.

Change-Id: Id30ffd2f600b514b98cfe9ebd60d80a5fdc463c3
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
6 years agosched: ems: support schedtune.boost in wakeup balance.
Park Bumgyu [Thu, 14 Jun 2018 04:20:46 +0000 (13:20 +0900)]
sched: ems: support schedtune.boost in wakeup balance.

Change-Id: I18938f89a6cf1372c6be96e0d6c769960cd2918c
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
6 years agosched: ems: fix return type of task_util.
Park Bumgyu [Thu, 14 Jun 2018 00:43:16 +0000 (09:43 +0900)]
sched: ems: fix return type of task_util.

The variable type of util_avg is unsigned long. Fix return type
of task util to avoid data loss.

Change-Id: I463b9fa65f018f4d98804df6f3c62fbbb6ff0951
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
6 years agosched: ems: ontime: Modify to check whether fit_cpus is empty.
Daeyeong Lee [Thu, 14 Jun 2018 01:17:52 +0000 (10:17 +0900)]
sched: ems: ontime: Modify to check whether fit_cpus is empty.

- There is a possibility of trouble, when fit_cpus is return with empty.
  To prevent this situation, ontime_select_fit_cpus fucntion return
  whether fit_cpus is empty or not.

Change-Id: Ibcadee7f1c7dd54e074509712ddb3ea05bfc82ef
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
6 years agocpufreq: eff: add HAFM-TB featuring.
Choonghoon Park [Tue, 12 Jun 2018 10:10:47 +0000 (19:10 +0900)]
cpufreq: eff: add HAFM-TB featuring.

Change-Id: I4844df6e79494f6234b5e92bfd5aaf9be1caa04d

6 years agohafm/hafm-tb: modify featuring for managing divided files.
Choonghoon Park [Tue, 12 Jun 2018 09:19:27 +0000 (18:19 +0900)]
hafm/hafm-tb: modify featuring for managing divided files.

Change-Id: I01481cbaf0c3b0b38327dcaec3438a7218d7a2ac

6 years agohafm/hafm-tb: make interface to choose on among P-state boost solutions.
Choonghoon Park [Tue, 12 Jun 2018 09:17:40 +0000 (18:17 +0900)]
hafm/hafm-tb: make interface to choose on among P-state boost solutions.

Change-Id: I3ac5dacf298892e3e75f60263124ff403c13706b

6 years agohafm: add file exynos-hafm.c.
Choonghoon Park [Tue, 12 Jun 2018 06:07:42 +0000 (15:07 +0900)]
hafm: add file exynos-hafm.c.

This file is for featuring hafm.

HIU could trigger HWI requests with power budget but frequency level;
HIU just deliver power budget and doesn't change frequency itself with CPUFreq driver.
This feature could be on by setting CONFIG_EXYNOS_HAFM.

Change-Id: Ieac5f123d41974dd3f1869e0b36d24ac2fd0994a

6 years agohafm-tb: rename exynos-hiu.c to exynos-hafm-tb.c.
Choonghoon Park [Tue, 12 Jun 2018 06:00:15 +0000 (15:00 +0900)]
hafm-tb: rename exynos-hiu.c to exynos-hafm-tb.c.

This file is for featuring hafm-tb.

HIU could request HWI DVFS with power budget.
This feature could be on by setting CONFIG_EXYNOS_HAFM_TB.

Change-Id: I88c5466e50756c44a25410d8955cf10a0c220d1c

6 years agocpufreq: eff: Introduce Exynos FF.
Choonghoon Park [Mon, 29 Jan 2018 10:08:13 +0000 (19:08 +0900)]
cpufreq: eff: Introduce Exynos FF.

Change-Id: Ic26f61d8776f2d2420ed279449f017c2074145ef

[9820] cpufreq: eff: get target function using cpufreq ready callback

Change-Id: I54615aea3d248d584490271a0c30a66f42a2ba00

[9820] cpufreq: eff: make filtering condition more precisely

Filtering conditions
  1) SW request (normal request)
    turbo boost is already activated (cur_freq >= boost_threshold)
    and
    this request could activate turbo boost (req_freq >= boost_threshold)

  2) HWI request
    turbo boost is released (cur_freq < boost_threshold)

Change-Id: I5fc21741706de0c0f26d9b4a15c1e8bcad0d1bd6

[9820] cpufreq: eff: clamp frequency SW requests above boost threshold

In case of normal DVFS request (not HWI request),
clamp target value to boost threshold,
if target value > boost threshold.

SW must not request DVFS with frequency above boost threshold.

Change-Id: Ie2cb26e75d2d172f3cfbe02c0a95ca5eb7700c83

6 years agohiu: Introduce HIU driver.
Choonghoon Park [Mon, 15 Jan 2018 06:11:54 +0000 (15:11 +0900)]
hiu: Introduce HIU driver.

Change-Id: Ib8c490128ab6dcc36fc7f502ded8c2d5b9eddc41

[9820] hiu: sync up H/W and S/W frequency with EFF

Exynos FF and HIU driver cowork to sync up H/W and S/W frequency.

Change-Id: I71689390ca7cf8bea6cfe222b419788c47708ed7

[9820] hiu: update hiu data using cpufreq ready callback

Change-Id: I398899d97541410776b7b780ac72fb87de8ff796

[9820] hiu: modify logging type

Change-Id: I1cc7927255d574462639e6eda4fbd5533eaed890

[9820] hiu: add offset to level for communication with ACPM

Change-Id: Ic37b5c812004f2168c625e6c224e07090a526f6a

[9820] hiu: add field in hiu data for sw power budget limit

When current frequecy is lower than boost threshold,
HIU don't need to request dynamic power bugeting.

SW requests DVFS with fixed power budgeet limit

Change-Id: I2b20d14d39c729552854bd4226e3d862f65c44a4

[9820] hiu: move some functions under helper function category

Change-Id: I5511e5f9a6778cd92dc7fcdfe5ed905e33a45e5c

[9820] hiu: wait for SR1 response in when normal DVFS is requested

Change-Id: Ib6676d2b586ec11c208f02cb9bbac77dc1acb281

[9820] hiu: make sr1_check_loop more stable

Change-Id: I9fefe89eb4a631238789e34629882447d6bc4adc

[9820] hiu: give normal DVFS request higher prio than turbo boost

If
1) normal DVFS request and trubo boost request tb_threshold DVFS value and
2) turbo boost request get to know SR1 write and clear SR1 write bit,
then normal DVFS will be stuck in loop until other SR1 write comes.

It means that other normal DVFS requests will be stuck by mutex
the normal DVFS request stuck has.

This patch is for solving the problem.

Change-Id: I6671fa1149cdc657560df1bdf3d8ac6929d95ac9

[9820] hiu: enable/disable power constraint and turbo boost using dt

Change-Id: I89724d836be9b9a5475d85981a047a423372c9b6

[9820] hiu: modify API & polling thread for processing DVFS triggered by HIU HW

Change-Id: I11afdf7a32a492e19faf347a43eaa81f9b22949d

[9820] hiu: synchronize SW request and HW request using mutex

Change-Id: I7407a29da0a23422a54a70fa33f7619198faf996

[9820] hiu: do not adjust max frequency

If cpufreq_update_policy is not called,
policy's max frequency could be mis-set.

Therefore, remove max frequency update code
in cpufreq policy callback of HIU

Change-Id: I5cf7073532bc885b360cb0b47764e824fa958c52

[9820] hiu: do not write SR0 with boost threshold when turbo boosting

Change-Id: I575f61f6994f56d2c2498c0371a27f9e32dd5ea7

[9820] hiu: wait for updating sw structure by hwidvfs

Change-Id: Ie8e1387aeb2ca355679f340b7480eed0f7b1361a

[9820] hiu: do not update DVFSLIMIT unnecessarily

Change-Id: Ic3dabb9ee8ada067827dc597bbd3efc53a6cbac3

[9820] hiu: stop polling when turbo boost is released

Change-Id: I58528ee2a93ad7ec8de091daa9e0554cc8bca05f

[9820] hiu: increase polling term

Change-Id: Icd086d3231f4b1b3f2ae399511d7eb5659b6460c

[9820] hiu: check normal dvfs done in API

Change-Id: Ifec361cd4a146cb633f8b82e469d24b6cda895e6

[9820] hiu: locking when updating limit dvfs

Change-Id: I56aa95b5d14c4d89daff1708c8b79131ac0b403e

[9820] hiu: set boost level increments using dt

Change-Id: I0247aa315a20f634f5479d4ead34645321e96ea4

[9820] hiu: deal with hwi dvfs using hwi_dvfs_flag

Change-Id: Ib50268be24994751cab07c9d460d349509426fc5

[9820] hiu: update boost_max using cpufreq policy

Change-Id: I0b34be80c4a5d652e241f29d6318c23bf9ee032f

[9820] hiu: modify condition to set limit dvfs

Condition:
Only when clipped freq is higher than or equal to boost threshold

Change-Id: I588e4b0d5828f3f59ccf182674fc3aa65c920ef4

[9820] hiu: define polling period using macro

Change-Id: Idd74c36d9875f415e2bcc3f08f25a752f78d483c

[9820] hiu: bind polling thread to little

Change-Id: I54862683a1a9d765fb80d2008e0da7529c9fb23b

[9820] hiu: restore hiu data after CHT cluster exits CPD

Change-Id: I342b6e3243755f6da49374a4da76f02affe46bcc

[9820] hiu: use usleep_range instead of udelay

Change-Id: Id19a14242b2d1b25d13b540104b2da0a5543bc16

[9820] hiu: set limit dvfs with hiu data clipped_freq

Change-Id: I6e289246800d28f0f990b4a95ce1c49d084a0395

[9820] hiu: determine SR0 write in set_freq API

Change-Id: Ic5c46476b9ea6ef0b0a418a42fb2085bc7b796c1

[9820] hiu: refactoring functionality to write on SR0

Change-Id: I42ebceba7946f69fdf4242df8dbbecf5be6732bf

[9820] hiu: find policy using online cpu

Change-Id: I4f3ad4d13f348765399290b61fefa2e5a1ca150d

[9820] hiu: create polling thread when probing

Change-Id: I7a4f22b6f573e50e2eedb52aa9e54490109ecf70

[9820] hiu: lock just before cur_freq could be updated

Change-Id: I8e0d7eb2e67af8b6633c429041c6ae08b1b69e5f

[9820] hiu: force work to run only on big

Change-Id: I9a5230f407722a2293eb78fa8a1362797c0407c2

6 years agocpufreq: acme: add API for ready callback.
Choonghoon Park [Mon, 19 Mar 2018 00:42:04 +0000 (09:42 +0900)]
cpufreq: acme: add API for ready callback.

Change-Id: I9b6e9041354be94b2be2a59905af7d4769aaf646

6 years agoocp: Initial patch for OCP handler.
Daeyeong Lee [Thu, 4 May 2017 02:20:02 +0000 (11:20 +0900)]
ocp: Initial patch for OCP handler.

Change-Id: I17290b920385baa232feb2c6501e4ea568e80551
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: Move OCP register initialization to EL3

Change-Id: I76c0414fe88b4527737995ce46a6c9ec46b01537
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: Change the policy when en/disable interrupt and OCP controller

- Enable BPC interrupt only when OCP situration.
  Without OCP situration, the max frequency limit is cleared.
  The BPC interrupt is necessary to release the max frequency limit,
  so it is not necessary when the max frequency limit is off.

- Do not fix the OCP controller in the standby state during the OCP interrupt handling interval.
  Even during OCP interrupt handling,
  the OCP controller should prevent the system down through the uArch throttle.

Change-Id: I541204681f9d6dedfa5e8a5bf33e43b5de432695
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: MK errata 57068: Modify to only meerkat cores access OCP controller

- According to MK errata 57068, there may be a problem
  when accessing the GCU inside the MK Cluster NONCPU block on the APB bus.
  Therefore, the access to the GCU has been modified
  so that it can be performed only in the MR core.

Change-Id: I2476e0be8151a2f61baf325498e83fb90776dcd7
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: MK errata 57068: Use mrs/msr to access OCP controller instead of ioremap

Change-Id: I7595aced5b53a06cf598cc785d0e24ec906b20cb
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: MK errata 58402: Should not use DPM based function

 - To avoid bug 58402, BPC interrupt should not be used.
   Therefore, it is decided to use the timer to release the max frequency
   that restricted by OCP interrupt.

Change-Id: I86e4328594c898e01ed251e3afce80dbd6377c37
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: Combine exynos-ocp.h with exynos-ocp.c

Change-Id: Ifbb40192ac6ffe090d27d6a814e08cbed0275d96
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: Add code to change ocp flag to false when ocp is released

Change-Id: Ia66312da1a3cc3897eb9f32def362dd14e02c187
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: s2mps18: Use currentmeter info for determining BPC condition

Change-Id: Ia349ee985338d2d4bed70c4de2fa10b2da871d9a
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: Add sysfs attributes to show ocp stats

total_trans : show how many ocp max limit is changed. (wrap-around value)
time_in_state : show how long ocp max limit is held at each frequency.
clipped_freq : show current ocp max limit level.

Change-Id: I60597ed6b1d080ead0dded0cca62103d7368bc02
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: Modify OCP handler to set ocp max limit according to current limit

Previously, OCP handler set ocp max limit to lower than curruent frequency by down_step.
However this entangled with thermal and caused unintended behavior.
So modify OCP handler to set ocp max limit according to current limit,
instead of current frequency.

Change-Id: I773be8d0186e4549a1165644507a3b6799c82eeb
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: trace: power: Add trace_ocp_max_limit

Change-Id: I2448c962eaeafc0d4e16f2314c9f6c109377fa47
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: Change pr_info to pr_debug for debug information

Change-Id: Ia79682f547ce4ac184bd1acb6c5a94ed428375f9
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: Align code for readability

Change-Id: I5b65a82f418f6f74a8cab465e19cee9366f0f198
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: Add exynos-snapshot log

Change-Id: I21d2017880e48ccdfd6d17e77a2ca1133acc5e09
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: Add sysfs node to enable/disable OCP interrupt handling

User can control the ocp handling operation as below:
- echo 1 > /sys/devices/platform/exynos-ocp/ocp/enabled => enable
- echo 0 > /sys/devices/platform/exynos-ocp/ocp/enabled => disable

Change-Id: Ia4128f4b72c0cf68199cb563406fc5f806a6b6b5
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: Remove setting current dvfs level to OCP controller

Change-Id: Ie862c51256d6e1f866a26de70f67176a7099d4bc
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: Modify the way to get initial max/min frequency

"policy->min/max" could be changed by thermal already,
when the OCP probe function attempts to read the initial value
Therefore, modify OCP probe function to read the values of policy->user_policy.min/max

Change-Id: I605bfa01271bcfd6df28a1092e930587293e6877
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: s2mps19: change PMIC driver to s2mps19

Change-Id: I9869be76a54ae66d3daeefc2b5c2ed383619818e

[9820] ocp: update IRP value in OCPTOPPWRTHRESH instead of OCPINTCTL

In 9820, register map is changed; IRP field in OCPINTCTL is RO.
Therefore change register for IRP value update into OCPTOPPWRTHRESH.

Change-Id: If642179607edfc5fbff1d9973fadfef9d97d17a7

[9820] ocp: Use cpu load information for BPC condition

Change-Id: Ie65699ccb649c33f7ca7a704bc50764c002a5171
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
[9820] ocp: modify exynos-ss to debug-snapshot

Change-Id: I95c6fd983a23630d42b5045389fa39fc175dce23

6 years agosched: frt: Add the rt_rq load update.
Johnlay Park [Tue, 12 Jun 2018 11:03:25 +0000 (20:03 +0900)]
sched: frt: Add the rt_rq load update.

Change-Id: I676ecfa2aec75c46144f78fc90981ff43c8833c0
Signed-off-by: Johnlay Park <jonglae.park@samsung.com>
6 years agothermal: samsung: Support boost ctrl callback.
Hyeonseong Gil [Tue, 12 Jun 2018 01:51:13 +0000 (10:51 +0900)]
thermal: samsung: Support boost ctrl callback.

Change-Id: I2e50e85b9194456cf406e910ec75a9a5323bfa99
Signed-off-by: Hyeonseong Gil <hs.gil@samsung.com>
6 years agosched: ems: ontime: Use get_cpu_mips instead of capacity_orig_of.
Daeyeong Lee [Tue, 12 Jun 2018 06:15:42 +0000 (15:15 +0900)]
sched: ems: ontime: Use get_cpu_mips instead of capacity_orig_of.

- The value of capacity_orig_of can be changed at runtime.
  Ontime feature need to use stable value that indicating performance of cpu.
  So use get_cpu_mips instead of capacity_orig_of.

Change-Id: If249f6841cc26abce573459d8199004beccdeac8
Signed-off-by: Daeyeong Lee <daeyeong.lee@samsung.com>
6 years agosched: ems: add function to get cpu mips.
Park Bumgyu [Tue, 12 Jun 2018 06:12:22 +0000 (15:12 +0900)]
sched: ems: add function to get cpu mips.

Change-Id: I79918451a93bddf1effe7d8ed6a65a0176886012
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
6 years agosched: ems: prevent access to plugged out cpu.
Park Bumgyu [Tue, 12 Jun 2018 01:23:31 +0000 (10:23 +0900)]
sched: ems: prevent access to plugged out cpu.

Change-Id: Id9e0ac5cb1979cd8d3766f9fb1a7c0874a561e7b
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
6 years agosamsung: emc: Change mode selection alg for 3-cluster.
Youngtae Lee [Mon, 11 Jun 2018 02:10:49 +0000 (11:10 +0900)]
samsung: emc: Change mode selection alg for 3-cluster.

remove imbal_heavy_cpus becuase, if there are just 2 cores in a cluster,
imbal_heavy_cpus is cause that mode couldn't be changed dual.

Support ldsum concept.
If ldsum of big/mid cluster is lower than ldsum_thr of a mode,
emc selects the mode regardless heavy_cpu count. Maybe it helps
changing dual more easy.

Support disabling domain_busy
If domain_busy_ratio is 0, emc doensn't check whether
domain is busy or not.
now, disable busy_ratio for big/mid clsuter.

Change-Id: Ia510d7da9609a0cce556f6bce30bb7f7218697bc
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agosched: schedutil: remove update_single function.
Youngtae Lee [Thu, 26 Apr 2018 12:27:22 +0000 (21:27 +0900)]
sched: schedutil: remove update_single function.

Change-Id: I870028b8b159501e79730f226e8c46c0c2bff50f
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agocpupm: change condition for cpuhp_last_cpu mask.
Youngtae Lee [Mon, 21 May 2018 05:03:20 +0000 (14:03 +0900)]
cpupm: change condition for cpuhp_last_cpu mask.

Change-Id: I2a276317d3857db99317f9314e5fe567b7bcc96d
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agoRevert "cpu: Add function to confirm last cpu of cluster".
Youngtae Lee [Mon, 21 May 2018 05:04:03 +0000 (14:04 +0900)]
Revert "cpu: Add function to confirm last cpu of cluster".

This reverts commit 0ef067b178779bee49c8cddf5ad9ff07eade0512.

Change-Id: I0defd8ea13a5435cedac4a4901033977e2e67975

6 years agosamsung: emc: Change max frequency control method.
Youngtae Lee [Wed, 16 May 2018 11:55:51 +0000 (20:55 +0900)]
samsung: emc: Change max frequency control method.

To fix bug that max frequency is not updated
when all cpus of cluster power down, add pre_update_constraints

Change-Id: Ie5c408dd5e4d1713868ef07c19c39989c45d1a21
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agocpu: Add CPUHP_EXYNOS_BOOST_CTRL_PRE event.
Youngtae Lee [Wed, 16 May 2018 11:59:53 +0000 (20:59 +0900)]
cpu: Add CPUHP_EXYNOS_BOOST_CTRL_PRE event.

Change-Id: I062f4fe5abae7fed4466b70a3e6176a3bf405249
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agocpufrqe: acme: remove exynos_cpufreq_allow_change_max.
Youngtae Lee [Wed, 16 May 2018 04:42:25 +0000 (13:42 +0900)]
cpufrqe: acme: remove exynos_cpufreq_allow_change_max.

Change-Id: Ibe558896a0fdd3c7daf8f844a8bff50bc54348f8
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agosamsung: emc: change timer add condition.
Youngtae Lee [Tue, 15 May 2018 01:18:40 +0000 (10:18 +0900)]
samsung: emc: change timer add condition.

If req_mode and cur_mode is same, skip adding timer

Change-Id: I80ba564f705c131609e0b96ff99126a4495ae3dd
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agosamsung: emc: change real frequency check function.
Youngtae Lee [Mon, 14 May 2018 02:08:23 +0000 (11:08 +0900)]
samsung: emc: change real frequency check function.

Use acme driver old frequency or real cmu value instead of policy->cur

Change-Id: Ide22cf698d0177bcebdba45d980886124ee3c74f
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agoDEBUG: Add trace for cpus_up/down.
Youngtae Lee [Mon, 23 Apr 2018 12:06:54 +0000 (21:06 +0900)]
DEBUG: Add trace for cpus_up/down.

Change-Id: Ic19ff47bd706813bafc99f2d3e421d846acb5c42
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agocpu: Add function to confirm last cpu of cluster.
Youngtae Lee [Wed, 9 May 2018 11:41:46 +0000 (20:41 +0900)]
cpu: Add function to confirm last cpu of cluster.

It shows whether last cpu of fasthp_cpus or not

Change-Id: Ibf7c6913d78ad32422572759b5576545c85302f5
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>
6 years agosamsung: cpupm: Change cluster disable condition
Youngtae Lee [Wed, 9 May 2018 11:36:07 +0000 (20:36 +0900)]
samsung: cpupm: Change cluster disable condition

1. reference cluster_mask instead of coregroup_mask because
   coregroup_mask no more couldn't show h/w clsuter information.

2. To support fast_hotplug, add function to confirm last cpu in the cluster.
   If many cpus power off at the sametime, cpu_online_mask couldn't guarantee
   last cpu of cluster.

Change-Id: Ic08fbdfa6ab981cf48d6c3f5e294f10d1f1a907a
Signed-off-by: Youngtae Lee <yt0729.lee@samsung.com>