Loading drivers/gpu/drm/msm/sde/sde_connector.c +7 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <linux/backlight.h> #include "dsi_drm.h" #include "dsi_display.h" #include "sde_crtc.h" #define BL_NODE_NAME_SIZE 32 Loading Loading @@ -611,6 +612,12 @@ static void sde_connector_atomic_reset(struct drm_connector *connector) c_conn = to_sde_connector(connector); if (connector->state && !sde_crtc_is_reset_required(connector->state->crtc)) { SDE_DEBUG_CONN(c_conn, "avoid reset for connector\n"); return; } if (connector->state) { sde_connector_atomic_destroy_state(connector, connector->state); connector->state = 0; Loading drivers/gpu/drm/msm/sde/sde_crtc.c +8 −1 Original line number Diff line number Diff line Loading @@ -3662,9 +3662,16 @@ static void sde_crtc_reset(struct drm_crtc *crtc) } /* revert suspend actions, if necessary */ if (sde_kms_is_suspend_state(crtc->dev)) if (sde_kms_is_suspend_state(crtc->dev)) { _sde_crtc_set_suspend(crtc, false); if (!sde_crtc_is_reset_required(crtc)) { SDE_DEBUG("avoiding reset for crtc:%d\n", crtc->base.id); return; } } /* remove previous state, if present */ if (crtc->state) { sde_crtc_destroy_state(crtc, crtc->state); Loading drivers/gpu/drm/msm/sde/sde_crtc.h +24 −0 Original line number Diff line number Diff line Loading @@ -573,6 +573,30 @@ static inline u32 sde_crtc_get_inline_prefill(struct drm_crtc *crtc) cstate->sbuf_prefill_line : 0; } /** * sde_crtc_is_reset_required - validate the reset request based on the * pm_suspend and crtc's active status. crtc's are left active * on pm_suspend during LP1/LP2 states, as the display is still * left ON. Avoid reset for the subsequent pm_resume in such cases. * @crtc: Pointer to crtc * return: false if in suspend state and crtc active, true otherwise */ static inline bool sde_crtc_is_reset_required(struct drm_crtc *crtc) { /* * reset is required even when there is no crtc_state as it is required * to create the initial state object */ if (!crtc || !crtc->state) return true; /* reset not required if crtc is active during suspend state */ if (sde_kms_is_suspend_state(crtc->dev) && crtc->state->active) return false; return true; } /** * sde_crtc_event_queue - request event callback * @crtc: Pointer to drm crtc structure Loading drivers/gpu/drm/msm/sde/sde_plane.c +5 −0 Original line number Diff line number Diff line Loading @@ -4387,6 +4387,11 @@ static void sde_plane_reset(struct drm_plane *plane) psde = to_sde_plane(plane); SDE_DEBUG_PLANE(psde, "\n"); if (plane->state && !sde_crtc_is_reset_required(plane->state->crtc)) { SDE_DEBUG_PLANE(psde, "avoid reset for plane\n"); return; } /* remove previous state, if present */ if (plane->state) { sde_plane_destroy_state(plane, plane->state); Loading Loading
drivers/gpu/drm/msm/sde/sde_connector.c +7 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <linux/backlight.h> #include "dsi_drm.h" #include "dsi_display.h" #include "sde_crtc.h" #define BL_NODE_NAME_SIZE 32 Loading Loading @@ -611,6 +612,12 @@ static void sde_connector_atomic_reset(struct drm_connector *connector) c_conn = to_sde_connector(connector); if (connector->state && !sde_crtc_is_reset_required(connector->state->crtc)) { SDE_DEBUG_CONN(c_conn, "avoid reset for connector\n"); return; } if (connector->state) { sde_connector_atomic_destroy_state(connector, connector->state); connector->state = 0; Loading
drivers/gpu/drm/msm/sde/sde_crtc.c +8 −1 Original line number Diff line number Diff line Loading @@ -3662,9 +3662,16 @@ static void sde_crtc_reset(struct drm_crtc *crtc) } /* revert suspend actions, if necessary */ if (sde_kms_is_suspend_state(crtc->dev)) if (sde_kms_is_suspend_state(crtc->dev)) { _sde_crtc_set_suspend(crtc, false); if (!sde_crtc_is_reset_required(crtc)) { SDE_DEBUG("avoiding reset for crtc:%d\n", crtc->base.id); return; } } /* remove previous state, if present */ if (crtc->state) { sde_crtc_destroy_state(crtc, crtc->state); Loading
drivers/gpu/drm/msm/sde/sde_crtc.h +24 −0 Original line number Diff line number Diff line Loading @@ -573,6 +573,30 @@ static inline u32 sde_crtc_get_inline_prefill(struct drm_crtc *crtc) cstate->sbuf_prefill_line : 0; } /** * sde_crtc_is_reset_required - validate the reset request based on the * pm_suspend and crtc's active status. crtc's are left active * on pm_suspend during LP1/LP2 states, as the display is still * left ON. Avoid reset for the subsequent pm_resume in such cases. * @crtc: Pointer to crtc * return: false if in suspend state and crtc active, true otherwise */ static inline bool sde_crtc_is_reset_required(struct drm_crtc *crtc) { /* * reset is required even when there is no crtc_state as it is required * to create the initial state object */ if (!crtc || !crtc->state) return true; /* reset not required if crtc is active during suspend state */ if (sde_kms_is_suspend_state(crtc->dev) && crtc->state->active) return false; return true; } /** * sde_crtc_event_queue - request event callback * @crtc: Pointer to drm crtc structure Loading
drivers/gpu/drm/msm/sde/sde_plane.c +5 −0 Original line number Diff line number Diff line Loading @@ -4387,6 +4387,11 @@ static void sde_plane_reset(struct drm_plane *plane) psde = to_sde_plane(plane); SDE_DEBUG_PLANE(psde, "\n"); if (plane->state && !sde_crtc_is_reset_required(plane->state->crtc)) { SDE_DEBUG_PLANE(psde, "avoid reset for plane\n"); return; } /* remove previous state, if present */ if (plane->state) { sde_plane_destroy_state(plane, plane->state); Loading