disp: msm: sde: trigger pm_qos vote with encoder idle pc

Commit d46cae019e ("disp: msm: sde: trigger pm_qos vote
with irq enable") moves the pm_qos vote with irq
enable/disable state. Such irq enable/disable call may be
triggered from atomic context and lead to scheduling issues
due to mutex_lock usage in pm_qos APIs. This change moves
the vote with encoder idle pc to allow lock usage with sleep.

Change-Id: I2d22566fbfb5399c5d2d2a4efe882a1928cfbbf8
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
Dhaval Patel
2020-07-14 12:17:21 -07:00
부모 5e96ba152b
커밋 5a6facc39e
4개의 변경된 파일17개의 추가작업 그리고 25개의 파일을 삭제

파일 보기

@@ -222,8 +222,6 @@ struct sde_irq_callback {
* @enable_counts array of IRQ enable counts
* @cb_lock: callback lock
* @debugfs_file: debugfs file for irq statistics
* @curr_irq_enable_count: Atomic counter keep track of total current irq enable
* It is used to keep pm_qos vote on CPU.
*/
struct sde_irq {
u32 total_irqs;
@@ -232,7 +230,6 @@ struct sde_irq {
atomic_t *irq_counts;
spinlock_t cb_lock;
struct dentry *debugfs_file;
atomic_t curr_irq_enable_count;
};
/**
@@ -308,6 +305,7 @@ struct sde_kms {
bool pm_suspend_clk_dump;
cpumask_t irq_cpu_mask;
atomic_t irq_vote_count;
struct dev_pm_qos_request pm_qos_irq_req[NR_CPUS];
struct irq_affinity_notify affinity_notify;
};
@@ -684,12 +682,12 @@ void sde_kms_timeline_status(struct drm_device *dev);
int sde_kms_handle_recovery(struct drm_encoder *encoder);
/**
* Notifies the irq enable on first interrupt enable and irq disable
* on last interrupt disable.
* @sde_kms: poiner to sde_kms structure
* @enable: true if irq enabled, false for disabled state.
* sde_kms_cpu_vote_for_irq() - API to keep pm_qos latency vote on cpu
* where mdss_irq is scheduled
* @sde_kms: pointer to sde_kms structure
* @enable: true if enable request, false otherwise.
*/
void sde_kms_irq_enable_notify(struct sde_kms *sde_kms, bool enable);
void sde_kms_cpu_vote_for_irq(struct sde_kms *sde_kms, bool enable);
/**
* sde_kms_get_io_resources() - reads associated register range