mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
PM / devfreq: rockchip_dmc: Fix rate when enter isp and dulaview statuses
As the frequency can't be changed in isp and dulaview statuses, the target frequency should be the bigger one, both in isp status or in dulaview status. Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com> Change-Id: Id9182d591f615304f24ccba5816424a876046dc3
This commit is contained in:
@@ -142,13 +142,12 @@ struct rockchip_dmcfreq {
|
||||
unsigned long video_4k_rate;
|
||||
unsigned long video_4k_10b_rate;
|
||||
unsigned long performance_rate;
|
||||
unsigned long dualview_rate;
|
||||
unsigned long hdmi_rate;
|
||||
unsigned long idle_rate;
|
||||
unsigned long suspend_rate;
|
||||
unsigned long reboot_rate;
|
||||
unsigned long boost_rate;
|
||||
unsigned long isp_rate;
|
||||
unsigned long fixed_rate;
|
||||
unsigned long low_power_rate;
|
||||
unsigned long vop_req_rate;
|
||||
|
||||
@@ -2005,9 +2004,6 @@ static int rockchip_get_system_status_rate(struct device_node *np,
|
||||
case SYS_STATUS_PERFORMANCE:
|
||||
dmcfreq->performance_rate = freq * 1000;
|
||||
break;
|
||||
case SYS_STATUS_LCDC0 | SYS_STATUS_LCDC1:
|
||||
dmcfreq->dualview_rate = freq * 1000;
|
||||
break;
|
||||
case SYS_STATUS_HDMI:
|
||||
dmcfreq->hdmi_rate = freq * 1000;
|
||||
break;
|
||||
@@ -2023,9 +2019,10 @@ static int rockchip_get_system_status_rate(struct device_node *np,
|
||||
case SYS_STATUS_ISP:
|
||||
case SYS_STATUS_CIF0:
|
||||
case SYS_STATUS_CIF1:
|
||||
case SYS_STATUS_DUALVIEW:
|
||||
temp_rate = freq * 1000;
|
||||
if (dmcfreq->isp_rate < temp_rate)
|
||||
dmcfreq->isp_rate = temp_rate;
|
||||
if (dmcfreq->fixed_rate < temp_rate)
|
||||
dmcfreq->fixed_rate = temp_rate;
|
||||
break;
|
||||
case SYS_STATUS_LOW_POWER:
|
||||
dmcfreq->low_power_rate = freq * 1000;
|
||||
@@ -2064,19 +2061,11 @@ static int rockchip_dmcfreq_system_status_notifier(struct notifier_block *nb,
|
||||
unsigned int refresh = false;
|
||||
bool is_fixed = false;
|
||||
|
||||
if (dmcfreq->dualview_rate && is_dualview(status) &&
|
||||
dmcfreq->isp_rate && is_isp(status))
|
||||
return NOTIFY_OK;
|
||||
|
||||
if (dmcfreq->dualview_rate && is_dualview(status)) {
|
||||
target_rate = dmcfreq->dualview_rate;
|
||||
is_fixed = true;
|
||||
goto next;
|
||||
}
|
||||
|
||||
if (dmcfreq->isp_rate && is_isp(status)) {
|
||||
target_rate = dmcfreq->isp_rate;
|
||||
if (dmcfreq->fixed_rate && (is_dualview(status) || is_isp(status))) {
|
||||
if (dmcfreq->is_fixed)
|
||||
return NOTIFY_OK;
|
||||
is_fixed = true;
|
||||
target_rate = dmcfreq->fixed_rate;
|
||||
goto next;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user