techpack: display: Notify on fps change events
Change-Id: Idea8ae6ae4a2edd02188bb78140585b61a99bd9f
This commit is contained in:
parent
4f09bc86cc
commit
efcde3edaf
@ -22,6 +22,8 @@
|
||||
#define MI_DISP_DPMS_EVENT 0x01
|
||||
/* A hardware display power mode state early change occurred */
|
||||
#define MI_DISP_DPMS_EARLY_EVENT 0x02
|
||||
/* A hardware display mode state after fps changed */
|
||||
#define MI_DISP_FPS_CHANGE_EVENT 0xF628
|
||||
|
||||
enum {
|
||||
/* panel: power on */
|
||||
|
@ -7584,6 +7584,8 @@ int dsi_display_set_mode(struct dsi_display *display,
|
||||
int rc = 0;
|
||||
struct dsi_display_mode adj_mode;
|
||||
struct dsi_mode_info timing;
|
||||
struct mi_disp_notifier notify_data;
|
||||
int fps;
|
||||
|
||||
if (!display || !mode || !display->panel) {
|
||||
DSI_ERR("Invalid params\n");
|
||||
@ -7628,6 +7630,10 @@ int dsi_display_set_mode(struct dsi_display *display,
|
||||
timing.h_active, timing.v_active, timing.refresh_rate);
|
||||
|
||||
if (display->panel->cur_mode->timing.refresh_rate != timing.refresh_rate) {
|
||||
fps = timing.refresh_rate;
|
||||
notify_data.data = &fps;
|
||||
notify_data.disp_id = mi_get_disp_id(display);
|
||||
mi_disp_notifier_call_chain(MI_DISP_FPS_CHANGE_EVENT, ¬ify_data);
|
||||
sysfs_notify(&display->dev->kobj, NULL, "dynamic_fps");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user