drm/i915: fix VGA detect on IGDNG
Check FORCE_DETECT bit to be clear for the finish of hotplug detect process. Also check possible mono monitor which should also be marked as connected. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
32f9d658ae
commit
67941da28d
@ -156,6 +156,9 @@ static bool intel_igdng_crt_detect_hotplug(struct drm_connector *connector)
|
|||||||
|
|
||||||
temp = adpa = I915_READ(PCH_ADPA);
|
temp = adpa = I915_READ(PCH_ADPA);
|
||||||
|
|
||||||
|
adpa &= ~ADPA_DAC_ENABLE;
|
||||||
|
I915_WRITE(PCH_ADPA, adpa);
|
||||||
|
|
||||||
adpa &= ~ADPA_CRT_HOTPLUG_MASK;
|
adpa &= ~ADPA_CRT_HOTPLUG_MASK;
|
||||||
|
|
||||||
adpa |= (ADPA_CRT_HOTPLUG_PERIOD_128 |
|
adpa |= (ADPA_CRT_HOTPLUG_PERIOD_128 |
|
||||||
@ -169,13 +172,14 @@ static bool intel_igdng_crt_detect_hotplug(struct drm_connector *connector)
|
|||||||
DRM_DEBUG("pch crt adpa 0x%x", adpa);
|
DRM_DEBUG("pch crt adpa 0x%x", adpa);
|
||||||
I915_WRITE(PCH_ADPA, adpa);
|
I915_WRITE(PCH_ADPA, adpa);
|
||||||
|
|
||||||
/* This might not be needed as not specified in spec...*/
|
while ((I915_READ(PCH_ADPA) & ADPA_CRT_HOTPLUG_FORCE_TRIGGER) != 0)
|
||||||
udelay(1000);
|
;
|
||||||
|
|
||||||
/* Check the status to see if both blue and green are on now */
|
/* Check the status to see if both blue and green are on now */
|
||||||
adpa = I915_READ(PCH_ADPA);
|
adpa = I915_READ(PCH_ADPA);
|
||||||
if ((adpa & ADPA_CRT_HOTPLUG_MONITOR_MASK) ==
|
adpa &= ADPA_CRT_HOTPLUG_MONITOR_MASK;
|
||||||
ADPA_CRT_HOTPLUG_MONITOR_COLOR)
|
if ((adpa == ADPA_CRT_HOTPLUG_MONITOR_COLOR) ||
|
||||||
|
(adpa == ADPA_CRT_HOTPLUG_MONITOR_MONO))
|
||||||
ret = true;
|
ret = true;
|
||||||
else
|
else
|
||||||
ret = false;
|
ret = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user