Commit Graph

1087081 Commits

Author SHA1 Message Date
Pierre Gondois
ef84fb2dc9 UPSTREAM: sched/fair: Use all little CPUs for CPU-bound workloads
Running N CPU-bound tasks on an N CPUs platform:

- with asymmetric CPU capacity

- not being a DynamIq system (i.e. having a PKG level sched domain
  without the SD_SHARE_PKG_RESOURCES flag set)

.. might result in a task placement where two tasks run on a big CPU
and none on a little CPU. This placement could be more optimal by
using all CPUs.

Testing platform:

  Juno-r2:
    - 2 big CPUs (1-2), maximum capacity of 1024
    - 4 little CPUs (0,3-5), maximum capacity of 383

Testing workload ([1]):

  Spawn 6 CPU-bound tasks. During the first 100ms (step 1), each tasks
  is affine to a CPU, except for:

    - one little CPU which is left idle.
    - one big CPU which has 2 tasks affine.

  After the 100ms (step 2), remove the cpumask affinity.

Behavior before the patch:

  During step 2, the load balancer running from the idle CPU tags sched
  domains as:

  - little CPUs: 'group_has_spare'. Cf. group_has_capacity() and
    group_is_overloaded(), 3 CPU-bound tasks run on a 4 CPUs
    sched-domain, and the idle CPU provides enough spare capacity
    regarding the imbalance_pct

  - big CPUs: 'group_overloaded'. Indeed, 3 tasks run on a 2 CPUs
    sched-domain, so the following path is used:

      group_is_overloaded()
      \-if (sgs->sum_nr_running <= sgs->group_weight) return true;

    The following path which would change the migration type to
    'migrate_task' is not taken:

      calculate_imbalance()
      \-if (env->idle != CPU_NOT_IDLE && env->imbalance == 0)

    as the local group has some spare capacity, so the imbalance
    is not 0.

  The migration type requested is 'migrate_util' and the busiest
  runqueue is the big CPU's runqueue having 2 tasks (each having a
  utilization of 512). The idle little CPU cannot pull one of these
  task as its capacity is too small for the task. The following path
  is used:

   detach_tasks()
   \-case migrate_util:
     \-if (util > env->imbalance) goto next;

After the patch:

As the number of failed balancing attempts grows (with
'nr_balance_failed'), progressively make it easier to migrate
a big task to the idling little CPU. A similar mechanism is
used for the 'migrate_load' migration type.

Improvement:

Running the testing workload [1] with the step 2 representing
a ~10s load for a big CPU:

  Before patch: ~19.3s
  After patch:  ~18s (-6.7%)

Similar issue reported at:

  https://lore.kernel.org/lkml/20230716014125.139577-1-qyousef@layalina.io/

Suggested-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Acked-by: Qais Yousef <qyousef@layalina.io>
Link: https://lore.kernel.org/r/20231206090043.634697-1-pierre.gondois@arm.com
(cherry picked from commit 3af7524b14198f5159a86692d57a9f28ec9375ce)
Change-Id: Ibfd3ed5fc36ed067d1223603aac336dae11b4ce0
Signed-off-by: Liang Chen <cl@rock-chips.com>
2024-01-25 20:28:40 +08:00
Sandy Huang
f2af5d4507 drm/rockchip: vop2: remove ARGB2101010 support from VOP2
At RK3568 and RK3588 platform, cluster only can support AFBC XRGB2101010 and
not support ARGB2101010.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: If0695793ea102fdd10be2bcffd6bd428149da646
2024-01-25 20:18:40 +08:00
Sandy Huang
90c661b591 drm/rockchip: vop2: hdisplay must roundup 2/4 when calc pre_scan_dly
splice mode: hdisplay must roundup as 4 pixel,
no splice mode: hdisplay must roundup as 2 pixel.

