diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 574057cd1d09..489b220af02b 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
@@ -462,19 +462,13 @@ void intel_detect_pch(struct drm_device *dev) | |||
462 | } else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) { | 462 | } else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) { |
463 | dev_priv->pch_type = PCH_LPT; | 463 | dev_priv->pch_type = PCH_LPT; |
464 | DRM_DEBUG_KMS("Found LynxPoint PCH\n"); | 464 | DRM_DEBUG_KMS("Found LynxPoint PCH\n"); |
465 | WARN_ON(!IS_HASWELL(dev)); | 465 | WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev)); |
466 | WARN_ON(IS_HSW_ULT(dev)); | 466 | WARN_ON(IS_HSW_ULT(dev) || IS_BDW_ULT(dev)); |
467 | } else if (IS_BROADWELL(dev)) { | ||
468 | dev_priv->pch_type = PCH_LPT; | ||
469 | dev_priv->pch_id = | ||
470 | INTEL_PCH_LPT_LP_DEVICE_ID_TYPE; | ||
471 | DRM_DEBUG_KMS("This is Broadwell, assuming " | ||
472 | "LynxPoint LP PCH\n"); | ||
473 | } else if (id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) { | 467 | } else if (id == INTEL_PCH_LPT_LP_DEVICE_ID_TYPE) { |
474 | dev_priv->pch_type = PCH_LPT; | 468 | dev_priv->pch_type = PCH_LPT; |
475 | DRM_DEBUG_KMS("Found LynxPoint LP PCH\n"); | 469 | DRM_DEBUG_KMS("Found LynxPoint LP PCH\n"); |
476 | WARN_ON(!IS_HASWELL(dev)); | 470 | WARN_ON(!IS_HASWELL(dev) && !IS_BROADWELL(dev)); |
477 | WARN_ON(!IS_HSW_ULT(dev)); | 471 | WARN_ON(!IS_HSW_ULT(dev) && !IS_BDW_ULT(dev)); |
478 | } else if (id == INTEL_PCH_SPT_DEVICE_ID_TYPE) { | 472 | } else if (id == INTEL_PCH_SPT_DEVICE_ID_TYPE) { |
479 | dev_priv->pch_type = PCH_SPT; | 473 | dev_priv->pch_type = PCH_SPT; |
480 | DRM_DEBUG_KMS("Found SunrisePoint PCH\n"); | 474 | DRM_DEBUG_KMS("Found SunrisePoint PCH\n"); |
@@ -940,8 +934,7 @@ static int i915_pm_suspend(struct device *dev) | |||
940 | 934 | ||
941 | static int i915_pm_suspend_late(struct device *dev) | 935 | static int i915_pm_suspend_late(struct device *dev) |
942 | { | 936 | { |
943 | struct pci_dev *pdev = to_pci_dev(dev); | 937 | struct drm_device *drm_dev = dev_to_i915(dev)->dev; |
944 | struct drm_device *drm_dev = pci_get_drvdata(pdev); | ||
945 | 938 | ||
946 | /* | 939 | /* |
947 | * We have a suspedn ordering issue with the snd-hda driver also | 940 | * We have a suspedn ordering issue with the snd-hda driver also |
@@ -960,8 +953,7 @@ static int i915_pm_suspend_late(struct device *dev) | |||
960 | 953 | ||
961 | static int i915_pm_resume_early(struct device *dev) | 954 | static int i915_pm_resume_early(struct device *dev) |
962 | { | 955 | { |
963 | struct pci_dev *pdev = to_pci_dev(dev); | 956 | struct drm_device *drm_dev = dev_to_i915(dev)->dev; |
964 | struct drm_device *drm_dev = pci_get_drvdata(pdev); | ||
965 | 957 | ||
966 | if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF) | 958 | if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF) |
967 | return 0; | 959 | return 0; |
@@ -971,8 +963,7 @@ static int i915_pm_resume_early(struct device *dev) | |||
971 | 963 | ||
972 | static int i915_pm_resume(struct device *dev) | 964 | static int i915_pm_resume(struct device *dev) |
973 | { | 965 | { |
974 | struct pci_dev *pdev = to_pci_dev(dev); | 966 | struct drm_device *drm_dev = dev_to_i915(dev)->dev; |
975 | struct drm_device *drm_dev = pci_get_drvdata(pdev); | ||
976 | 967 | ||
977 | if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF) | 968 | if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF) |
978 | return 0; | 969 | return 0; |