aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-08 14:31:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-08 14:31:16 -0400
commit3f17ea6dea8ba5668873afa54628a91aaa3fb1c0 (patch)
treeafbeb2accd4c2199ddd705ae943995b143a0af02 /drivers/gpu
parent1860e379875dfe7271c649058aeddffe5afd9d0d (diff)
parent1a5700bc2d10cd379a795fd2bb377a190af5acd4 (diff)
Merge branch 'next' (accumulated 3.16 merge window patches) into master
Now that 3.15 is released, this merges the 'next' branch into 'master', bringing us to the normal situation where my 'master' branch is the merge window. * accumulated work in next: (6809 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_irq.c10
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_g2d.c6
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_ipp.c2
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c2
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_backlight.c9
-rw-r--r--drivers/gpu/drm/udl/udl_main.c3
6 files changed, 14 insertions, 18 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index c2676b5908d9..ec5c3f4cdd01 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -156,7 +156,7 @@ static void vblank_disable_and_save(struct drm_device *dev, int crtc)
156 */ 156 */
157 if ((vblrc > 0) && (abs64(diff_ns) > 1000000)) { 157 if ((vblrc > 0) && (abs64(diff_ns) > 1000000)) {
158 atomic_inc(&dev->vblank[crtc].count); 158 atomic_inc(&dev->vblank[crtc].count);
159 smp_mb__after_atomic_inc(); 159 smp_mb__after_atomic();
160 } 160 }
161 161
162 /* Invalidate all timestamps while vblank irq's are off. */ 162 /* Invalidate all timestamps while vblank irq's are off. */
@@ -864,9 +864,9 @@ static void drm_update_vblank_count(struct drm_device *dev, int crtc)
864 vblanktimestamp(dev, crtc, tslot) = t_vblank; 864 vblanktimestamp(dev, crtc, tslot) = t_vblank;
865 } 865 }
866 866
867 smp_mb__before_atomic_inc(); 867 smp_mb__before_atomic();
868 atomic_add(diff, &dev->vblank[crtc].count); 868 atomic_add(diff, &dev->vblank[crtc].count);
869 smp_mb__after_atomic_inc(); 869 smp_mb__after_atomic();
870} 870}
871 871
872/** 872/**
@@ -1330,9 +1330,9 @@ bool drm_handle_vblank(struct drm_device *dev, int crtc)
1330 /* Increment cooked vblank count. This also atomically commits 1330 /* Increment cooked vblank count. This also atomically commits
1331 * the timestamp computed above. 1331 * the timestamp computed above.
1332 */ 1332 */
1333 smp_mb__before_atomic_inc(); 1333 smp_mb__before_atomic();
1334 atomic_inc(&dev->vblank[crtc].count); 1334 atomic_inc(&dev->vblank[crtc].count);
1335 smp_mb__after_atomic_inc(); 1335 smp_mb__after_atomic();
1336 } else { 1336 } else {
1337 DRM_DEBUG("crtc %d: Redundant vblirq ignored. diff_ns = %d\n", 1337 DRM_DEBUG("crtc %d: Redundant vblirq ignored. diff_ns = %d\n",
1338 crtc, (int) diff_ns); 1338 crtc, (int) diff_ns);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index 6c1885eedfdf..800158714473 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -467,14 +467,17 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct drm_device *drm_dev,
467 goto err_free; 467 goto err_free;
468 } 468 }
469 469
470 down_read(&current->mm->mmap_sem);
470 vma = find_vma(current->mm, userptr); 471 vma = find_vma(current->mm, userptr);
471 if (!vma) { 472 if (!vma) {
473 up_read(&current->mm->mmap_sem);
472 DRM_ERROR("failed to get vm region.\n"); 474 DRM_ERROR("failed to get vm region.\n");
473 ret = -EFAULT; 475 ret = -EFAULT;
474 goto err_free_pages; 476 goto err_free_pages;
475 } 477 }
476 478
477 if (vma->vm_end < userptr + size) { 479 if (vma->vm_end < userptr + size) {
480 up_read(&current->mm->mmap_sem);
478 DRM_ERROR("vma is too small.\n"); 481 DRM_ERROR("vma is too small.\n");
479 ret = -EFAULT; 482 ret = -EFAULT;
480 goto err_free_pages; 483 goto err_free_pages;
@@ -482,6 +485,7 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct drm_device *drm_dev,
482 485
483 g2d_userptr->vma = exynos_gem_get_vma(vma); 486 g2d_userptr->vma = exynos_gem_get_vma(vma);
484 if (!g2d_userptr->vma) { 487 if (!g2d_userptr->vma) {
488 up_read(&current->mm->mmap_sem);
485 DRM_ERROR("failed to copy vma.\n"); 489 DRM_ERROR("failed to copy vma.\n");
486 ret = -ENOMEM; 490 ret = -ENOMEM;
487 goto err_free_pages; 491 goto err_free_pages;
@@ -492,10 +496,12 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct drm_device *drm_dev,
492 ret = exynos_gem_get_pages_from_userptr(start & PAGE_MASK, 496 ret = exynos_gem_get_pages_from_userptr(start & PAGE_MASK,
493 npages, pages, vma); 497 npages, pages, vma);
494 if (ret < 0) { 498 if (ret < 0) {
499 up_read(&current->mm->mmap_sem);
495 DRM_ERROR("failed to get user pages from userptr.\n"); 500 DRM_ERROR("failed to get user pages from userptr.\n");
496 goto err_put_vma; 501 goto err_put_vma;
497 } 502 }
498 503
504 up_read(&current->mm->mmap_sem);
499 g2d_userptr->pages = pages; 505 g2d_userptr->pages = pages;
500 506
501 sgt = kzalloc(sizeof(*sgt), GFP_KERNEL); 507 sgt = kzalloc(sizeof(*sgt), GFP_KERNEL);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index 09312b877470..3d78144387ac 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -284,7 +284,7 @@ static struct exynos_drm_ippdrv *ipp_find_drv_by_handle(u32 prop_id)
284 /* 284 /*
285 * This case is search ipp driver by prop_id handle. 285 * This case is search ipp driver by prop_id handle.
286 * sometimes, ipp subsystem find driver by prop_id. 286 * sometimes, ipp subsystem find driver by prop_id.
287 * e.g PAUSE state, queue buf, command contro. 287 * e.g PAUSE state, queue buf, command control.
288 */ 288 */
289 list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) { 289 list_for_each_entry(ippdrv, &exynos_drm_ippdrv_list, drv_list) {
290 DRM_DEBUG_KMS("count[%d]ippdrv[0x%x]\n", count++, (int)ippdrv); 290 DRM_DEBUG_KMS("count[%d]ippdrv[0x%x]\n", count++, (int)ippdrv);
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index f98ba4e6e70b..0b99de95593b 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -2157,7 +2157,7 @@ static void i915_error_work_func(struct work_struct *work)
2157 * updates before 2157 * updates before
2158 * the counter increment. 2158 * the counter increment.
2159 */ 2159 */
2160 smp_mb__before_atomic_inc(); 2160 smp_mb__before_atomic();
2161 atomic_inc(&dev_priv->gpu_error.reset_counter); 2161 atomic_inc(&dev_priv->gpu_error.reset_counter);
2162 2162
2163 kobject_uevent_env(&dev->primary->kdev->kobj, 2163 kobject_uevent_env(&dev->primary->kdev->kobj,
diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/nouveau_backlight.c
index 630f6e84fc01..2c1e4aad7da3 100644
--- a/drivers/gpu/drm/nouveau/nouveau_backlight.c
+++ b/drivers/gpu/drm/nouveau/nouveau_backlight.c
@@ -31,7 +31,6 @@
31 */ 31 */
32 32
33#include <linux/backlight.h> 33#include <linux/backlight.h>
34#include <linux/acpi.h>
35 34
36#include "nouveau_drm.h" 35#include "nouveau_drm.h"
37#include "nouveau_reg.h" 36#include "nouveau_reg.h"
@@ -222,14 +221,6 @@ nouveau_backlight_init(struct drm_device *dev)
222 struct nouveau_device *device = nv_device(drm->device); 221 struct nouveau_device *device = nv_device(drm->device);
223 struct drm_connector *connector; 222 struct drm_connector *connector;
224 223
225#ifdef CONFIG_ACPI
226 if (acpi_video_backlight_support()) {
227 NV_INFO(drm, "ACPI backlight interface available, "
228 "not registering our own\n");
229 return 0;
230 }
231#endif
232
233 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 224 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
234 if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && 225 if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS &&
235 connector->connector_type != DRM_MODE_CONNECTOR_eDP) 226 connector->connector_type != DRM_MODE_CONNECTOR_eDP)
diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c
index f5ae57406f34..afdf383f630a 100644
--- a/drivers/gpu/drm/udl/udl_main.c
+++ b/drivers/gpu/drm/udl/udl_main.c
@@ -283,7 +283,7 @@ int udl_submit_urb(struct drm_device *dev, struct urb *urb, size_t len)
283int udl_driver_load(struct drm_device *dev, unsigned long flags) 283int udl_driver_load(struct drm_device *dev, unsigned long flags)
284{ 284{
285 struct udl_device *udl; 285 struct udl_device *udl;
286 int ret; 286 int ret = -ENOMEM;
287 287
288 DRM_DEBUG("\n"); 288 DRM_DEBUG("\n");
289 udl = kzalloc(sizeof(struct udl_device), GFP_KERNEL); 289 udl = kzalloc(sizeof(struct udl_device), GFP_KERNEL);
@@ -299,7 +299,6 @@ int udl_driver_load(struct drm_device *dev, unsigned long flags)
299 } 299 }
300 300
301 if (!udl_alloc_urb_list(dev, WRITES_IN_FLIGHT, MAX_TRANSFER)) { 301 if (!udl_alloc_urb_list(dev, WRITES_IN_FLIGHT, MAX_TRANSFER)) {
302 ret = -ENOMEM;
303 DRM_ERROR("udl_alloc_urb_list failed\n"); 302 DRM_ERROR("udl_alloc_urb_list failed\n");
304 goto err; 303 goto err;
305 } 304 }