diff options
author | Yannick Fertre <yannick.fertre@foss.st.com> | 2022-06-03 15:41:51 +0200 |
---|---|---|
committer | Philippe Cornu <philippe.cornu@foss.st.com> | 2022-06-27 15:53:49 +0200 |
commit | c4f218d46fafd709df8e03c275c4d4ad6ebed019 (patch) | |
tree | 7aec7f707601e61e9962f0f68ab4da9187d37cf2 /drivers/gpu/drm/stm | |
parent | 6fde8eec71796f3534f0c274066862829813b21f (diff) | |
download | linux-c4f218d46fafd709df8e03c275c4d4ad6ebed019.tar.gz linux-c4f218d46fafd709df8e03c275c4d4ad6ebed019.tar.bz2 linux-c4f218d46fafd709df8e03c275c4d4ad6ebed019.zip |
drm/stm: ltdc: disable all layers before crtc shutdown
All plans must be disabled before the CRTC shutdown helping
the crtc to restart from a clean situation (without unwanted
planes already enable).
Signed-off-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Philippe Cornu <philippe.cornu@foss.st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220603134151.591997-1-yannick.fertre@foss.st.com
Diffstat (limited to 'drivers/gpu/drm/stm')
-rw-r--r-- | drivers/gpu/drm/stm/ltdc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 76230f775081..0de65be9cd65 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -790,11 +790,17 @@ static void ltdc_crtc_atomic_disable(struct drm_crtc *crtc, { struct ltdc_device *ldev = crtc_to_ltdc(crtc); struct drm_device *ddev = crtc->dev; + int layer_index = 0; DRM_DEBUG_DRIVER("\n"); drm_crtc_vblank_off(crtc); + /* Disable all layers */ + for (layer_index = 0; layer_index < ldev->caps.nb_layers; layer_index++) + regmap_write_bits(ldev->regmap, LTDC_L1CR + layer_index * LAY_OFS, + LXCR_CLUTEN | LXCR_LEN, 0); + /* disable IRQ */ regmap_clear_bits(ldev->regmap, LTDC_IER, IER_RRIE | IER_FUIE | IER_TERRIE); |