drm/i915: Make G4X-style PLL search more permissive
Subsystems (2)
PATCH 1/1 drm/i915: Make G4X-style PLL search more permissive
Fixes an Ironlake laptop with a 68.940MHz 1280x800 panel and 120MHz SSC reference clock.
More generally, the 0.488% tolerance used before is just too tight to reliably find a PLL setting. I extracted the search algorithm and modified it to find the dot clocks with maximum error over the valid range for the given output type:
http://people.freedesktop.org/~ajax/intel_g4x_find_best_pll.c
This gave:
Worst dotclock for Ironlake DAC refclk is 350000kHz (error 0.00571) Worst dotclock for Ironlake SL-LVDS refclk is 102321kHz (error 0.00524) Worst dotclock for Ironlake DL-LVDS refclk is 219642kHz (error 0.00488) Worst dotclock for Ironlake SL-LVDS SSC refclk is 84374kHz (error 0.00529) Worst dotclock for Ironlake DL-LVDS SSC refclk is 183035kHz (error 0.00488) Worst dotclock for G4X SDVO refclk is 50000kHz (error 0.17332) Worst dotclock for G4X HDMI refclk is 334400kHz (error 0.00478) Worst dotclock for G4X SL-LVDS refclk is 95571kHz (error 0.00449) Worst dotclock for G4X DL-LVDS refclk is 224000kHz (error 0.00510)
The SDVO number looks a bit suspicious, which I haven't tracked down yet. But it's clear that the old threshold is too tight.
--- drivers/gpu/drm/i915/intel_display.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -862,8 +862,8 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,intel_clock_t clock;int max_n;bool found; -/* approximately equals target * 0.00488 */ -int err_most = (target >>8 ) + (target >>10 ); +/* approximately equals target * 0.00585 */ +int err_most = (target >>8 ) + (target >>9 ); found = false;if (intel_pipe_has_type (crtc,INTEL_OUTPUT_LVDS )) {
Signature · 1 line
1.7.1
Quoted 10 lines · Adam Jackson
Worst dotclock for Ironlake DAC refclk is 350000kHz (error 0.00571) Worst dotclock for Ironlake SL-LVDS refclk is 102321kHz (error 0.00524) Worst dotclock for Ironlake DL-LVDS refclk is 219642kHz (error 0.00488) Worst dotclock for Ironlake SL-LVDS SSC refclk is 84374kHz (error 0.00529) Worst dotclock for Ironlake DL-LVDS SSC refclk is 183035kHz (error 0.00488) Worst dotclock for G4X SDVO refclk is 50000kHz (error 0.17332) Worst dotclock for G4X HDMI refclk is 334400kHz (error 0.00478) Worst dotclock for G4X SL-LVDS refclk is 95571kHz (error 0.00449) Worst dotclock for G4X DL-LVDS refclk is 224000kHz (error 0.00510)
Quoted 2 lines
The SDVO number looks a bit suspicious, which I haven't tracked down yet. But it's clear that the old threshold is too tight.
Well, that was easy. We turn on 2x or 4x pixel multiplication below 100MHz. Once I account for that I get:
Worst dotclock for G4X SDVO refclk is 267600kHz (error 0.00448)
- ajax
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 2 lines · Adam Jackson
Fixes an Ironlake laptop with a 68.940MHz 1280x800 panel and 120MHz SSC reference clock.
This should fix #27471 too. I was hesitating if enlarge error range or always choose the one with smallest error, as what we can tell from our PLL sheet is just error result between real freq and recommended value, but not max error range.
Would you cc stable too?
thanks.
Signature · 3 lines
Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Any idea whether this will be applied or not? We find that it resolves a bug for Ubuntu.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/554569?comments=all
Thanks,
Steve Conklin
Quoted 32 lines · Zhenyu Wang
Quoted 2 lines · Adam Jackson
Fixes an Ironlake laptop with a 68.940MHz 1280x800 panel and 120MHz SSC reference clock.
This should fix #27471 too. I was hesitating if enlarge error range or always choose the one with smallest error, as what we can tell from our PLL sheet is just error result between real freq and recommended value, but not max error range.
Would you cc stable too?
thanks.
--
Open Source Technology Center, Intel ltd.$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)iEYEARECAAYFAkwyhP0ACgkQsQQaM014GCf4YQCfYr3s36s0nrFNh9Y2fffl4bfJ E/kAn2X2bfL+r8gshWb/M98ldAULFIZn
=8HF4
-----END PGP SIGNATURE-----_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Eric Anholt
AppliedQuoted 12 lines · Adam Jackson
Fixes an Ironlake laptop with a 68.940MHz 1280x800 panel and 120MHz SSC reference clock.
More generally, the 0.488% tolerance used before is just too tight to reliably find a PLL setting. I extracted the search algorithm and modified it to find the dot clocks with maximum error over the valid range for the given output type:
http://people.freedesktop.org/~ajax/intel_g4x_find_best_pll.c
This gave:
Quoted 9 lines
Worst dotclock for Ironlake DAC refclk is 350000kHz (error 0.00571) Worst dotclock for Ironlake SL-LVDS refclk is 102321kHz (error 0.00524) Worst dotclock for Ironlake DL-LVDS refclk is 219642kHz (error 0.00488) Worst dotclock for Ironlake SL-LVDS SSC refclk is 84374kHz (error 0.00529) Worst dotclock for Ironlake DL-LVDS SSC refclk is 183035kHz (error 0.00488) Worst dotclock for G4X SDVO refclk is 50000kHz (error 0.17332) Worst dotclock for G4X HDMI refclk is 334400kHz (error 0.00478) Worst dotclock for G4X SL-LVDS refclk is 95571kHz (error 0.00449) Worst dotclock for G4X DL-LVDS refclk is 224000kHz (error 0.00510)
Applied to for-linus (with fixed commit msg for g4x sdvo).
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx