disp: msm: dp: add qos vote during hdcp authentication
HDCP authentication has strict timing requirements and if the display is on static screen during this time, it is possible that SDE removes the QOS vote when it detects static display, thereby affecting the hdcp authentication process. This change adds qos support in dp driver to vote exclusively for DP. If valid QOS settings are provided in dtsi, then the driver adds the vote when it starts authentication and removes the vote when authentication is completed. Change-Id: I1d8bc098d0857b13fdf1ca089b6dd2d3f381bdb8 Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
Šī revīzija ir iekļauta:
@@ -13,6 +13,7 @@
|
||||
#include <linux/soc/qcom/fsa4480-i2c.h>
|
||||
#include <linux/usb/phy.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/pm_qos.h>
|
||||
|
||||
#include "sde_connector.h"
|
||||
|
||||
@@ -201,6 +202,8 @@ struct dp_display_private {
|
||||
u32 tot_dsc_blks_in_use;
|
||||
|
||||
bool process_hpd_connect;
|
||||
struct dev_pm_qos_request pm_qos_req[NR_CPUS];
|
||||
bool pm_qos_requested;
|
||||
|
||||
struct notifier_block usb_nb;
|
||||
};
|
||||
@@ -285,6 +288,36 @@ static void dp_audio_enable(struct dp_display_private *dp, bool enable)
|
||||
}
|
||||
}
|
||||
|
||||
static void dp_display_qos_request(struct dp_display_private *dp, bool add_vote)
|
||||
{
|
||||
struct device *cpu_dev;
|
||||
int cpu = 0;
|
||||
struct cpumask *cpu_mask;
|
||||
u32 latency = dp->parser->qos_cpu_latency;
|
||||
unsigned long mask = dp->parser->qos_cpu_mask;
|
||||
|
||||
if (!dp->parser->qos_cpu_mask || (dp->pm_qos_requested == add_vote))
|
||||
return;
|
||||
|
||||
cpu_mask = to_cpumask(&mask);
|
||||
for_each_cpu(cpu, cpu_mask) {
|
||||
cpu_dev = get_cpu_device(cpu);
|
||||
if (!cpu_dev) {
|
||||
SDE_DEBUG("%s: failed to get cpu%d device\n", __func__, cpu);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (add_vote)
|
||||
dev_pm_qos_add_request(cpu_dev, &dp->pm_qos_req[cpu],
|
||||
DEV_PM_QOS_RESUME_LATENCY, latency);
|
||||
else
|
||||
dev_pm_qos_remove_request(&dp->pm_qos_req[cpu]);
|
||||
}
|
||||
|
||||
SDE_EVT32_EXTERNAL(add_vote, mask, latency);
|
||||
dp->pm_qos_requested = add_vote;
|
||||
}
|
||||
|
||||
static void dp_display_update_hdcp_status(struct dp_display_private *dp,
|
||||
bool reset)
|
||||
{
|
||||
@@ -499,6 +532,11 @@ static void dp_display_hdcp_process_state(struct dp_display_private *dp)
|
||||
dp->debug->force_encryption && ops && ops->force_encryption)
|
||||
ops->force_encryption(data, dp->debug->force_encryption);
|
||||
|
||||
if (status->hdcp_state == HDCP_STATE_AUTHENTICATED)
|
||||
dp_display_qos_request(dp, false);
|
||||
else
|
||||
dp_display_qos_request(dp, true);
|
||||
|
||||
switch (status->hdcp_state) {
|
||||
case HDCP_STATE_INACTIVE:
|
||||
dp_display_hdcp_register_streams(dp);
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user