summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tidss/tidss_crtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/tidss/tidss_crtc.c')
-rw-r--r--drivers/gpu/drm/tidss/tidss_crtc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tidss/tidss_crtc.c b/drivers/gpu/drm/tidss/tidss_crtc.c
index 662353f81835..1f578079aa82 100644
--- a/drivers/gpu/drm/tidss/tidss_crtc.c
+++ b/drivers/gpu/drm/tidss/tidss_crtc.c
@@ -181,6 +181,10 @@ static void tidss_crtc_atomic_flush(struct drm_crtc *crtc,
drm_atomic_crtc_needs_modeset(crtc->state) ? "needs" : "doesn't need",
crtc->state->event);
+ /* There is nothing to do if CRTC is not going to be enabled. */
+ if (!crtc->state->active)
+ return;
+
/*
* Flush CRTC changes with go bit only if new modeset is not
* coming, so CRTC is enabled trough out the commit.
@@ -329,6 +333,16 @@ static void tidss_crtc_atomic_disable(struct drm_crtc *crtc,
dev_dbg(ddev->dev, "%s, event %p\n", __func__, crtc->state->event);
+ /*
+ * If a layer is left enabled when the videoport is disabled, and the
+ * vid pipeline that was used for the layer is taken into use on
+ * another videoport, the DSS will report sync lost issues. Disable all
+ * the layers here as a work-around.
+ */
+ for (u32 layer = 0; layer < tidss->feat->num_planes; layer++)
+ dispc_ovr_enable_layer(tidss->dispc, tcrtc->vp_idx, layer,
+ false);
+
reinit_completion(&tcrtc->framedone_completion);
dispc_vp_disable(tidss->dispc, tcrtc->vp_idx);