Message ID | 20090728071159.GA19204@zhen-devel.sh.intel.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On Tue, 2009-07-28 at 15:11 +0800, Zhenyu Wang wrote: > This introduces screen flicker which is bad, more testing takes > me to below patch. Force detection on IGDNG desktop chip seems > doesn't require disable DAC first, but mobile chip has trouble > with that, so I just fallback to DDC probe instead. Any comment? We can't require DDC on VGA; monitor switches often do not pass DDC along. The only reliable way to detect VGA monitors is load detection. Does the IGDNG have a reliable interrupt for VGA hotplug?
Keith Packard wrote: > On Tue, 2009-07-28 at 15:11 +0800, Zhenyu Wang wrote: > > >> This introduces screen flicker which is bad, more testing takes >> me to below patch. Force detection on IGDNG desktop chip seems >> doesn't require disable DAC first, but mobile chip has trouble >> with that, so I just fallback to DDC probe instead. Any comment? >> > > We can't require DDC on VGA; monitor switches often do not pass DDC > along. The only reliable way to detect VGA monitors is load detection. > > Also you do not get DDC with a screen connected with a VGA-over-CAT5 solution. Barry
On 2009.07.28 09:40:15 -0700, Keith Packard wrote: > On Tue, 2009-07-28 at 15:11 +0800, Zhenyu Wang wrote: > > > This introduces screen flicker which is bad, more testing takes > > me to below patch. Force detection on IGDNG desktop chip seems > > doesn't require disable DAC first, but mobile chip has trouble > > with that, so I just fallback to DDC probe instead. Any comment? > > We can't require DDC on VGA; monitor switches often do not pass DDC > along. The only reliable way to detect VGA monitors is load detection. Ok. > > Does the IGDNG have a reliable interrupt for VGA hotplug? > Force detection for VGA is reliable after DAC is disabled first. I haven't added display hotplug interrupts handling on IGDNG yet, so will check out this later.
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index d6a1a6e..6bc9500 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c @@ -156,6 +156,13 @@ static bool intel_igdng_crt_detect_hotplug(struct drm_connector *connector) temp = adpa = I915_READ(PCH_ADPA); + if (IS_IGDNG_M(dev)) { + /* mobile chip seems sensible to disable dac first for + force detect, which causes flicker, so just fall to + ddc probe. */ + return intel_ddc_probe(to_intel_output(connector)); + } + adpa &= ~ADPA_CRT_HOTPLUG_MASK; adpa |= (ADPA_CRT_HOTPLUG_PERIOD_128 | @@ -169,13 +176,13 @@ static bool intel_igdng_crt_detect_hotplug(struct drm_connector *connector) DRM_DEBUG("pch crt adpa 0x%x", adpa); I915_WRITE(PCH_ADPA, adpa); - /* This might not be needed as not specified in spec...*/ - udelay(1000); + while ((I915_READ(PCH_ADPA) & ADPA_CRT_HOTPLUG_FORCE_TRIGGER) != 0) + ; /* Check the status to see if both blue and green are on now */ adpa = I915_READ(PCH_ADPA); - if ((adpa & ADPA_CRT_HOTPLUG_MONITOR_MASK) == - ADPA_CRT_HOTPLUG_MONITOR_COLOR) + adpa &= ADPA_CRT_HOTPLUG_MONITOR_MASK; + if (adpa != ADPA_CRT_HOTPLUG_MONITOR_NONE) ret = true; else ret = false;