otherwise will lead to POST_BUF_EMPTY and display black screen.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I0971a052751c411acef8ed2fcfd9f142caa37598
2024-01-25 10:45:56 +08:00
Zefa Chen
313e8b05f9 media: rockchip: vicap get_channel_info add param of field to cover value from get_fmt
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I552a42ccfa87e61a72b2ce9bd342e41d5e216a13
2024-01-25 10:44:34 +08:00
Chen Shunqing
e1831e066b media: i2c: rk628: add hdmirxphy debugfs
Type: Function
Redmine ID: N/A
Associated modifications: N/A
Test: cat /d/rk628/x-0050/registers/hdmirxphy
      echo 0x2 0x1680 > /d/rk628/x-0050/registers/hdmirxphy

Change-Id: Id395cb5c1c373be00ae4916d86f5f6b13c631c1f
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-25 10:44:05 +08:00
Zefa Chen
5a729b7b60 media: rockchip: vicap increase wake up cnt for rv1126/rk3568 monitor mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I8161e04d61215026591c47d67995f44c56ed54c5
2024-01-25 10:33:43 +08:00
Cai Wenzhong
0f5b360afc media: i2c: maxim: remote: record the status of the serializer
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: Iee78aff7e99950313e5134bd9b0dd73422f0bec1
2024-01-25 09:32:08 +08:00
Algea Cao
f87e4c43fb misc: rk628: Fix warning: rk628_pin_iomux_groups defined but not used
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I737f9197de58097086df624d22e6db93d57202aa
2024-01-24 18:21:02 +08:00
Zhibin Huang
e111f41e81 misc: rk628: Fix the NULL in .suspend/.resume helper when working on hdmi tx mode.
Unable to handle kernel NULL pointer dereference at virtual address 000000000000021c

[   36.755198][    T8] Call trace:
[   36.755491][    T8]  regmap_write+0x14/0x78
[   36.755892][    T8]  rk628_suspend+0x64/0xc0
[   36.756290][    T8]  dpm_run_callback+0x4c/0x214
[   36.756720][    T8]  __device_suspend+0x338/0x528
[   36.757158][    T8]  async_suspend+0x28/0x14c
[   36.757562][    T8]  async_run_entry_fn+0x2c/0xfc
[   36.757994][    T8]  process_one_work+0x1a8/0x3b8
[   36.758436][    T8]  worker_thread+0x258/0x434
[   36.758851][    T8]  kthread+0xec/0x1b8
[   36.759211][    T8]  ret_from_fork+0x10/0x20

