diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_display.c b/drivers/gpu/drm/msm/dsi-staging/dsi_display.c index ec9bdb8178cd..af1ce9165ba3 100644 --- a/drivers/gpu/drm/msm/dsi-staging/dsi_display.c +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_display.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include "msm_drv.h" #include "sde_connector.h" @@ -233,7 +233,7 @@ int dsi_display_set_backlight(struct drm_connector *connector, goto error; } - if (drm_dev && (drm_dev->doze_state == DRM_BLANK_LP1 || drm_dev->doze_state == DRM_BLANK_LP2)) { + if (drm_dev && (drm_dev->doze_state == MSM_DRM_BLANK_LP1 || drm_dev->doze_state == MSM_DRM_BLANK_LP2)) { rc = dsi_panel_set_doze_backlight(display, (u32)bl_temp); if (rc) pr_err("unable to set doze backlight\n"); @@ -1236,8 +1236,8 @@ int dsi_display_set_power(struct drm_connector *connector, int power_mode, void *disp) { struct dsi_display *display = disp; + struct msm_drm_notifier g_notify_data; int rc = 0; - struct drm_notify_data g_notify_data; struct drm_device *dev = NULL; int event = 0; @@ -1259,21 +1259,21 @@ int dsi_display_set_power(struct drm_connector *connector, pr_info("%s %d\n", __func__, event); switch (power_mode) { case SDE_MODE_DPMS_LP1: - drm_notifier_call_chain(DRM_EARLY_EVENT_BLANK, &g_notify_data); + msm_drm_notifier_call_chain(MSM_DRM_EARLY_EVENT_BLANK, &g_notify_data); rc = dsi_panel_set_lp1(display->panel); - drm_notifier_call_chain(DRM_EVENT_BLANK, &g_notify_data); + msm_drm_notifier_call_chain(MSM_DRM_EVENT_BLANK, &g_notify_data); break; case SDE_MODE_DPMS_LP2: - drm_notifier_call_chain(DRM_EARLY_EVENT_BLANK, &g_notify_data); + msm_drm_notifier_call_chain(MSM_DRM_EARLY_EVENT_BLANK, &g_notify_data); rc = dsi_panel_set_lp2(display->panel); - drm_notifier_call_chain(DRM_EVENT_BLANK, &g_notify_data); + msm_drm_notifier_call_chain(MSM_DRM_EVENT_BLANK, &g_notify_data); break; case SDE_MODE_DPMS_ON: if (display->panel->power_mode == SDE_MODE_DPMS_LP1 || display->panel->power_mode == SDE_MODE_DPMS_LP2) { - drm_notifier_call_chain(DRM_EARLY_EVENT_BLANK, &g_notify_data); + msm_drm_notifier_call_chain(MSM_DRM_EARLY_EVENT_BLANK, &g_notify_data); rc = dsi_panel_set_nolp(display->panel); - drm_notifier_call_chain(DRM_EVENT_BLANK, &g_notify_data); + msm_drm_notifier_call_chain(MSM_DRM_EVENT_BLANK, &g_notify_data); } break; case SDE_MODE_DPMS_OFF: diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c index 2d7936278fba..1fb76e553707 100644 --- a/drivers/gpu/drm/msm/msm_atomic.c +++ b/drivers/gpu/drm/msm/msm_atomic.c @@ -73,11 +73,12 @@ EXPORT_SYMBOL(msm_drm_unregister_client); * @v: notifier data, inculde display id and display blank * event(unblank or power down). */ -static int msm_drm_notifier_call_chain(unsigned long val, void *v) +int msm_drm_notifier_call_chain(unsigned long val, void *v) { return blocking_notifier_call_chain(&msm_drm_notifier_list, val, v); } +EXPORT_SYMBOL(msm_drm_notifier_call_chain); /* block until specified crtcs are no longer pending update, and * atomically mark them as pending update diff --git a/include/linux/msm_drm_notify.h b/include/linux/msm_drm_notify.h index 924ba852c99c..4f9b32662ad5 100644 --- a/include/linux/msm_drm_notify.h +++ b/include/linux/msm_drm_notify.h @@ -23,6 +23,10 @@ enum { /* panel: power on */ MSM_DRM_BLANK_UNBLANK, + MSM_DRM_BLANK_LP1, + MSM_DRM_BLANK_LP2, + MSM_DRM_BLANK_STANDBY, + MSM_DRM_BLANK_SUSPEND, /* panel: power off */ MSM_DRM_BLANK_POWERDOWN, }; @@ -42,4 +46,5 @@ struct msm_drm_notifier { int msm_drm_register_client(struct notifier_block *nb); int msm_drm_unregister_client(struct notifier_block *nb); +int msm_drm_notifier_call_chain(unsigned long val, void *v); #endif