From 24ae7209a9022ef184019523762918e0a13217a2 Mon Sep 17 00:00:00 2001 From: Togo 77 Date: Sat, 15 Apr 2023 15:51:53 -0300 Subject: [PATCH] Revert "drivers: qpnp-fg-gen3/mdss: Queue work on power efficient WQ" This reverts commit 931b1c9855f02ce5fdb5990a85fb2ae91a27302d. Change-Id: fbb1c2a4b2efd540f8e9976067bc366e5f94dbeb Signed-off-by: TogoFire --- drivers/power/supply/qcom/qpnp-fg-gen3.c | 18 +++++++++--------- drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/power/supply/qcom/qpnp-fg-gen3.c b/drivers/power/supply/qcom/qpnp-fg-gen3.c index 8255646490a9..39d3b2f4bfa1 100644 --- a/drivers/power/supply/qcom/qpnp-fg-gen3.c +++ b/drivers/power/supply/qcom/qpnp-fg-gen3.c @@ -2647,7 +2647,7 @@ static void fg_ttf_update(struct fg_chip *chip) chip->ttf.last_ttf = 0; chip->ttf.last_ms = 0; mutex_unlock(&chip->ttf.lock); - queue_delayed_work(system_power_efficient_wq, &chip->ttf_work, msecs_to_jiffies(delay_ms)); + schedule_delayed_work(&chip->ttf_work, msecs_to_jiffies(delay_ms)); } static void restore_cycle_counter(struct fg_chip *chip) @@ -3383,7 +3383,7 @@ static void sram_dump_work(struct work_struct *work) fg_dbg(chip, FG_STATUS, "SRAM Dump done at %lld.%d\n", quotient, remainder); resched: - queue_delayed_work(system_power_efficient_wq, &chip->sram_dump_work, + schedule_delayed_work(&chip->sram_dump_work, msecs_to_jiffies(fg_sram_dump_period_ms)); } @@ -3411,7 +3411,7 @@ static int fg_sram_dump_sysfs(const char *val, const struct kernel_param *kp) chip = power_supply_get_drvdata(bms_psy); if (fg_sram_dump) - queue_delayed_work(system_power_efficient_wq, &chip->sram_dump_work, + schedule_delayed_work(&chip->sram_dump_work, msecs_to_jiffies(fg_sram_dump_period_ms)); else cancel_delayed_work_sync(&chip->sram_dump_work); @@ -3986,7 +3986,7 @@ static void ttf_work(struct work_struct *work) /* keep the wake lock and prime the IBATT and VBATT buffers */ if (ttf < 0) { /* delay for one FG cycle */ - queue_delayed_work(system_power_efficient_wq, &chip->ttf_work, + schedule_delayed_work(&chip->ttf_work, msecs_to_jiffies(1500)); mutex_unlock(&chip->ttf.lock); return; @@ -4003,7 +4003,7 @@ static void ttf_work(struct work_struct *work) } /* recurse every 10 seconds */ - queue_delayed_work(system_power_efficient_wq, &chip->ttf_work, msecs_to_jiffies(10000)); + schedule_delayed_work(&chip->ttf_work, msecs_to_jiffies(10000)); end_work: vote(chip->awake_votable, TTF_PRIMING, false, 0); mutex_unlock(&chip->ttf.lock); @@ -4831,7 +4831,7 @@ static irqreturn_t fg_batt_missing_irq_handler(int irq, void *data) } clear_battery_profile(chip); - queue_delayed_work(system_power_efficient_wq, &chip->profile_load_work, 0); + schedule_delayed_work(&chip->profile_load_work, 0); if (chip->fg_psy) power_supply_changed(chip->fg_psy); @@ -5955,7 +5955,7 @@ static int fg_gen3_probe(struct platform_device *pdev) } device_init_wakeup(chip->dev, true); - queue_delayed_work(system_power_efficient_wq, &chip->profile_load_work, 0); + schedule_delayed_work(&chip->profile_load_work, 0); pr_debug("FG GEN3 driver probed successfully\n"); return 0; @@ -5992,9 +5992,9 @@ static int fg_gen3_resume(struct device *dev) if (rc < 0) pr_err("Error in configuring ESR timer, rc=%d\n", rc); - queue_delayed_work(system_power_efficient_wq, &chip->ttf_work, 0); + schedule_delayed_work(&chip->ttf_work, 0); if (fg_sram_dump) - queue_delayed_work(system_power_efficient_wq, &chip->sram_dump_work, + schedule_delayed_work(&chip->sram_dump_work, msecs_to_jiffies(fg_sram_dump_period_ms)); if (!work_pending(&chip->status_change_work)) { diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c index 0c78318cc764..059242f00766 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c +++ b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c @@ -1070,8 +1070,7 @@ int mdss_mdp_resource_control(struct mdss_mdp_ctl *ctl, u32 sw_event) * reached. This is to prevent the case where early wake * up is called but no frame update is sent. */ - queue_delayed_work(system_power_efficient_wq, - &ctx->delayed_off_clk_work, + schedule_delayed_work(&ctx->delayed_off_clk_work, CMD_MODE_IDLE_TIMEOUT); pr_debug("off work scheduled\n"); }