Skip to content

Commit

Permalink
camera_v2-legacy: fix qos update warning
Browse files Browse the repository at this point in the history
qos requirement is not inited when update is called.

[   12.682308] msm_pm_qos_update_request: update request 100
[   12.682315] ------------[ cut here ]------------
[   12.682335] WARNING: at /home/cocafe/android/kernel/cocore-x/kernel/kernel/power/qos.c:570 pm_qos_update_request+0x1d0/0x2c8()
[   12.682342] pm_qos_update_request() called for unknown object
[   12.682350] Modules linked in: wlan fm_drv brcm_bt_drv brcm_hci_ldisc kscl ecryptfs
[   12.682371] CPU: 3 PID: 1311 Comm: cammw:sensor Tainted: G        W    3.10.84-cocore-x-g184e4f6c-dirty Pierre2324#3
[   12.682377] Call trace:
[   12.682386] [<ffffffc000088ae8>] dump_backtrace+0x0/0x148
[   12.682393] [<ffffffc000088c40>] show_stack+0x10/0x20
[   12.682403] [<ffffffc000fbf398>] dump_stack+0x1c/0x28
[   12.682409] [<ffffffc0000a25ac>] warn_slowpath_fmt+0x8c/0x100
[   12.682416] [<ffffffc00010ca74>] pm_qos_update_request+0x1cc/0x2c8
[   12.682424] [<ffffffc0009335ac>] msm_pm_qos_update_request+0x3c/0x50
[   12.682429] [<ffffffc00093476c>] camera_v4l2_open+0x164/0x4f0
[   12.682437] [<ffffffc0008c70f4>] v4l2_open+0x9c/0x110
[   12.682444] [<ffffffc00020be04>] chrdev_open+0xa4/0x200
[   12.682452] [<ffffffc000201344>] finish_open+0x1fc/0x2b0
[   12.682459] [<ffffffc000218058>] do_last.isra.12+0x4a8/0xcd0
[   12.682465] [<ffffffc000219c10>] path_openat.isra.13+0x108/0x910
[   12.682471] [<ffffffc00021be64>] do_filp_open+0x2c/0x98
[   12.682476] [<ffffffc000202e68>] do_sys_open+0xf8/0x1e8
[   12.682482] [<ffffffc00026a760>] compat_SyS_openat+0x8/0x18
[   12.682486] ---[ end trace a76b7252eed261da ]---

msm_pm_qos_remove_request: remove request
        : pm_qos_remove_request() called for unknown object
        : ------------[ cut here ]------------
        : WARNING: CPU: 3 PID: 6528 at kernel/power/qos.c:744 pm_qos_remove_request+0x130/0x14c
        : Modules linked in: wlan(O) texfat(PO) machine_ext_dlkm(O) machine_dlkm(O) wcd9335_dlkm(O) cpe_lsm_dlkm(O) wcd_cpe_dlkm(O) analog_cdc_dlkm(O) digital_cdc_dlkm(O) stub_dlkm(O) mbhc_dlkm(O) wsa881x_analog_dlkm(O) wsa881x_dlkm(O) wcd9xxx_dlkm(O) wcd_core_dlkm(O) hdmi_dlkm(O) swr_ctrl_dlkm(O) swr_dlkm(O) pinctrl_wcd_dlkm(O) native_dlkm(O) platform_dlkm(O) usf_dlkm(O) q6_dlkm(O) adsp_loader_dlkm(O) apr_dlkm(O) q6_notifier_dlkm(O)
        : CPU: 3 PID: 6528 Comm: [email protected] Tainted: P S         O    4.9.334+ Pierre2324#2
Hardware name: Qualcomm Technologies, Inc. SDM632 PMI632 MTP S3 (DT)
task    : 0000000067cf7cc5 task.stack: 00000000648a024e
        : PC is at pm_qos_remove_request+0x130/0x14c
        : LR is at pm_qos_remove_request+0x130/0x14c
pc      : [<ffffff9dee934148>] lr : [<ffffff9dee934148>] pstate: 60400145
sp      : ffffffe2b6d0b9f0
        : x29: ffffffe2b6d0b9f0 x28: ffffffe2213498a8
        : x27: 0000000000000009 x26: ffffffe27f70c400
        : x25: ffffff9df0745000 x24: ffffff9df10fd4e0
        : x23: ffffffe2e6d96030 x22: ffffff9defd6e210
        : x21: ffffff9defd6e227 x20: ffffff9df07450a0
        : x19: ffffff9df10fd3b0 x18: 0000000000000000
        : x17: 00000000000c5fc8 x16: 0000000000000000
        : x15: 0000004501639000 x14: ffffffe2b6d0b7e0
        : x13: 0000000000000004 x12: 000000006ff1b4c0
        : x11: 0000000000000015 x10: 000000000682aaab
        : x9 : c366d0a2f1cecf00 x8 : c366d0a2f1cecf00
        : x7 : 0000000000000000 x6 : ffffffe2f15a6079
        : x5 : 0000000000000000 x4 : 0000000000000004
        : x3 : ffffffe2b6d0b738 x2 : ffffff9dee892414
        : x1 : ffffff9dee93acb8 x0 : 0000000000000031
PC      : pm_qos_remove_request+0xf0/0x14c:

Signed-off-by: Ji Huang <[email protected]>

Change-Id: Icc745fa61565e6a3dfc39ffab8c51eada7d674aa
  • Loading branch information
cocafe authored and haikaru17 committed Jul 10, 2024
1 parent 5441b2b commit 8ea1bb7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/media/platform/msm/camera_v2-legacy/msm.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,16 @@ static inline void msm_pm_qos_add_request(void)
static void msm_pm_qos_remove_request(void)
{
pr_info("%s: remove request\n", __func__);
pm_qos_remove_request(&msm_v4l2_pm_qos_request);
if (pm_qos_request_active(&msm_v4l2_pm_qos_request))
pm_qos_remove_request(&msm_v4l2_pm_qos_request);
}

void msm_pm_qos_update_request(int val)
{
pr_info("%s: update request %d\n", __func__, val);
msm_pm_qos_add_request();
pm_qos_update_request(&msm_v4l2_pm_qos_request, val);
if (pm_qos_request_active(&msm_v4l2_pm_qos_request))
pm_qos_update_request(&msm_v4l2_pm_qos_request, val);
}

struct msm_session *msm_session_find(unsigned int session_id)
Expand Down

0 comments on commit 8ea1bb7

Please sign in to comment.