mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
Merge "drm/msm/sde: Send blank notification only when CRTC active changed"
This commit is contained in:
commit
ac2b2415af
@ -239,11 +239,14 @@ msm_disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
|
||||
DRM_DEBUG_ATOMIC("disabling [ENCODER:%d:%s]\n",
|
||||
encoder->base.id, encoder->name);
|
||||
|
||||
blank = MSM_DRM_BLANK_POWERDOWN;
|
||||
notifier_data.data = ␣
|
||||
notifier_data.id = crtc_idx;
|
||||
msm_drm_notifier_call_chain(MSM_DRM_EARLY_EVENT_BLANK,
|
||||
¬ifier_data);
|
||||
if (connector->state->crtc &&
|
||||
connector->state->crtc->state->active_changed) {
|
||||
blank = MSM_DRM_BLANK_POWERDOWN;
|
||||
notifier_data.data = ␣
|
||||
notifier_data.id = crtc_idx;
|
||||
msm_drm_notifier_call_chain(MSM_DRM_EARLY_EVENT_BLANK,
|
||||
¬ifier_data);
|
||||
}
|
||||
/*
|
||||
* Each encoder has at most one connector (since we always steal
|
||||
* it away), so we won't call disable hooks twice.
|
||||
@ -259,8 +262,12 @@ msm_disable_outputs(struct drm_device *dev, struct drm_atomic_state *old_state)
|
||||
funcs->dpms(encoder, DRM_MODE_DPMS_OFF);
|
||||
|
||||
drm_bridge_post_disable(encoder->bridge);
|
||||
msm_drm_notifier_call_chain(MSM_DRM_EVENT_BLANK,
|
||||
¬ifier_data);
|
||||
if (connector->state->crtc &&
|
||||
connector->state->crtc->state->active_changed) {
|
||||
DRM_DEBUG_ATOMIC("Notify blank\n");
|
||||
msm_drm_notifier_call_chain(MSM_DRM_EVENT_BLANK,
|
||||
¬ifier_data);
|
||||
}
|
||||
}
|
||||
|
||||
for_each_crtc_in_state(old_state, crtc, old_crtc_state, i) {
|
||||
@ -465,7 +472,8 @@ static void msm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
|
||||
DRM_DEBUG_ATOMIC("enabling [ENCODER:%d:%s]\n",
|
||||
encoder->base.id, encoder->name);
|
||||
|
||||
if (connector->state->crtc->state->active_changed) {
|
||||
if (connector->state->crtc &&
|
||||
connector->state->crtc->state->active_changed) {
|
||||
blank = MSM_DRM_BLANK_UNBLANK;
|
||||
notifier_data.data = ␣
|
||||
notifier_data.id =
|
||||
@ -522,7 +530,8 @@ static void msm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
|
||||
encoder->base.id, encoder->name);
|
||||
|
||||
drm_bridge_enable(encoder->bridge);
|
||||
if (connector->state->crtc->state->active_changed) {
|
||||
if (connector->state->crtc &&
|
||||
connector->state->crtc->state->active_changed) {
|
||||
DRM_DEBUG_ATOMIC("Notify unblank\n");
|
||||
msm_drm_notifier_call_chain(MSM_DRM_EVENT_BLANK,
|
||||
¬ifier_data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user