Rev 3480 | Rev 3746 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3480 | Rev 3482 | ||
---|---|---|---|
Line 250... | Line 250... | ||
250 | struct intel_crt *crt = intel_attached_crt(connector); |
250 | struct intel_crt *crt = intel_attached_crt(connector); |
251 | struct drm_i915_private *dev_priv = dev->dev_private; |
251 | struct drm_i915_private *dev_priv = dev->dev_private; |
252 | u32 adpa; |
252 | u32 adpa; |
253 | bool ret; |
253 | bool ret; |
Line 254... | Line -... | ||
254 | - | ||
255 | ENTER(); |
- | |
256 | 254 | ||
257 | /* The first time through, trigger an explicit detection cycle */ |
255 | /* The first time through, trigger an explicit detection cycle */ |
258 | if (crt->force_hotplug_required) { |
256 | if (crt->force_hotplug_required) { |
259 | bool turn_off_dac = HAS_PCH_SPLIT(dev); |
257 | bool turn_off_dac = HAS_PCH_SPLIT(dev); |
Line 286... | Line 284... | ||
286 | ret = true; |
284 | ret = true; |
287 | else |
285 | else |
288 | ret = false; |
286 | ret = false; |
289 | DRM_DEBUG_KMS("ironlake hotplug adpa=0x%x, result %d\n", adpa, ret); |
287 | DRM_DEBUG_KMS("ironlake hotplug adpa=0x%x, result %d\n", adpa, ret); |
Line 290... | Line -... | ||
290 | - | ||
291 | LEAVE(); |
- | |
292 | 288 | ||
293 | return ret; |
289 | return ret; |
Line 294... | Line 290... | ||
294 | } |
290 | } |
295 | 291 | ||
Line 300... | Line 296... | ||
300 | struct drm_i915_private *dev_priv = dev->dev_private; |
296 | struct drm_i915_private *dev_priv = dev->dev_private; |
301 | u32 adpa; |
297 | u32 adpa; |
302 | bool ret; |
298 | bool ret; |
303 | u32 save_adpa; |
299 | u32 save_adpa; |
Line 304... | Line -... | ||
304 | - | ||
305 | ENTER(); |
- | |
306 | 300 | ||
307 | save_adpa = adpa = I915_READ(crt->adpa_reg); |
301 | save_adpa = adpa = I915_READ(crt->adpa_reg); |
Line 308... | Line 302... | ||
308 | DRM_DEBUG_KMS("trigger hotplug detect cycle: adpa=0x%x\n", adpa); |
302 | DRM_DEBUG_KMS("trigger hotplug detect cycle: adpa=0x%x\n", adpa); |
Line 327... | Line 321... | ||
327 | DRM_DEBUG_KMS("valleyview hotplug adpa=0x%x, result %d\n", adpa, ret); |
321 | DRM_DEBUG_KMS("valleyview hotplug adpa=0x%x, result %d\n", adpa, ret); |
Line 328... | Line 322... | ||
328 | 322 | ||
329 | /* FIXME: debug force function and remove */ |
323 | /* FIXME: debug force function and remove */ |
Line 330... | Line -... | ||
330 | ret = true; |
- | |
331 | - | ||
332 | LEAVE(); |
324 | ret = true; |
333 | 325 | ||
Line 334... | Line 326... | ||
334 | return ret; |
326 | return ret; |
335 | } |
327 | } |
Line 348... | Line 340... | ||
348 | struct drm_i915_private *dev_priv = dev->dev_private; |
340 | struct drm_i915_private *dev_priv = dev->dev_private; |
349 | u32 hotplug_en, orig, stat; |
341 | u32 hotplug_en, orig, stat; |
350 | bool ret = false; |
342 | bool ret = false; |
351 | int i, tries = 0; |
343 | int i, tries = 0; |
Line 352... | Line -... | ||
352 | - | ||
353 | ENTER(); |
- | |
354 | 344 | ||
355 | if (HAS_PCH_SPLIT(dev)) |
345 | if (HAS_PCH_SPLIT(dev)) |
Line 356... | Line 346... | ||
356 | return intel_ironlake_crt_detect_hotplug(connector); |
346 | return intel_ironlake_crt_detect_hotplug(connector); |
357 | 347 | ||
Line 388... | Line 378... | ||
388 | I915_WRITE(PORT_HOTPLUG_STAT, CRT_HOTPLUG_INT_STATUS); |
378 | I915_WRITE(PORT_HOTPLUG_STAT, CRT_HOTPLUG_INT_STATUS); |
Line 389... | Line 379... | ||
389 | 379 | ||
390 | /* and put the bits back */ |
380 | /* and put the bits back */ |
Line 391... | Line -... | ||
391 | I915_WRITE(PORT_HOTPLUG_EN, orig); |
- | |
392 | - | ||
393 | LEAVE(); |
381 | I915_WRITE(PORT_HOTPLUG_EN, orig); |
394 | 382 | ||
Line 395... | Line 383... | ||
395 | return ret; |
383 | return ret; |
396 | } |
384 | } |
397 | 385 | ||
398 | static struct edid *intel_crt_get_edid(struct drm_connector *connector, |
386 | static struct edid *intel_crt_get_edid(struct drm_connector *connector, |
Line 399... | Line -... | ||
399 | struct i2c_adapter *i2c) |
- | |
400 | { |
- | |
401 | struct edid *edid; |
387 | struct i2c_adapter *i2c) |
Line 402... | Line 388... | ||
402 | 388 | { |
|
403 | ENTER(); |
389 | struct edid *edid; |
404 | 390 | ||
405 | edid = drm_get_edid(connector, i2c); |
391 | edid = drm_get_edid(connector, i2c); |
406 | 392 | ||
407 | if (!edid && !intel_gmbus_is_forced_bit(i2c)) { |
393 | if (!edid && !intel_gmbus_is_forced_bit(i2c)) { |
Line 408... | Line -... | ||
408 | DRM_DEBUG_KMS("CRT GMBUS EDID read failed, retry using GPIO bit-banging\n"); |
- | |
409 | intel_gmbus_force_bit(i2c, true); |
- | |
410 | edid = drm_get_edid(connector, i2c); |
394 | DRM_DEBUG_KMS("CRT GMBUS EDID read failed, retry using GPIO bit-banging\n"); |
411 | intel_gmbus_force_bit(i2c, false); |
395 | intel_gmbus_force_bit(i2c, true); |
Line 412... | Line 396... | ||
412 | } |
396 | edid = drm_get_edid(connector, i2c); |
413 | 397 | intel_gmbus_force_bit(i2c, false); |