disp: msm: add display frequency change notification
Added notifier to inform registered consumers about display changing frequency. Change-Id: Ic619b233a03f002862d059bfea671d7b2c5807af Signed-off-by: daiss1 <daiss1@lenovo.com> Reviewed-on: https://gerrit.mot.com/1465621 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Guobin Zhang <zhanggb@motorola.com> Submit-Approved: Jira Key (cherry picked from commit c69b88c83b5780c3ce858dbf362e0aa4a92b8c67) Reviewed-on: https://gerrit.mot.com/1467534 Submit-Approved: Qiang Nie <nieqiang@motorola.com> Tested-by: Qiang Nie <nieqiang@motorola.com> Reviewed-on: https://gerrit.mot.com/1509822 Reviewed-by: Hua Tan <tanhua1@motorola.com>
This commit is contained in:
1 parent
873665656a
commit
ec79d98bce
1 file changed
+8
@@ -18,6 +18,10 @@
|
||||
#include "sde_dbg.h"
|
||||
#include "dsi_display.h"
|
||||
|
||||
static struct blocking_notifier_head dsi_freq_head =
|
||||
BLOCKING_NOTIFIER_INIT(dsi_freq_head);
|
||||
EXPORT_SYMBOL_GPL(dsi_freq_head);
|
||||
|
||||
/**
|
||||
* topology is currently defined by a set of following 3 values:
|
||||
* 1. num of layer mixers
|
||||
@@ -4785,6 +4789,10 @@ int dsi_panel_pre_mode_switch_to_video(struct dsi_panel *panel)
|
||||
panel->name, rc);
|
||||
|
||||
mutex_unlock(&panel->panel_lock);
|
||||
/* notify consumers only if refresh rate has been updated */
|
||||
if (!rc)
|
||||
blocking_notifier_call_chain(&dsi_freq_head,
|
||||
(unsigned long)panel->cur_mode->timing.refresh_rate, NULL);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user