disp: msm: sde: trigger pm_qos vote with irq enable

Video mode display keeps the MDP clocks in ON state but
disables irq during static screen to avoid cpu wakeup.
In such case, CPU pm_qos vote should also be removed
to allow LPM transition. This change triggers the
pm_qos vote based on mdp interrupt enable counts
instead of runtime_pm callback. It works for
multi-display concurrency also.

Change-Id: I7a60f3f593e409269e00abd7499c4a5756035615
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
Dhaval Patel
2020-05-18 17:57:59 -07:00
parent 281e18b317
commit d46cae019e
3 changed files with 36 additions and 5 deletions

View File

@@ -3004,7 +3004,7 @@ static int _sde_kms_active_override(struct sde_kms *sde_kms, bool enable)
return 0;
}
static void sde_kms_update_pm_qos_irq_request(struct sde_kms *sde_kms)
static void _sde_kms_update_pm_qos_irq_request(struct sde_kms *sde_kms)
{
struct device *cpu_dev;
int cpu = 0;
@@ -3033,7 +3033,7 @@ static void sde_kms_update_pm_qos_irq_request(struct sde_kms *sde_kms)
}
}
static void sde_kms_remove_pm_qos_irq_request(struct sde_kms *sde_kms)
static void _sde_kms_remove_pm_qos_irq_request(struct sde_kms *sde_kms)
{
struct device *cpu_dev;
int cpu = 0;
@@ -3057,6 +3057,14 @@ static void sde_kms_remove_pm_qos_irq_request(struct sde_kms *sde_kms)
}
}
void sde_kms_irq_enable_notify(struct sde_kms *sde_kms, bool enable)
{
if (enable)
_sde_kms_update_pm_qos_irq_request(sde_kms);
else
_sde_kms_remove_pm_qos_irq_request(sde_kms);
}
static void sde_kms_irq_affinity_notify(
struct irq_affinity_notify *affinity_notify,
const cpumask_t *mask)
@@ -3077,7 +3085,7 @@ static void sde_kms_irq_affinity_notify(
// request vote with updated irq cpu mask
if (sde_kms->irq_enabled)
sde_kms_update_pm_qos_irq_request(sde_kms);
_sde_kms_update_pm_qos_irq_request(sde_kms);
mutex_unlock(&priv->phandle.phandle_lock);
}
@@ -3104,9 +3112,7 @@ static void sde_kms_handle_power_event(u32 event_type, void *usr)
sde_kms_init_shared_hw(sde_kms);
_sde_kms_set_lutdma_vbif_remap(sde_kms);
sde_kms->first_kickoff = true;
sde_kms_update_pm_qos_irq_request(sde_kms);
} else if (event_type == SDE_POWER_EVENT_PRE_DISABLE) {
sde_kms_remove_pm_qos_irq_request(sde_kms);
sde_irq_update(msm_kms, false);
sde_kms->first_kickoff = false;
_sde_kms_active_override(sde_kms, true);