Skip to content

Commit

Permalink
Revert "drivers: qpnp-fg-gen3/mdss: Queue work on power efficient WQ"
Browse files Browse the repository at this point in the history
This reverts commit 931b1c9.

Change-Id: fbb1c2a4b2efd540f8e9976067bc366e5f94dbeb
Signed-off-by: TogoFire <togofire@mailfence.com>
  • Loading branch information
TogoFire committed Apr 22, 2023
1 parent 0c1ce35 commit 24ae720
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
18 changes: 9 additions & 9 deletions drivers/power/supply/qcom/qpnp-fg-gen3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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));
}

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)) {
Expand Down
3 changes: 1 addition & 2 deletions drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 24ae720

Please sign in to comment.