Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-14 18:07:58 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-14 18:07:58 +0200
commit7e3fe35b786a13f2033a81f5cf2bff2be24083e2 (patch)
treec674fdf030c7489090db9524f0294e6a51c6560d
parent9e9fbf7245fa1442a21da01fe3b7c5fbdb3f4df1 (diff)
Revert "drm/sun4i: rgb: Change the pixel clock validation check (bnc#1113722)"
The patch seems buggy, breaks the build for armv7hl/pae config.
-rw-r--r--patches.drm/0001-drm-sun4i-rgb-Change-the-pixel-clock-validation-chec.patch101
-rw-r--r--series.conf1
2 files changed, 0 insertions, 102 deletions
diff --git a/patches.drm/0001-drm-sun4i-rgb-Change-the-pixel-clock-validation-chec.patch b/patches.drm/0001-drm-sun4i-rgb-Change-the-pixel-clock-validation-chec.patch
deleted file mode 100644
index 177f239e81..0000000000
--- a/patches.drm/0001-drm-sun4i-rgb-Change-the-pixel-clock-validation-chec.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From e2771deb5dece1acde9a406538e4f7ef9262d5cd Mon Sep 17 00:00:00 2001
-From: Maxime Ripard <maxime.ripard@bootlin.com>
-Date: Tue, 26 Feb 2019 15:25:49 +0100
-Subject: drm/sun4i: rgb: Change the pixel clock validation check
-Git-commit: e2771deb5dece1acde9a406538e4f7ef9262d5cd
-Patch-mainline: v5.2-rc1
-References: bnc#1113722
-
-The current code, since commit bb43d40d7c83 ("drm/sun4i: rgb: Validate the
-clock rate"), perform some validation on the pixel clock to filter out the
-EDID modes provided by monitors (through bridges) that we wouldn't be able
-to reach. For the usual modes, we're able to generate a perfect clock rate,
-so a strict check was enough.
-
-However, this had the side effect of preventing displays that would work
-otherwise to operate properly, since we would pretty much never be able to
-generate an exact rate for those displays, even though we would fall within
-that panel tolerance.
-
-This was also shown to happen for unusual modes exposed through EDIDs, for
-example on eDP panels.
-
-We can work around this by simplifying a bit the problem: no panels we've
-encountered so far actually needed that check. All of them are tied to a
-particular board when it is produced, and made to work with the Allwinner
-BSP. That pretty much guarantees that we never have a pixel clock out of
-reach.
-
-On the other hand, the EDIDs modes that needed to be validated have always
-been exposed through bridges.
-
-Let's just use that metric to instead of validating all modes, only
-validate modes when we have a bridge attached. It should be good enough for
-now, while we still have room for improvements or refinements using the
-display_timings structure for example for panels.
-
-We also add a tolerance for EDID-based modes instead of doing a strict
-check. This tolerance is of 0.5% which is the one advertised in the VESA
-DVT and CVT specs. If that needed to be extended in the future, we can add
-a custom module parameter to relax it a bit.
-
-Fixes: bb43d40d7c83 ("drm/sun4i: rgb: Validate the clock rate")
-Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
-Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> # tested on pinebook
-Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
-Link: https://patchwork.freedesktop.org/patch/msgid/ec2dc2a7b3d4bd44f7a2a6e1c1813f92449a7310.1551191081.git-series.maxime.ripard@bootlin.com
-Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
----
- drivers/gpu/drm/sun4i/sun4i_rgb.c | 29 +++++++++++++++++++++++++++--
- 1 file changed, 27 insertions(+), 2 deletions(-)
-
---- a/drivers/gpu/drm/sun4i/sun4i_rgb.c
-+++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c
-@@ -60,6 +60,7 @@ static int sun4i_rgb_mode_valid(struct d
- u32 hsync = mode->hsync_end - mode->hsync_start;
- u32 vsync = mode->vsync_end - mode->vsync_start;
- unsigned long rate = mode->clock * 1000;
-+ unsigned long long lowest, highest;
- long rounded_rate;
-
- DRM_DEBUG_DRIVER("Validating modes...\n");
-@@ -92,13 +93,37 @@ static int sun4i_rgb_mode_valid(struct d
-
- DRM_DEBUG_DRIVER("Vertical parameters OK\n");
-
-+ /*
-+ * TODO: We should use the struct display_timing if available
-+ * and / or trying to stretch the timings within that
-+ * tolerancy to take care of panels that we wouldn't be able
-+ * to have a exact match for.
-+ */
-+ if (rgb->panel) {
-+ DRM_DEBUG_DRIVER("RGB panel used, skipping clock rate checks");
-+ goto out;
-+ }
-+
-+ /*
-+ * That shouldn't ever happen unless something is really wrong, but it
-+ * doesn't harm to check.
-+ */
-+ if (!rgb->bridge)
-+ goto out;
-+
- rounded_rate = clk_round_rate(tcon->dclk, rate);
-- if (rounded_rate < rate)
-+
-+ lowest = rate * (1000 - SUN4I_RGB_DOTCLOCK_TOLERANCE_PER_MILLE);
-+ do_div(lowest, 1000);
-+ if (rounded_rate < lowest)
- return MODE_CLOCK_LOW;
-
-- if (rounded_rate > rate)
-+ highest = rate * (1000 + SUN4I_RGB_DOTCLOCK_TOLERANCE_PER_MILLE);
-+ do_div(highest, 1000);
-+ if (rounded_rate > highest)
- return MODE_CLOCK_HIGH;
-
-+out:
- DRM_DEBUG_DRIVER("Clock rate OK\n");
-
- return MODE_OK;
diff --git a/series.conf b/series.conf
index 6c73d8ca72..2dadce2966 100644
--- a/series.conf
+++ b/series.conf
@@ -21832,7 +21832,6 @@
patches.drivers/media-vivid-use-vfree-instead-of-kfree-for-dev-bitma.patch
patches.fixes/0001-media-pvrusb2-Prevent-a-buffer-overflow.patch
patches.fixes/scripts-override-locale-from-environment-when-runnin.patch
- patches.drm/0001-drm-sun4i-rgb-Change-the-pixel-clock-validation-chec.patch
patches.drm/drm-i915-Fix-I915_EXEC_RING_MASK.patch
patches.drm/drm-fb-helper-dpms_legacy-Only-set-on-connectors-in-.patch
patches.drm/0004-drm-i915-gvt-Fix-incorrect-mask-of-mmio-0x22028-in-g.patch