mirror of
https://github.com/Fishwaldo/build.git
synced 2025-06-06 06:11:31 +00:00
[ meson64-dev ] add patch to fix modeswitching
Appears to fix all the HDMI issues.
This commit is contained in:
parent
34ccb5d625
commit
8f2da46aa0
1 changed files with 67 additions and 0 deletions
67
patch/kernel/meson64-dev/1024-fix-atomic-modeswitching.patch
Normal file
67
patch/kernel/meson64-dev/1024-fix-atomic-modeswitching.patch
Normal file
|
@ -0,0 +1,67 @@
|
|||
From b9edb9c9eec654ba57f8da7966e4b1b81a6d7c7b Mon Sep 17 00:00:00 2001
|
||||
From: Neil Armstrong <narmstrong@baylibre.com>
|
||||
Date: Tue, 8 Jan 2019 16:15:31 +0100
|
||||
Subject: [PATCH] drm/meson: Fix atomic mode switching
|
||||
|
||||
Since commit 2bcd3ecab773 when switching mode from X11 (ubuntu mate for
|
||||
example) the display gets blurry.
|
||||
|
||||
This commit fixed atomic crtc mode setting but didn't update the display
|
||||
parameters when changing mode, only when starting a mode setting after
|
||||
a crtc disable.
|
||||
|
||||
This commit setups the crctc parameter in _begin() and _enable() to
|
||||
take in account the current ctrc parameters.
|
||||
|
||||
Fixes: 2bcd3ecab773 ("drm/meson: Fixes for drm_crtc_vblank_on/off support")
|
||||
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
|
||||
---
|
||||
drivers/gpu/drm/meson/meson_crtc.c | 16 +++++++++++++---
|
||||
1 file changed, 13 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/meson/meson_crtc.c b/drivers/gpu/drm/meson/meson_crtc.c
|
||||
index 191b314f9e9e5..a71c0e64f1424 100644
|
||||
--- a/drivers/gpu/drm/meson/meson_crtc.c
|
||||
+++ b/drivers/gpu/drm/meson/meson_crtc.c
|
||||
@@ -81,14 +81,12 @@ static const struct drm_crtc_funcs meson_crtc_funcs = {
|
||||
|
||||
};
|
||||
|
||||
-static void meson_crtc_enable(struct drm_crtc *crtc)
|
||||
+static void meson_crtc_setup(struct drm_crtc *crtc)
|
||||
{
|
||||
struct meson_crtc *meson_crtc = to_meson_crtc(crtc);
|
||||
struct drm_crtc_state *crtc_state = crtc->state;
|
||||
struct meson_drm *priv = meson_crtc->priv;
|
||||
|
||||
- DRM_DEBUG_DRIVER("\n");
|
||||
-
|
||||
if (!crtc_state) {
|
||||
DRM_ERROR("Invalid crtc_state\n");
|
||||
return;
|
||||
@@ -97,6 +95,16 @@ static void meson_crtc_enable(struct drm_crtc *crtc)
|
||||
/* Enable VPP Postblend */
|
||||
writel(crtc_state->mode.hdisplay,
|
||||
priv->io_base + _REG(VPP_POSTBLEND_H_SIZE));
|
||||
+}
|
||||
+
|
||||
+static void meson_crtc_enable(struct drm_crtc *crtc)
|
||||
+{
|
||||
+ struct meson_crtc *meson_crtc = to_meson_crtc(crtc);
|
||||
+ struct meson_drm *priv = meson_crtc->priv;
|
||||
+
|
||||
+ DRM_DEBUG_DRIVER("\n");
|
||||
+
|
||||
+ meson_crtc_setup(crtc);
|
||||
|
||||
writel_bits_relaxed(VPP_POSTBLEND_ENABLE, VPP_POSTBLEND_ENABLE,
|
||||
priv->io_base + _REG(VPP_MISC));
|
||||
@@ -116,6 +124,8 @@ static void meson_crtc_atomic_enable(struct drm_crtc *crtc,
|
||||
|
||||
if (!meson_crtc->enabled)
|
||||
meson_crtc_enable(crtc);
|
||||
+ else
|
||||
+ meson_crtc_setup(crtc);
|
||||
|
||||
priv->viu.osd1_enabled = true;
|
||||
}
|
Loading…
Add table
Reference in a new issue