Home Home > GIT Browse > SLE12-SP4-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
commit38fc00dd9a70b553989de26fa6d6389695bcb27d (patch)
treefc401a537daeba655e453992265bdda1ec46705a
parent65c4be99acd8ad82b020bbe1af3e725cf11553e0 (diff)
Revert "drm/sun4i: rgb: Change the pixel clock validation check (bnc#1113722)"
The patch seems buggy, breaks the build for armv7hl/pae config. suse-commit: 7e3fe35b786a13f2033a81f5cf2bff2be24083e2
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_rgb.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c b/drivers/gpu/drm/sun4i/sun4i_rgb.c
index dad6bba30b43..67f0b91a99de 100644
--- a/drivers/gpu/drm/sun4i/sun4i_rgb.c
+++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c
@@ -60,7 +60,6 @@ static int sun4i_rgb_mode_valid(struct drm_connector *connector,
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");
@@ -93,37 +92,13 @@ static int sun4i_rgb_mode_valid(struct drm_connector *connector,
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);
-
- lowest = rate * (1000 - SUN4I_RGB_DOTCLOCK_TOLERANCE_PER_MILLE);
- do_div(lowest, 1000);
- if (rounded_rate < lowest)
+ if (rounded_rate < rate)
return MODE_CLOCK_LOW;
- highest = rate * (1000 + SUN4I_RGB_DOTCLOCK_TOLERANCE_PER_MILLE);
- do_div(highest, 1000);
- if (rounded_rate > highest)
+ if (rounded_rate > rate)
return MODE_CLOCK_HIGH;
-out:
DRM_DEBUG_DRIVER("Clock rate OK\n");
return MODE_OK;