Loading drivers/gpu/drm/msm/sde/sde_kms.c +19 −5 Original line number Diff line number Diff line Loading @@ -1708,7 +1708,7 @@ static int sde_kms_pm_suspend(struct device *dev) struct drm_connector *conn; struct drm_atomic_state *state; struct sde_kms *sde_kms; int ret = 0; int ret = 0, num_crtcs = 0; if (!dev) return -EINVAL; Loading Loading @@ -1768,7 +1768,9 @@ static int sde_kms_pm_suspend(struct device *dev) drm_atomic_state_free(state); goto unlock; } } else if (lp != SDE_MODE_DPMS_LP2) { } if (lp != SDE_MODE_DPMS_LP2) { /* force CRTC to be inactive */ crtc_state = drm_atomic_get_crtc_state(state, conn->state->crtc); Loading @@ -1778,8 +1780,18 @@ static int sde_kms_pm_suspend(struct device *dev) drm_atomic_state_free(state); goto unlock; } if (lp != SDE_MODE_DPMS_LP1) crtc_state->active = false; ++num_crtcs; } } /* check for nothing to do */ if (num_crtcs == 0) { DRM_DEBUG("all crtcs are already in the off state\n"); drm_atomic_state_free(state); goto suspended; } /* commit the "disable all" state */ Loading @@ -1787,10 +1799,12 @@ static int sde_kms_pm_suspend(struct device *dev) if (ret < 0) { DRM_ERROR("failed to disable crtcs, %d\n", ret); drm_atomic_state_free(state); } else { sde_kms->suspend_block = true; goto unlock; } suspended: sde_kms->suspend_block = true; unlock: if (ret == -EDEADLK) { drm_modeset_backoff(&ctx); Loading Loading
drivers/gpu/drm/msm/sde/sde_kms.c +19 −5 Original line number Diff line number Diff line Loading @@ -1708,7 +1708,7 @@ static int sde_kms_pm_suspend(struct device *dev) struct drm_connector *conn; struct drm_atomic_state *state; struct sde_kms *sde_kms; int ret = 0; int ret = 0, num_crtcs = 0; if (!dev) return -EINVAL; Loading Loading @@ -1768,7 +1768,9 @@ static int sde_kms_pm_suspend(struct device *dev) drm_atomic_state_free(state); goto unlock; } } else if (lp != SDE_MODE_DPMS_LP2) { } if (lp != SDE_MODE_DPMS_LP2) { /* force CRTC to be inactive */ crtc_state = drm_atomic_get_crtc_state(state, conn->state->crtc); Loading @@ -1778,8 +1780,18 @@ static int sde_kms_pm_suspend(struct device *dev) drm_atomic_state_free(state); goto unlock; } if (lp != SDE_MODE_DPMS_LP1) crtc_state->active = false; ++num_crtcs; } } /* check for nothing to do */ if (num_crtcs == 0) { DRM_DEBUG("all crtcs are already in the off state\n"); drm_atomic_state_free(state); goto suspended; } /* commit the "disable all" state */ Loading @@ -1787,10 +1799,12 @@ static int sde_kms_pm_suspend(struct device *dev) if (ret < 0) { DRM_ERROR("failed to disable crtcs, %d\n", ret); drm_atomic_state_free(state); } else { sde_kms->suspend_block = true; goto unlock; } suspended: sde_kms->suspend_block = true; unlock: if (ret == -EDEADLK) { drm_modeset_backoff(&ctx); Loading