Commit df20ce5a6fa618e236ff6b33ee88413d6f1bfa0a

Authored by Linus Torvalds

Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Two i915 regressions and one dual-gpu laptop radeon fix"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: report disconnected for LVDS/eDP with PX if ddc fails
  drm/i915: Cancel vdd off work before suspend
  drm/i915: Ignore SURFLIVE and flip counter when the GPU gets reset

Showing 3 changed files Side-by-side Diff

drivers/gpu/drm/i915/intel_display.c
... ... @@ -9408,6 +9408,10 @@
9408 9408 struct drm_device *dev = crtc->base.dev;
9409 9409 struct drm_i915_private *dev_priv = dev->dev_private;
9410 9410  
  9411 + if (i915_reset_in_progress(&dev_priv->gpu_error) ||
  9412 + crtc->reset_counter != atomic_read(&dev_priv->gpu_error.reset_counter))
  9413 + return true;
  9414 +
9411 9415 /*
9412 9416 * The relevant registers doen't exist on pre-ctg.
9413 9417 * As the flip done interrupt doesn't trigger for mmio
drivers/gpu/drm/i915/intel_dp.c
... ... @@ -4450,6 +4450,7 @@
4450 4450 * vdd might still be enabled do to the delayed vdd off.
4451 4451 * Make sure vdd is actually turned off here.
4452 4452 */
  4453 + cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
4453 4454 pps_lock(intel_dp);
4454 4455 edp_panel_vdd_off_sync(intel_dp);
4455 4456 pps_unlock(intel_dp);
drivers/gpu/drm/radeon/radeon_connectors.c
... ... @@ -322,6 +322,12 @@
322 322 }
323 323  
324 324 if (!radeon_connector->edid) {
  325 + /* don't fetch the edid from the vbios if ddc fails and runpm is
  326 + * enabled so we report disconnected.
  327 + */
  328 + if ((rdev->flags & RADEON_IS_PX) && (radeon_runtime_pm != 0))
  329 + return;
  330 +
325 331 if (rdev->is_atom_bios) {
326 332 /* some laptops provide a hardcoded edid in rom for LCDs */
327 333 if (((connector->connector_type == DRM_MODE_CONNECTOR_LVDS) ||
... ... @@ -826,6 +832,8 @@
826 832 static enum drm_connector_status
827 833 radeon_lvds_detect(struct drm_connector *connector, bool force)
828 834 {
  835 + struct drm_device *dev = connector->dev;
  836 + struct radeon_device *rdev = dev->dev_private;
829 837 struct radeon_connector *radeon_connector = to_radeon_connector(connector);
830 838 struct drm_encoder *encoder = radeon_best_single_encoder(connector);
831 839 enum drm_connector_status ret = connector_status_disconnected;
... ... @@ -842,7 +850,11 @@
842 850 /* check if panel is valid */
843 851 if (native_mode->hdisplay >= 320 && native_mode->vdisplay >= 240)
844 852 ret = connector_status_connected;
845   -
  853 + /* don't fetch the edid from the vbios if ddc fails and runpm is
  854 + * enabled so we report disconnected.
  855 + */
  856 + if ((rdev->flags & RADEON_IS_PX) && (radeon_runtime_pm != 0))
  857 + ret = connector_status_disconnected;
846 858 }
847 859  
848 860 /* check for edid as well */
... ... @@ -1589,6 +1601,11 @@
1589 1601 /* check if panel is valid */
1590 1602 if (native_mode->hdisplay >= 320 && native_mode->vdisplay >= 240)
1591 1603 ret = connector_status_connected;
  1604 + /* don't fetch the edid from the vbios if ddc fails and runpm is
  1605 + * enabled so we report disconnected.
  1606 + */
  1607 + if ((rdev->flags & RADEON_IS_PX) && (radeon_runtime_pm != 0))
  1608 + ret = connector_status_disconnected;
1592 1609 }
1593 1610 /* eDP is always DP */
1594 1611 radeon_dig_connector->dp_sink_type = CONNECTOR_OBJECT_ID_DISPLAYPORT;