diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-29 23:16:57 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-09-29 23:16:57 -0400 |
| commit | e3b3656ca63e23b5755183718df36fb9ff518b02 (patch) | |
| tree | 3e8d9954353530e785b31d9967720bb491b2a413 | |
| parent | c6169de7308b397824bd418c5b871b5a42de83d2 (diff) | |
| parent | 90fd68dcf9a763f7e575c8467415bd8a66d073f4 (diff) | |
Merge tag 'drm-fixes-for-v4.8-final' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
"drm fixes for final 4.8.
One big regression fix for udl, along with two amdgpu fixes and two
nouveau fixes.
All seems pretty safe and useful"
* tag 'drm-fixes-for-v4.8-final' of git://people.freedesktop.org/~airlied/linux:
drm/udl: fix line iterator in damage handling
drm/radeon/si/dpm: add workaround for for Jet parts
drm/amdgpu: disable CRTCs before teardown
drm/nouveau: Revert "bus: remove cpu_coherent flag"
drm/nouveau/fifo/nv04: avoid ramht race against cookie insertion
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/radeon/si_dpm.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/udl/udl_fb.c | 2 |
8 files changed, 16 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index df7ab2458e50..39c01b942ee4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
| @@ -1708,11 +1708,11 @@ void amdgpu_device_fini(struct amdgpu_device *adev) | |||
| 1708 | 1708 | ||
| 1709 | DRM_INFO("amdgpu: finishing device.\n"); | 1709 | DRM_INFO("amdgpu: finishing device.\n"); |
| 1710 | adev->shutdown = true; | 1710 | adev->shutdown = true; |
| 1711 | drm_crtc_force_disable_all(adev->ddev); | ||
| 1711 | /* evict vram memory */ | 1712 | /* evict vram memory */ |
| 1712 | amdgpu_bo_evict_vram(adev); | 1713 | amdgpu_bo_evict_vram(adev); |
| 1713 | amdgpu_ib_pool_fini(adev); | 1714 | amdgpu_ib_pool_fini(adev); |
| 1714 | amdgpu_fence_driver_fini(adev); | 1715 | amdgpu_fence_driver_fini(adev); |
| 1715 | drm_crtc_force_disable_all(adev->ddev); | ||
| 1716 | amdgpu_fbdev_fini(adev); | 1716 | amdgpu_fbdev_fini(adev); |
| 1717 | r = amdgpu_fini(adev); | 1717 | r = amdgpu_fini(adev); |
| 1718 | kfree(adev->ip_block_status); | 1718 | kfree(adev->ip_block_status); |
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h index 7ea8aa7ca408..6bc712f32c8b 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h | |||
| @@ -175,6 +175,7 @@ struct nvkm_device_func { | |||
| 175 | void (*fini)(struct nvkm_device *, bool suspend); | 175 | void (*fini)(struct nvkm_device *, bool suspend); |
| 176 | resource_size_t (*resource_addr)(struct nvkm_device *, unsigned bar); | 176 | resource_size_t (*resource_addr)(struct nvkm_device *, unsigned bar); |
| 177 | resource_size_t (*resource_size)(struct nvkm_device *, unsigned bar); | 177 | resource_size_t (*resource_size)(struct nvkm_device *, unsigned bar); |
| 178 | bool cpu_coherent; | ||
| 178 | }; | 179 | }; |
| 179 | 180 | ||
| 180 | struct nvkm_device_quirk { | 181 | struct nvkm_device_quirk { |
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 6190035edfea..864323b19cf7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
| @@ -209,7 +209,8 @@ nouveau_bo_new(struct drm_device *dev, int size, int align, | |||
| 209 | nvbo->tile_flags = tile_flags; | 209 | nvbo->tile_flags = tile_flags; |
| 210 | nvbo->bo.bdev = &drm->ttm.bdev; | 210 | nvbo->bo.bdev = &drm->ttm.bdev; |
| 211 | 211 | ||
| 212 | nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED; | 212 | if (!nvxx_device(&drm->device)->func->cpu_coherent) |
| 213 | nvbo->force_coherent = flags & TTM_PL_FLAG_UNCACHED; | ||
| 213 | 214 | ||
| 214 | nvbo->page_shift = 12; | 215 | nvbo->page_shift = 12; |
| 215 | if (drm->client.vm) { | 216 | if (drm->client.vm) { |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c index b1b693219db3..62ad0300cfa5 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | |||
| @@ -1614,6 +1614,7 @@ nvkm_device_pci_func = { | |||
| 1614 | .fini = nvkm_device_pci_fini, | 1614 | .fini = nvkm_device_pci_fini, |
| 1615 | .resource_addr = nvkm_device_pci_resource_addr, | 1615 | .resource_addr = nvkm_device_pci_resource_addr, |
| 1616 | .resource_size = nvkm_device_pci_resource_size, | 1616 | .resource_size = nvkm_device_pci_resource_size, |
| 1617 | .cpu_coherent = !IS_ENABLED(CONFIG_ARM), | ||
| 1617 | }; | 1618 | }; |
| 1618 | 1619 | ||
| 1619 | int | 1620 | int |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c index 939682f18788..9b638bd905ff 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | |||
| @@ -245,6 +245,7 @@ nvkm_device_tegra_func = { | |||
| 245 | .fini = nvkm_device_tegra_fini, | 245 | .fini = nvkm_device_tegra_fini, |
| 246 | .resource_addr = nvkm_device_tegra_resource_addr, | 246 | .resource_addr = nvkm_device_tegra_resource_addr, |
| 247 | .resource_size = nvkm_device_tegra_resource_size, | 247 | .resource_size = nvkm_device_tegra_resource_size, |
| 248 | .cpu_coherent = false, | ||
| 248 | }; | 249 | }; |
| 249 | 250 | ||
| 250 | int | 251 | int |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c index edec30fd3ecd..0a7b6ed5ed28 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c | |||
| @@ -37,7 +37,10 @@ nv04_fifo_dma_object_dtor(struct nvkm_fifo_chan *base, int cookie) | |||
| 37 | { | 37 | { |
| 38 | struct nv04_fifo_chan *chan = nv04_fifo_chan(base); | 38 | struct nv04_fifo_chan *chan = nv04_fifo_chan(base); |
| 39 | struct nvkm_instmem *imem = chan->fifo->base.engine.subdev.device->imem; | 39 | struct nvkm_instmem *imem = chan->fifo->base.engine.subdev.device->imem; |
| 40 | |||
| 41 | mutex_lock(&chan->fifo->base.engine.subdev.mutex); | ||
| 40 | nvkm_ramht_remove(imem->ramht, cookie); | 42 | nvkm_ramht_remove(imem->ramht, cookie); |
| 43 | mutex_unlock(&chan->fifo->base.engine.subdev.mutex); | ||
| 41 | } | 44 | } |
| 42 | 45 | ||
| 43 | static int | 46 | static int |
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index e6abc09b67e3..1f78ec2548ec 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c | |||
| @@ -3015,6 +3015,12 @@ static void si_apply_state_adjust_rules(struct radeon_device *rdev, | |||
| 3015 | if (rdev->pdev->device == 0x6811 && | 3015 | if (rdev->pdev->device == 0x6811 && |
| 3016 | rdev->pdev->revision == 0x81) | 3016 | rdev->pdev->revision == 0x81) |
| 3017 | max_mclk = 120000; | 3017 | max_mclk = 120000; |
| 3018 | /* limit sclk/mclk on Jet parts for stability */ | ||
| 3019 | if (rdev->pdev->device == 0x6665 && | ||
| 3020 | rdev->pdev->revision == 0xc3) { | ||
| 3021 | max_sclk = 75000; | ||
| 3022 | max_mclk = 80000; | ||
| 3023 | } | ||
| 3018 | 3024 | ||
| 3019 | if (rps->vce_active) { | 3025 | if (rps->vce_active) { |
| 3020 | rps->evclk = rdev->pm.dpm.vce_states[rdev->pm.dpm.vce_level].evclk; | 3026 | rps->evclk = rdev->pm.dpm.vce_states[rdev->pm.dpm.vce_level].evclk; |
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c index 9688bfa92ccd..611b6b9bb3cb 100644 --- a/drivers/gpu/drm/udl/udl_fb.c +++ b/drivers/gpu/drm/udl/udl_fb.c | |||
| @@ -122,7 +122,7 @@ int udl_handle_damage(struct udl_framebuffer *fb, int x, int y, | |||
| 122 | return 0; | 122 | return 0; |
| 123 | cmd = urb->transfer_buffer; | 123 | cmd = urb->transfer_buffer; |
| 124 | 124 | ||
| 125 | for (i = y; i < height ; i++) { | 125 | for (i = y; i < y + height ; i++) { |
| 126 | const int line_offset = fb->base.pitches[0] * i; | 126 | const int line_offset = fb->base.pitches[0] * i; |
| 127 | const int byte_offset = line_offset + (x * bpp); | 127 | const int byte_offset = line_offset + (x * bpp); |
| 128 | const int dev_byte_offset = (fb->base.width * bpp * i) + (x * bpp); | 128 | const int dev_byte_offset = (fb->base.width * bpp * i) + (x * bpp); |
