Skip to contentSkip to conversation

i915 SSC Patch

PATCH Ben Brewer 5 participants 7 messages Jul 29, 2011

Subsystems (2)
lore
Share & tools
lore

Ben Brewer

author
#0 lore raw

I've added a global SSC (Spread Spectrum Clock) parameter to the i915 driver, since having SSC enabled breaks (distorts) VGA output on some Core i5/i7 chips (see https://bugs.freedesktop.org/show_bug.cgi?id=38750).
SSC is still enabled by default so the behaviour won't change but setting the global_use_ssc parameter will turn this feature off and allow affected devices to function correctly (notably the Dell Vostro 3300).

Numerous people have tested this and reported it working (as seen in the bug report thread) which isn't surprising considering it's a basic modification of Chris Wilsons work.

Any comments, or anybody willing to include this patch?

Thanks,
Ben Brewer (CodeThink)

drivers/gpu/drm/i915/i915_drv.c +4 -1
diff -uNr linux-2.6.38/drivers/gpu/drm/i915/i915_drv.c linux-2.6.38-nossc/drivers/gpu/drm/i915/i915_drv.c
@@ -55,7 +55,10 @@
 unsigned int i915_lvds_downclock = 0;
 module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
 
-unsigned int i915_panel_use_ssc = 1;
+unsigned int i915_use_ssc = 1;
+module_param_named(global_use_ssc, i915_use_ssc, int, 0600);
+
+unsigned int i915_panel_use_ssc = 1;
 module_param_named(lvds_use_ssc, i915_panel_use_ssc, int, 0600);
 
 bool i915_try_reset = true;
drivers/gpu/drm/i915/i915_drv.h +2 -0
diff -uNr linux-2.6.38/drivers/gpu/drm/i915/i915_drv.h linux-2.6.38-nossc/drivers/gpu/drm/i915/i915_drv.h
@@ -344,6 +344,7 @@
 	unsigned int lvds_vbt:1;
 	unsigned int int_crt_support:1;
 	unsigned int lvds_use_ssc:1;
+	unsigned int display_clock_mode:1;
 	int lvds_ssc_freq;
 	struct {
 		int rate;
@@ -958,6 +959,7 @@
 extern unsigned int i915_powersave;
 extern unsigned int i915_semaphores;
 extern unsigned int i915_lvds_downclock;
+extern unsigned int i915_use_ssc;
 extern unsigned int i915_panel_use_ssc;
 extern unsigned int i915_enable_rc6;
 
drivers/gpu/drm/i915/intel_bios.c +2 -0
diff -uNr linux-2.6.38/drivers/gpu/drm/i915/intel_bios.c linux-2.6.38-nossc/drivers/gpu/drm/i915/intel_bios.c
@@ -270,6 +270,8 @@
 			dev_priv->lvds_ssc_freq = general->ssc_freq ? 100 : 120;
 		else
 			dev_priv->lvds_ssc_freq = general->ssc_freq ? 100 : 96;
+
+		dev_priv->display_clock_mode = general->display_clock_mode;
 	}
 }
 
drivers/gpu/drm/i915/intel_bios.h +3 -1
diff -uNr linux-2.6.38/drivers/gpu/drm/i915/intel_bios.h linux-2.6.38-nossc/drivers/gpu/drm/i915/intel_bios.h
@@ -120,7 +120,9 @@
 	u8 ssc_freq:1;
 	u8 enable_lfp_on_override:1;
 	u8 disable_ssc_ddt:1;
-	u8 rsvd8:3; /* finish byte */
+	u8 rsvd7:1;
+	u8 display_clock_mode:1;
+	u8 rsvd8:1; /* finish byte */
 
         /* bits 3 */
 	u8 disable_smooth_vision:1;
drivers/gpu/drm/i915/intel_display.c +42 -22

88 lines not on this page · raw message

#1 lore raw

Dear Ben,

Am Freitag, den 29.07.2011, 13:55 +0100 schrieb Ben Brewer:

Quoted 7 lines

I've added a global SSC (Spread Spectrum Clock) parameter to the i915 driver, since having SSC enabled breaks (distorts) VGA output on some Core i5/i7 chips (see https://bugs.freedesktop.org/show_bug.cgi?id=38750).
SSC is still enabled by default so the behaviour won't change but setting the global_use_ssc parameter will turn this feature off and allow affected devices to function correctly (notably the Dell Vostro 3300).

Quoted 5 lines

Numerous people have tested this and reported it working (as seen in the bug report thread) which isn't surprising considering it's a basic modification of Chris Wilsons work.

Any comments, or anybody willing to include this patch?

You at least need to include your Signed-off-by line [1].

Additionally I do not know if your patch applies against latest master. So using Git with git format-patch -s is recommended.

Thanks,

Paul

[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=tree;f=Documentation

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Ben Brewer
Quoted 7 lines · Ben Brewer

I've added a global SSC (Spread Spectrum Clock) parameter to the i915 driver, since having SSC enabled breaks (distorts) VGA output on some Core i5/i7 chips (see https://bugs.freedesktop.org/show_bug.cgi?id=38750).
SSC is still enabled by default so the behaviour won't change but setting the global_use_ssc parameter will turn this feature off and allow affected devices to function correctly (notably the Dell Vostro 3300).

The question I have is why is SSC enabled on the VGA output at all? I don't see any way VGA could ever tolerate it.

Signature · 1 line
[email protected]
#3 lore raw

On Fri, 29 Jul 2011 11:45:28 -0700, Keith Packard <[email protected]> wrote:
Non-text part: multipart/signed

Quoted 10 lines · Ben Brewer
Quoted 8 lines

I've added a global SSC (Spread Spectrum Clock) parameter to the i915 driver, since having SSC enabled breaks (distorts) VGA output on some Core i5/i7 chips (see https://bugs.freedesktop.org/show_bug.cgi?id=38750).
SSC is still enabled by default so the behaviour won't change but setting the global_use_ssc parameter will turn this feature off and allow affected devices to function correctly (notably the Dell Vostro 3300).

Quoted 2 lines

The question I have is why is SSC enabled on the VGA output at all? I don't see any way VGA could ever tolerate it.

It's not meant to be and it causes havoc, from wavy/blurry output to no sync. The other part of the patch on that bug was to walk the crtcs and turn off SSC on the shared refclk if any output could not handle SSC. At that point, an objection was raised that we shouldn't even be touching the refclk if any output was currently being driven from it. -Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#4 lore raw
Quoted 5 lines · Chris Wilson

It's not meant to be and it causes havoc, from wavy/blurry output to no sync. The other part of the patch on that bug was to walk the crtcs and turn off SSC on the shared refclk if any output could not handle SSC. At that point, an objection was raised that we shouldn't even be touching the refclk if any output was currently being driven from it.

So the correct fix is to turn off everything, disable SSC and turn everything back on? That seems tedious, but not impossible (just DPMS off the world, then DPMS everything back on...).

Signature · 1 line
[email protected]
#5 lore raw
In reply to Keith Packard
Quoted 1 line · Keith Packard

On Fri, 29 Jul 2011 13:55:35 +0100, Ben Brewer

Quoted 10 lines · <[email protected]> wrote:
Quoted 7 lines

I've added a global SSC (Spread Spectrum Clock) parameter to the i915 driver, since having SSC enabled breaks (distorts) VGA output on some Core i5/i7 chips (see
https://bugs.freedesktop.org/show_bug.cgi?id=38750). SSC is still enabled by default so the behaviour won't change but setting the global_use_ssc parameter will turn this feature off and allow affected devices to function correctly (notably the Dell Vostro 3300).

The question I have is why is SSC enabled on the VGA output at all? I don't see any way VGA could ever tolerate it.

Something does not make sense here Keith, so I'm with you, and my background is from about 60 years in tv maintenance and 45 in broadcasting.

A pure digital output, where its a high speed serial transfer of bytes to the monitor, is generally not going to be sensitive the any SS used unless the baud rate slams around too much on a byte to byte basis. Since SS is generally just a few percent, even that should not be a problem. But feeding analog signals up a video cable to a vga monitor, and the pixel time is wobbling by 2 to 5% and you won't have much of a viewable image left. The analog signals, vga etc, needs their own video clock, a dead stable one.

We used to spend $10k-30k$ just so we could take the signal from a mechanically unstable vcr that only cost us $10k, and make it stable enough to work on your home tv's without the top of the pix waving around like hurricane Katrina was in the neighborhood.

Hardware design error in the Dell?

Cheers, gene

Signature · 4 lines
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
"Apathy is not the problem, it's the solution"
#6 lore raw
Quoted 11 lines · Gene Heskett
Quoted 1 line · Keith Packard

On Fri, 29 Jul 2011 13:55:35 +0100, Ben Brewer

Quoted 8 lines · <[email protected]> wrote:
Quoted 7 lines

I've added a global SSC (Spread Spectrum Clock) parameter to the i915 driver, since having SSC enabled breaks (distorts) VGA output on some Core i5/i7 chips (see
https://bugs.freedesktop.org/show_bug.cgi?id=38750). SSC is still enabled by default so the behaviour won't change but setting the global_use_ssc parameter will turn this feature off and allow affected devices to function correctly (notably the Dell Vostro 3300).

Quoted 6 lines
Quoted 2 lines

The question I have is why is SSC enabled on the VGA output at all? I don't see any way VGA could ever tolerate it.

Something does not make sense here Keith, so I'm with you, and my background is from about 60 years in tv maintenance and 45 in broadcasting.

Right, I think the basic problem is that we aren't switching SSC on and off based on whether there's an output which can't tolerate it. Making this user-configurable doesn't make any sense, it clearly needs to be done in the driver automatically, based on whether there's an analog output running (VGA or TV).

Quoted 1 line

Hardware design error in the Dell?

Nope, just a driver bug :-)

Signature · 1 line
[email protected]