diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-24 10:04:56 +0300 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-24 10:04:56 +0300 | 
| commit | c353bfc6ebc1073f2f0af72a15f8f18db7193d2e (patch) | |
| tree | 5f9335398fc199756de6d73a9464407a9d68ead3 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
| parent | 1d3bc6363a7d14393e7e66f092645e2229b39954 (diff) | |
| parent | 98ecf1a308977505381b5c360b039a84cf67513c (diff) | |
| download | linux-c353bfc6ebc1073f2f0af72a15f8f18db7193d2e.tar.xz | |
Merge tag 'drm-for-v4.15-part2' of git://people.freedesktop.org/~airlied/linux
Pull more drm updates from Dave Airlie:
 "Fixes/cleanups for rc1, non-desktop flags for VR
   - remove the MSM dt-bindings file Rob managed to push in the previous
     pull.
   - add a property/edid quirk to denote HMD devices, I had these
     hanging around for a few weeks and Keith had done some work on
     them, they are fairly self contained and small, and only affect
     people using HTC Vive VR headsets so far.
   - amdgpu, tegra, tilcdc, fsl fixes
   - some imx-drm cleanups I missed, these seemed pretty small, and no
     reason to hold off.
  I have one TTM regression fix (fixes bochs-vga in qemu) sitting
  locally awaiting review I'll probably send that in a separate pull
  request tomorrow"
* tag 'drm-for-v4.15-part2' of git://people.freedesktop.org/~airlied/linux: (33 commits)
  dt-bindings: remove file that was added accidentally
  drm/edid: quirk HTC vive headset as non-desktop. [v2]
  drm/fb: add support for not enabling fbcon on non-desktop displays [v2]
  drm: add connector info/property for non-desktop displays [v2]
  drm/amdgpu: fix rmmod KCQ disable failed error
  drm/amdgpu: fix kernel hang when starting VNC server
  drm/amdgpu: don't skip attributes when powerplay is enabled
  drm/amd/pp: fix typecast error in powerplay.
  drm/tilcdc: Remove obsolete "ti,tilcdc,slave" dts binding support
  drm/tegra: sor: Reimplement pad clock
  Revert "drm/radeon: dont switch vt on suspend"
  drm/amd/amdgpu: fix over-bound accessing in amdgpu_cs_wait_any_fence
  drm/amd/powerplay: fix unfreeze level smc message for smu7
  drm/amdgpu:fix memleak
  drm/amdgpu:fix memleak in takedown
  drm/amd/pp: fix dpm randomly failed on Vega10
  drm/amdgpu: set f_mapping on exported DMA-bufs
  drm/amdgpu: Properly allocate VM invalidate eng v2
  drm/fsl-dcu: enable IRQ before drm_atomic_helper_resume()
  drm/fsl-dcu: avoid disabling pixel clock twice on suspend
  ...
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 15 | 
1 files changed, 8 insertions, 7 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index a418df1b9422..e87eedcc0da9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -63,6 +63,11 @@ retry:  			     flags, NULL, resv, 0, &bo);  	if (r) {  		if (r != -ERESTARTSYS) { +			if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) { +				flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; +				goto retry; +			} +  			if (initial_domain == AMDGPU_GEM_DOMAIN_VRAM) {  				initial_domain |= AMDGPU_GEM_DOMAIN_GTT;  				goto retry; @@ -323,7 +328,7 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,  		r = amdgpu_ttm_tt_get_user_pages(bo->tbo.ttm,  						 bo->tbo.ttm->pages);  		if (r) -			goto unlock_mmap_sem; +			goto release_object;  		r = amdgpu_bo_reserve(bo, true);  		if (r) @@ -348,9 +353,6 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,  free_pages:  	release_pages(bo->tbo.ttm->pages, bo->tbo.ttm->num_pages); -unlock_mmap_sem: -	up_read(¤t->mm->mmap_sem); -  release_object:  	drm_gem_object_put_unlocked(gobj); @@ -556,9 +558,8 @@ int amdgpu_gem_va_ioctl(struct drm_device *dev, void *data,  	if (args->va_address < AMDGPU_VA_RESERVED_SIZE) {  		dev_err(&dev->pdev->dev, -			"va_address 0x%lX is in reserved area 0x%X\n", -			(unsigned long)args->va_address, -			AMDGPU_VA_RESERVED_SIZE); +			"va_address 0x%LX is in reserved area 0x%LX\n", +			args->va_address, AMDGPU_VA_RESERVED_SIZE);  		return -EINVAL;  	} | 
