diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-04 16:30:13 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-11-04 16:30:13 -0400 |
| commit | d4c5f43dcd05529236a0f957b27d2597c24e5f69 (patch) | |
| tree | bc7e29c358bc1e557799a6d3b2dc38ddfa619ac7 | |
| parent | 66cecb67894b35c6af17eb4e6b6aaec6c8957c2e (diff) | |
| parent | 7ec30fca2c966293c4593e20459861b106fd62e9 (diff) | |
Merge tag 'drm-fixes-for-v4.9-rc4' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
"Fixes for amdgpu, radeon, intel, imx and virtio-gpu.
This is a bit larger than I'd like, but I had some stuff I meant to
send for -rc3 but was waiting for the PAT regression fix to land. So
this is really fixes for rc3 and rc4 in one go.
There are a set of fixes for an oops we've been seeing around MST
display unplug, along with more suspend/resume and shutdown fixes for
amdgpu, one power management follow on fix for nouveau, and set of imx
fixes, and a single virtio-gpu regression fix"
* tag 'drm-fixes-for-v4.9-rc4' of git://people.freedesktop.org/~airlied/linux: (54 commits)
virtio-gpu: fix vblank events
drm/nouveau/acpi: fix check for power resources support
drm/i915: Fix SKL+ 90/270 degree rotated plane coordinate computation
drm/i915: Remove two invalid warns
drm/i915: Rotated view does not need a fence
drm/i915/fbc: fix CFB size calculation for gen8+
drm: i915: Wait for fences on new fb, not old
drm/i915: Clean up DDI DDC/AUX CH sanitation
drm/i915: Respect alternate_aux_channel for all DDI ports
drm/i915/gen9: fix watermarks when using the pipe scaler
drm/i915: Fix mismatched INIT power domain disabling during suspend
drm/i915: fix a read size argument
drm/i915: Use fence_write() from rpm resume
drm/i915/gen9: fix DDB partitioning for multi-screen cases
drm/i915: workaround sparse warning on variable length arrays
drm/i915: keep declarations in i915_drv.h
drm/amd/powerplay: fix bug get wrong evv voltage of Polaris.
drm/amdgpu/si_dpm: workaround for SI kickers
drm/radeon/si_dpm: workaround for SI kickers
drm/amdgpu: fix s3 resume back, uvd dpm randomly can't disable.
...
52 files changed, 450 insertions, 241 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index b0f6e6957536..82dc8d20e28a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
| @@ -519,7 +519,8 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, | |||
| 519 | r = ttm_eu_reserve_buffers(&p->ticket, &p->validated, true, | 519 | r = ttm_eu_reserve_buffers(&p->ticket, &p->validated, true, |
| 520 | &duplicates); | 520 | &duplicates); |
| 521 | if (unlikely(r != 0)) { | 521 | if (unlikely(r != 0)) { |
| 522 | DRM_ERROR("ttm_eu_reserve_buffers failed.\n"); | 522 | if (r != -ERESTARTSYS) |
| 523 | DRM_ERROR("ttm_eu_reserve_buffers failed.\n"); | ||
| 523 | goto error_free_pages; | 524 | goto error_free_pages; |
| 524 | } | 525 | } |
| 525 | 526 | ||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index b4f4a9239069..7ca07e7b25c1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
| @@ -1959,6 +1959,7 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon) | |||
| 1959 | /* evict remaining vram memory */ | 1959 | /* evict remaining vram memory */ |
| 1960 | amdgpu_bo_evict_vram(adev); | 1960 | amdgpu_bo_evict_vram(adev); |
| 1961 | 1961 | ||
| 1962 | amdgpu_atombios_scratch_regs_save(adev); | ||
| 1962 | pci_save_state(dev->pdev); | 1963 | pci_save_state(dev->pdev); |
| 1963 | if (suspend) { | 1964 | if (suspend) { |
| 1964 | /* Shut down the device */ | 1965 | /* Shut down the device */ |
| @@ -2010,6 +2011,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon) | |||
| 2010 | return r; | 2011 | return r; |
| 2011 | } | 2012 | } |
| 2012 | } | 2013 | } |
| 2014 | amdgpu_atombios_scratch_regs_restore(adev); | ||
| 2013 | 2015 | ||
| 2014 | /* post card */ | 2016 | /* post card */ |
| 2015 | if (!amdgpu_card_posted(adev) || !resume) { | 2017 | if (!amdgpu_card_posted(adev) || !resume) { |
| @@ -2268,8 +2270,6 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev) | |||
| 2268 | } | 2270 | } |
| 2269 | 2271 | ||
| 2270 | if (need_full_reset) { | 2272 | if (need_full_reset) { |
| 2271 | /* save scratch */ | ||
| 2272 | amdgpu_atombios_scratch_regs_save(adev); | ||
| 2273 | r = amdgpu_suspend(adev); | 2273 | r = amdgpu_suspend(adev); |
| 2274 | 2274 | ||
| 2275 | retry: | 2275 | retry: |
| @@ -2279,8 +2279,9 @@ retry: | |||
| 2279 | amdgpu_display_stop_mc_access(adev, &save); | 2279 | amdgpu_display_stop_mc_access(adev, &save); |
| 2280 | amdgpu_wait_for_idle(adev, AMD_IP_BLOCK_TYPE_GMC); | 2280 | amdgpu_wait_for_idle(adev, AMD_IP_BLOCK_TYPE_GMC); |
| 2281 | } | 2281 | } |
| 2282 | 2282 | amdgpu_atombios_scratch_regs_save(adev); | |
| 2283 | r = amdgpu_asic_reset(adev); | 2283 | r = amdgpu_asic_reset(adev); |
| 2284 | amdgpu_atombios_scratch_regs_restore(adev); | ||
| 2284 | /* post card */ | 2285 | /* post card */ |
| 2285 | amdgpu_atom_asic_init(adev->mode_info.atom_context); | 2286 | amdgpu_atom_asic_init(adev->mode_info.atom_context); |
| 2286 | 2287 | ||
| @@ -2288,8 +2289,6 @@ retry: | |||
| 2288 | dev_info(adev->dev, "GPU reset succeeded, trying to resume\n"); | 2289 | dev_info(adev->dev, "GPU reset succeeded, trying to resume\n"); |
| 2289 | r = amdgpu_resume(adev); | 2290 | r = amdgpu_resume(adev); |
| 2290 | } | 2291 | } |
| 2291 | /* restore scratch */ | ||
| 2292 | amdgpu_atombios_scratch_regs_restore(adev); | ||
| 2293 | } | 2292 | } |
| 2294 | if (!r) { | 2293 | if (!r) { |
| 2295 | amdgpu_irq_gpu_reset_resume_helper(adev); | 2294 | amdgpu_irq_gpu_reset_resume_helper(adev); |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 3a2e42f4b897..77b34ec92632 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | |||
| @@ -68,6 +68,7 @@ int amdgpu_fence_slab_init(void) | |||
| 68 | 68 | ||
| 69 | void amdgpu_fence_slab_fini(void) | 69 | void amdgpu_fence_slab_fini(void) |
| 70 | { | 70 | { |
| 71 | rcu_barrier(); | ||
| 71 | kmem_cache_destroy(amdgpu_fence_slab); | 72 | kmem_cache_destroy(amdgpu_fence_slab); |
| 72 | } | 73 | } |
| 73 | /* | 74 | /* |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c index 278708f5a744..9fa809876339 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |||
| @@ -239,6 +239,7 @@ int amdgpu_irq_init(struct amdgpu_device *adev) | |||
| 239 | if (r) { | 239 | if (r) { |
| 240 | adev->irq.installed = false; | 240 | adev->irq.installed = false; |
| 241 | flush_work(&adev->hotplug_work); | 241 | flush_work(&adev->hotplug_work); |
| 242 | cancel_work_sync(&adev->reset_work); | ||
| 242 | return r; | 243 | return r; |
| 243 | } | 244 | } |
| 244 | 245 | ||
| @@ -264,6 +265,7 @@ void amdgpu_irq_fini(struct amdgpu_device *adev) | |||
| 264 | if (adev->irq.msi_enabled) | 265 | if (adev->irq.msi_enabled) |
| 265 | pci_disable_msi(adev->pdev); | 266 | pci_disable_msi(adev->pdev); |
| 266 | flush_work(&adev->hotplug_work); | 267 | flush_work(&adev->hotplug_work); |
| 268 | cancel_work_sync(&adev->reset_work); | ||
| 267 | } | 269 | } |
| 268 | 270 | ||
