Skip to content

Commit

Permalink
drivers: mdss: queue input handler functions to a high prio wq
Browse files Browse the repository at this point in the history
Since the input handler code on mdss is related to turn on clocks etc
when it detects a touch input (this has nothing to do with cpufreq) I
strongly believe it should be queued into a dedicated wq with higher
priority.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
  • Loading branch information
franciscofranco authored and TogoFire committed Apr 7, 2023
1 parent 80eac33 commit 1ea72b8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ struct mdss_mdp_cmd_ctx {
struct work_struct gate_clk_work;
struct delayed_work delayed_off_clk_work;
struct work_struct pp_done_work;
struct workqueue_struct *early_wakeup_clk_wq;
struct work_struct early_wakeup_clk_work;
atomic_t pp_done_cnt;
struct completion rdptr_done;
Expand Down Expand Up @@ -3505,7 +3506,9 @@ static int mdss_mdp_cmd_early_wake_up(struct mdss_mdp_ctl *ctl)
* Only schedule if the interface has not been stopped.
*/
if (ctx && !ctx->intf_stopped)
schedule_work(&ctx->early_wakeup_clk_work);
queue_work(ctx->early_wakeup_clk_wq,
&ctx->early_wakeup_clk_work);

return 0;
}

Expand All @@ -3528,6 +3531,8 @@ static int mdss_mdp_cmd_ctx_setup(struct mdss_mdp_ctl *ctl,
ctx->aux_pp_num = aux_pp_num;
ctx->pingpong_split_slave = pingpong_split_slave;
ctx->pp_timeout_report_cnt = 0;
ctx->early_wakeup_clk_wq
= alloc_workqueue("early_wakeup_clk_wq", WQ_HIGHPRI, 0);
init_waitqueue_head(&ctx->pp_waitq);
init_waitqueue_head(&ctx->rdptr_waitq);
init_completion(&ctx->stop_comp);
Expand Down

0 comments on commit 1ea72b8

Please sign in to comment.