Signed-off-by: Zhibin Huang <zhibin.huang@rock-chips.com>
Change-Id: I062ecbf6c751a05b3820c3dc7644facffa68d38f
2024-01-24 18:06:31 +08:00
Elaine Zhang
ee158f86d9 arm64: dts: rockchip: add pd_perihp support for rk3399 usb2
Change-Id: I3a46d7dfb2846b332c81a5879a12853ce7423180
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2024-01-24 14:59:31 +08:00
Lan Honglin
21cc4fd00c media: i2c: imx415: adjusting the power on timing
Fixes: 920198cd6c ("media: i2c: imx415 adapt sleep_wakeup")
Change-Id: I184eff8ca204ae09abe86e31d4b70f9876fcfaf8
Signed-off-by: Lan Honglin <helin.lan@rock-chips.com>
2024-01-24 10:55:24 +08:00
Jianwei Fan
a02a6dc93e media: i2c: rk628: set default timings when query timing if hdmi unplug
Change-Id: Ia88eb29b8f628ad141a256e9cb9229d9b6491851
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-23 12:19:46 +00:00
Zhang Yubing
2cc56db2d2 drm/rockchip: dw-dp: support more color format
Change-Id: Ibd302071c92c60abacfc1b7ecafcfefce76af0f2
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
2024-01-23 20:13:33 +08:00
Jianwei Fan
46b3999952 media: i2c: rk628: add CSI error interrupts to haldle csi errors
Change-Id: Iafbb6da9f1aa13c4e47c502182ce994f8c665995
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-23 20:05:04 +08:00
Jianwei Fan
524b8b81fa media: i2c: rk628: fix get capture when capture mode is 0
Change-Id: Ieb87f83699f55ebd89a069b8888e554b0329c93f
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-23 20:03:52 +08:00
Lin Jianhua
01f8cd7521 arm64: dts: rockchip: px30-evb-ddr3-v10: reduce power consumption by reducing voltage
Partly revert commit 70a514ab14 ("arm64: dts: rockchip: px30-evb:
move some configs to common board dtsi files").

Change-Id: I2b6fb6e0ee84244bc97d328fefe6457e7e432434
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2024-01-23 20:03:28 +08:00
Yiqing Zeng
f9d3663176 media: i2c: maxim: driver version v3.01.00
Compatible with kernel v4.19/v5.10/v6.1

Change-Id: I8b0d9b8fac4e2868db1e1b5c70a63462d29c78a4
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
2024-01-23 19:57:41 +08:00
Wu Liangqing
ce77391d7f arm64: dts: rockchip: rk3588-evb7-imx415: remove cam_ircut0
cam_ircut0 ircut-open-gpios reused by typec

Change-Id: I2403e595215e0ada2aed7f9339ab5d83affb27e9
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2024-01-23 19:56:42 +08:00
Lan Honglin
c1b160e3fa media: i2c: sc450ai adapt sleep_wakeup
Change-Id: Ib4f2b921e3c312acfbe856559182c6dc7417ddf4
Signed-off-by: Lan Honglin <helin.lan@rock-chips.com>
2024-01-23 19:56:08 +08:00
Chen Shunqing
ce0762a9f6 media: i2c: rk628: fix CTS HF2-23 test fail
Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: CTS HF2-23, clk jitter + 0.5%

Change-Id: Iae2c79f368ceeb1a4284dd40de79e235b119b6aa
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-23 19:30:34 +08:00
Chen Shunqing
04406cbc20 media: i2c: rk628: fix CTS HF2-86 test fail
If sample_flat field is set to 1, there can't be any sound.

Type: Function
Redmine ID: N/A
Associated modifications: N/A
Test: CTS test HF2-86

Change-Id: I8f2ddfa3c5a7578a28c062817c10de2ea43ad164
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-23 19:30:25 +08:00
Chen Shunqing
76acb9e640 media: i2c: rk628: fix CTS test fail
1. disable RR_Capable in EDID.
2. HDCP 2C-01/2C-02 fail, HPD hpd drawdown time extended to 1.1s.

Type: Fix
Redmine ID: N/A
Associated modifications: N/A
Test: CTS test

Change-Id: I7f80372e30d6d6ec40df5c1f289bcfb9937171b2
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-23 19:30:18 +08:00
Chen Shunqing
c9c123690f media: i2c: rk628: add hdmirx cec support
Type: Function
Redmine ID: N/A
Associated modifications: N/A
Test: N/A

Change-Id: I975770e7d32fe3d3bcb2123a3b7aa5bda7b05cd7
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-23 19:30:04 +08:00
Chen Shunqing
90a1194138 media: i2c: rk628: disable character error detection
Type: Fix
Redmine ID: N/A
Associated N/A
Test: Some sources have high bit error rate,
      resulting in a black screen.

Change-Id: Ibf928d96bb853cf45dc7d49827de2649c2263526
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-23 19:29:51 +08:00
Chen Shunqing
042b0700bd media: i2c: rk628: fix resolution change but not recognized
Type: Fix
Redmine ID: #456052
Associated modifications: N/A
Test: Use some laptops to change resolution

Change-Id: I671eecb719ef619850fddb93bdda669046060f9d
Signed-off-by: Chen Shunqing <csq@rock-chips.com>
2024-01-23 19:29:37 +08:00
Jkand Huang
06e95d2c43 ARM: dts: rockchip: rv1106g-evb2-v12-wakeup: fix false wakeup issue
The wake-up button status must be consistent with the configuration in
'rockchip,pm-config'.

Change-Id: I518e1f148225cd7adc07408d54138f5d4cb3f603
Signed-off-by: Jkand Huang <jkand.huang@rock-chips.com>
2024-01-23 19:02:35 +08:00
Damon Ding
1358e462d7 drm/rockchip: vop: add csc_mode regs for PX30/RK3366/RV1126
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Iffa1b5ea9dfcc5a0a1d2aa7e023c80ae8c174510
2024-01-23 18:54:17 +08:00
Cai Wenzhong
246072cd36 arm64: dts: rockchip: rk3588-vehicle-evb-v22.dts: fix max96712 dphy3 lock gpio error
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: I614a97c0a0ddefc87653eccffc870b009638a673
2024-01-23 18:01:27 +08:00
Luo Wei
051ed63b17 input: sensor: fix compile errors on kernel-6.1
Signed-off-by: Luo Wei <lw@rock-chips.com>
Change-Id: I6f0536ffd077eee484d0cd79042556a6d71e1b5b
2024-01-23 14:07:33 +08:00
Algea Cao
a17b4cd08a Revert "ARM: dts: rockchip: Add dtsi file for rk628"
This reverts commit d6feca9685.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I6891e479f1ae03100d4c179628a80ff0b3756561
2024-01-23 12:11:16 +08:00
Tao Huang
4405c8a880 Revert "ARM: dts: rockchip: Add support for rk3288-evb-rk628 board"
This reverts commit 3631fa6e38.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I45fd5d1a631c22183f7492b091d0361310ab4844
2024-01-23 12:09:13 +08:00
Tao Huang
4180c71466 Revert "ARM: dts: rockchip: add rk3288-evb-rk628-hdmi2csi-avb.dts"
This reverts commit 951a29b370.

Change-Id: Iabcefcfe3246ca17299648af32a13dc5452afa1d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2024-01-23 12:08:06 +08:00
Tao Huang
87d0a07ea1 Revert "arm64: dts: rockchip: rk3568-evb6: add rk628 rgb2dsi/lvds"
This reverts commit d6f73e172c.

Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I72dab2b21a7ea32dd8dccdd4ae4f800129cf05ab
2024-01-23 11:35:38 +08:00
Tao Huang
734920ed1e Revert "arm64: dts: rockchip: rk3568-evb6: add rk628 bt1120 to hdmi"
This reverts commit 6254fc65c9.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I90eaa6720bcf28b4c370f9c5c4c87c79e57ad41d
2024-01-23 11:33:46 +08:00
Tao Huang
71e6d08400 Revert "arm64: dts: rockchip: rk3568-evb6: add rk628 rgb2hdmi"
This reverts commit 8dcec60e5c.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I8e840a3b194e49afb3ae9cad656b73e1ab3ea998
2024-01-23 11:31:48 +08:00
Algea Cao
dcb71dc445 misc: rk628: Fix compile warning
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: I29a6252b85c603dc6427595698fef071ef04e8df
2024-01-22 19:39:13 +08:00
Algea Cao
b77168d7b3 misc: rk628: Disable gpio test function as default
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Change-Id: Ib952ac0edba083c57db949fcab4235a0b8bccd89
2024-01-22 19:39:13 +08:00
Jianwei Fan
e337ce6951 media: i2c: rk628: fix compile warnings
Change-Id: I29d9b1b5a64352e84046c3f3fffc8f3ab217dd3f
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2024-01-22 19:36:28 +08:00
Cai Wenzhong
3d19f49d33 media: i2c: maxim: local: fixed remote camera s_stream and s_power api return error.
Signed-off-by: Cai Wenzhong <cwz@rock-chips.com>
Change-Id: Iaf53ce1d8bbadce04c5aebb2675c8e0349000c6e
2024-01-22 11:23:19 +08:00
Tao Huang
edd2bd729a Revert "clk/rockchip/regmap: Add rk628 cru driver"
This reverts commit a416ee3e3a.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Idabb47fae0858cb0a08d5287f10afbb7df36fdaf
2024-01-21 14:48:48 +08:00
Tao Huang
e6cc02852f Revert "mfd: Add rk628 mfd driver"
This reverts commit c4586725c3.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4db854aba469d30d19ec79aa84e830745ca9a53e
2024-01-21 14:48:48 +08:00
Tao Huang
584b0a507c Revert "drm/rockchip: Add rk628 display driver"
This reverts commit e285c9b20e.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I2191d5af2103a5edd37f0d9a23ec02e0d81d6d77
2024-01-21 14:48:48 +08:00
Tao Huang
af15978793 Revert "drm/rockchip: rk628: Add hdmi driver"
This reverts commit 8c58b4696e.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: If76a4a40241ce47e3ac1e7eb53dcd9168073903f
2024-01-21 14:48:48 +08:00
Tao Huang
88f9a01d8d Revert "drm/rockchip/rk628: Add GVI driver"
This reverts commit fe736116ba.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I3381fffc5992c55e20c7d9dd7db999ca7b234f44
2024-01-21 14:48:48 +08:00
Tao Huang
3506b5e5dd Revert "drm: rockchip: rk628: Add rk628 combrx-phy driver"
This reverts commit 92ae0beb2b.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I3ac211f4b6359a6e875fb97626938e8d6a0876ad
2024-01-21 14:48:48 +08:00
Tao Huang
79ea8d176f Revert "drm: rockchip: rk628: Add rk628 hdmirx driver"
This reverts commit c0a543e874.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I93343d1b4d9110b30c9b9e7010e41bedad6a597a
2024-01-21 14:48:47 +08:00
Tao Huang
404c9aa46e Revert "pinctrl: rk628: add rk628 pinctrl driver"
This reverts commit 136c56731b.
This reverts commit 4a70b21012.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: If2a96546cefa1453af4229d06563235d447fd8e6
2024-01-21 14:48:34 +08:00
Tao Huang
f15ea98e91 Revert "nvmem: rk628-efuse: add rk628 efuse driver"
This reverts commit a939cdfe9d.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I6b44046b6f8999c84d4380710c9751efd0c14daf
2024-01-21 14:34:25 +08:00
Lan Honglin
c10152d3e7 media: i2c: sc450ai: add 1344X760 config
fix i2c communication error when fastae convergence too slow

Change-Id: Id5f522f139aa1f2982877efac45179830478d4c1
Signed-off-by: Lan Honglin <helin.lan@rock-chips.com>
2024-01-19 21:02:38 +08:00
Sandy Huang
f1f585a98a drm/rockchip: vop2: force to disable cluster-win1 when cluster-win0 is disabled
the IC designed need use cluster-win0 first, and at the following case, will
appear close cluster-win0 before cluster-win1 and lead to panic:

reboot:
  -> drm_file_free()@drm_file.c
    -> drm_fb_release(file);
      -> schedule_work(&arg.work)
        -> drm_mode_rmfb_work_fn()
	  -> drm_framebuffer_remove(fb)
	    -> atomic_remove_fb(fb);
	      -> drm_atomic_commit(state);
  		 -> drm_atomic_helper_check
		   -> drm_atomic_normalize_zpos
		      -> vop2_plane_atomic_check
			 -> vop2_cluster_two_win_mode_check[panic]

error log:
[ 46.626480][ T27] pc : vop2_cluster_two_win_mode_check+0xd8/0x160
[ 46.626692][ T17] binder: send failed reply for transaction 35888, target dead
[ 46.627357][ T27] lr : vop2_plane_atomic_check+0x5e0/0x790
...
[ 46.638943][ T27] Call trace:
[ 46.639227][ T27] vop2_cluster_two_win_mode_check+0xd8/0x160
[ 46.639759][ T27] vop2_plane_atomic_check+0x5e0/0x790
[ 46.640241][ T27] drm_atomic_helper_check_planes+0xf0/0x1f8
[ 46.640768][ T27] drm_atomic_helper_check+0x50/0x90
[ 46.641234][ T27] drm_atomic_check_only+0x428/0x920
[ 46.641711][ T27] drm_atomic_commit+0x5c/0xd0
[ 46.642124][ T27] drm_framebuffer_remove+0x278/0x47c
[ 46.642596][ T27] drm_mode_rmfb_work_fn+0x40/0xa8
[ 46.643044][ T27] process_one_work+0x1a8/0x3b8
[ 46.643474][ T27] worker_thread+0x300/0x430
[ 46.643875][ T27] kthread+0xec/0x1b8
[ 46.644230][ T27] ret_from_fork+0x10/0x20

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I4ebfe9715515e3b547138461975d32fbd0441e85
2024-01-19 20:44:12 +08:00