diff options
| -rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 14 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_gem_execbuffer.c | 12 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/i915_gem_internal.c | 12 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/i915/intel_dpll_mgr.c | 3 |
6 files changed, 34 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index b2c4a0b8a627..728ca3ea74d2 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
| @@ -213,7 +213,8 @@ static void intel_detect_pch(struct drm_device *dev) | |||
| 213 | } else if (id == INTEL_PCH_KBP_DEVICE_ID_TYPE) { | 213 | } else if (id == INTEL_PCH_KBP_DEVICE_ID_TYPE) { |
| 214 | dev_priv->pch_type = PCH_KBP; | 214 | dev_priv->pch_type = PCH_KBP; |
| 215 | DRM_DEBUG_KMS("Found KabyPoint PCH\n"); | 215 | DRM_DEBUG_KMS("Found KabyPoint PCH\n"); |
| 216 | WARN_ON(!IS_KABYLAKE(dev_priv)); | 216 | WARN_ON(!IS_SKYLAKE(dev_priv) && |
| 217 | !IS_KABYLAKE(dev_priv)); | ||
| 217 | } else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) || | 218 | } else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) || |
| 218 | (id == INTEL_PCH_P3X_DEVICE_ID_TYPE) || | 219 | (id == INTEL_PCH_P3X_DEVICE_ID_TYPE) || |
| 219 | ((id == INTEL_PCH_QEMU_DEVICE_ID_TYPE) && | 220 | ((id == INTEL_PCH_QEMU_DEVICE_ID_TYPE) && |
| @@ -2427,6 +2428,7 @@ static int intel_runtime_resume(struct device *kdev) | |||
| 2427 | * we can do is to hope that things will still work (and disable RPM). | 2428 | * we can do is to hope that things will still work (and disable RPM). |
| 2428 | */ | 2429 | */ |
| 2429 | i915_gem_init_swizzling(dev_priv); | 2430 | i915_gem_init_swizzling(dev_priv); |
| 2431 | i915_gem_restore_fences(dev_priv); | ||
| 2430 | 2432 | ||
| 2431 | intel_runtime_pm_enable_interrupts(dev_priv); | 2433 | intel_runtime_pm_enable_interrupts(dev_priv); |
| 2432 | 2434 | ||
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 4b23a7814713..24b5b046754b 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
| @@ -2010,8 +2010,16 @@ void i915_gem_runtime_suspend(struct drm_i915_private *dev_priv) | |||
| 2010 | for (i = 0; i < dev_priv->num_fence_regs; i++) { | 2010 | for (i = 0; i < dev_priv->num_fence_regs; i++) { |
| 2011 | struct drm_i915_fence_reg *reg = &dev_priv->fence_regs[i]; | 2011 | struct drm_i915_fence_reg *reg = &dev_priv->fence_regs[i]; |
| 2012 | 2012 | ||
| 2013 | if (WARN_ON(reg->pin_count)) | 2013 | /* Ideally we want to assert that the fence register is not |
| 2014 | continue; | 2014 | * live at this point (i.e. that no piece of code will be |
| 2015 | * trying to write through fence + GTT, as that both violates | ||
| 2016 | * our tracking of activity and associated locking/barriers, | ||
| 2017 | * but also is illegal given that the hw is powered down). | ||
| 2018 | * | ||
| 2019 | * Previously we used reg->pin_count as a "liveness" indicator. | ||
| 2020 | * That is not sufficient, and we need a more fine-grained | ||
| 2021 | * tool if we want to have a sanity check here. | ||
| 2022 | */ | ||
| 2015 | 2023 | ||
| 2016 | if (!reg->vma) | 2024 | if (!reg->vma) |
| 2017 | continue; | 2025 | continue; |
| @@ -3478,7 +3486,7 @@ i915_gem_object_pin_to_display_plane(struct drm_i915_gem_object *obj, | |||
| 3478 | vma->display_alignment = max_t(u64, vma->display_alignment, alignment); | 3486 | vma->display_alignment = max_t(u64, vma->display_alignment, alignment); |
| 3479 | 3487 | ||
| 3480 | /* Treat this as an end-of-frame, like intel_user_framebuffer_dirty() */ | 3488 | /* Treat this as an end-of-frame, like intel_user_framebuffer_dirty() */ |
| 3481 | if (obj->cache_dirty) { | 3489 | if (obj->cache_dirty || obj->base.write_domain == I915_GEM_DOMAIN_CPU) { |
| 3482 | i915_gem_clflush_object(obj, true); | 3490 | i915_gem_clflush_object(obj, true); |
| 3483 | intel_fb_obj_flush(obj, false, ORIGIN_DIRTYFB); | 3491 | intel_fb_obj_flush(obj, false, ORIGIN_DIRTYFB); |
| 3484 | } | 3492 | } |
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 097d9d8c2315..b8b877c91b0a 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |||
| @@ -1181,14 +1181,14 @@ validate_exec_list(struct drm_device *dev, | |||
| 1181 | if (exec[i].offset != | 1181 | if (exec[i].offset != |
| 1182 | gen8_canonical_addr(exec[i].offset & PAGE_MASK)) | 1182 | gen8_canonical_addr(exec[i].offset & PAGE_MASK)) |
| 1183 | return -EINVAL; | 1183 | return -EINVAL; |
| 1184 | |||
| 1185 | /* From drm_mm perspective address space is continuous, | ||
| 1186 | * so from this point we're always using non-canonical | ||
| 1187 | * form internally. | ||
| 1188 | */ | ||
| 1189 | exec[i].offset = gen8_noncanonical_addr(exec[i].offset); | ||
| 1190 | } | 1184 | } |
| 1191 | 1185 | ||
| 1186 | /* From drm_mm perspective address space is continuous, | ||
| 1187 | * so from this point we're always using non-canonical | ||
| 1188 | * form internally. | ||
| 1189 | */ | ||
| 1190 | exec[i].offset = gen8_noncanonical_addr(exec[i].offset); | ||
| 1191 | |||
| 1192 | if (exec[i].alignment && !is_power_of_2(exec[i].alignment)) | 1192 | if (exec[i].alignment && !is_power_of_2(exec[i].alignment)) |
| 1193 | return -EINVAL; | 1193 | return -EINVAL; |
| 1194 | 1194 | ||
diff --git a/drivers/gpu/drm/i915/i915_gem_internal.c b/drivers/gpu/drm/i915/i915_gem_internal.c index 4b3ff3e5b911..d09c74973cb3 100644 --- a/drivers/gpu/drm/i915/i915_gem_internal.c +++ b/drivers/gpu/drm/i915/i915_gem_internal.c | |||
| @@ -66,8 +66,16 @@ i915_gem_object_get_pages_internal(struct drm_i915_gem_object *obj) | |||
| 66 | 66 | ||
| 67 | max_order = MAX_ORDER; | 67 | max_order = MAX_ORDER; |
| 68 | #ifdef CONFIG_SWIOTLB | 68 | #ifdef CONFIG_SWIOTLB |
| 69 | if (swiotlb_nr_tbl()) /* minimum max swiotlb size is IO_TLB_SEGSIZE */ | 69 | if (swiotlb_nr_tbl()) { |
| 70 | max_order = min(max_order, ilog2(IO_TLB_SEGPAGES)); | 70 | unsigned int max_segment; |
| 71 | |||
| 72 | max_segment = swiotlb_max_segment(); | ||
| 73 | if (max_segment) { | ||
| 74 | max_segment = max_t(unsigned int, max_segment, | ||
| 75 | PAGE_SIZE) >> PAGE_SHIFT; | ||
| 76 | max_order = min(max_order, ilog2(max_segment)); | ||
| 77 | } | ||
| 78 | } | ||
| 71 | #endif | 79 | #endif |
| 72 | 80 | ||
| 73 | gfp = GFP_KERNEL | __GFP_HIGHMEM | __GFP_RECLAIMABLE; | 81 | gfp = GFP_KERNEL | __GFP_HIGHMEM | __GFP_RECLAIMABLE; |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f1e4a21d4664..891c86aef99d 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
| @@ -4262,10 +4262,10 @@ static void page_flip_completed(struct intel_crtc *intel_crtc) | |||
| 4262 | drm_crtc_vblank_put(&intel_crtc->base); | 4262 | drm_crtc_vblank_put(&intel_crtc->base); |
| 4263 | 4263 | ||
| 4264 | wake_up_all(&dev_priv->pending_flip_queue); | 4264 | wake_up_all(&dev_priv->pending_flip_queue); |
| 4265 | queue_work(dev_priv->wq, &work->unpin_work); | ||
| 4266 | |||
| 4267 | trace_i915_flip_complete(intel_crtc->plane, | 4265 | trace_i915_flip_complete(intel_crtc->plane, |
| 4268 | work->pending_flip_obj); | 4266 | work->pending_flip_obj); |
| 4267 | |||
| 4268 | queue_work(dev_priv->wq, &work->unpin_work); | ||
| 4269 | } | 4269 | } |
| 4270 | 4270 | ||
| 4271 | static int intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc) | 4271 | static int intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc) |
diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c b/drivers/gpu/drm/i915/intel_dpll_mgr.c index 58a756f2f224..a2f0e070d38d 100644 --- a/drivers/gpu/drm/i915/intel_dpll_mgr.c +++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c | |||
| @@ -1730,7 +1730,8 @@ bxt_get_dpll(struct intel_crtc *crtc, | |||
| 1730 | return NULL; | 1730 | return NULL; |
| 1731 | 1731 | ||
| 1732 | if ((encoder->type == INTEL_OUTPUT_DP || | 1732 | if ((encoder->type == INTEL_OUTPUT_DP || |
| 1733 | encoder->type == INTEL_OUTPUT_EDP) && | 1733 | encoder->type == INTEL_OUTPUT_EDP || |
| 1734 | encoder->type == INTEL_OUTPUT_DP_MST) && | ||
| 1734 | !bxt_ddi_dp_set_dpll_hw_state(clock, &dpll_hw_state)) | 1735 | !bxt_ddi_dp_set_dpll_hw_state(clock, &dpll_hw_state)) |
| 1735 | return NULL; | 1736 | return NULL; |
| 1736 | 1737 | ||
