瀏覽代碼

Merge branch 'drm-fixes-4.8' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

Some AMD fixes and remove workaround now we have pcieport pm.

* 'drm-fixes-4.8' of git://people.freedesktop.org/~agd5f/linux:
  drm/amdgpu: Fix memory trashing if UVD ring test fails
  drm/amdgpu: fix vm init error path
  Revert "drm/radeon: work around lack of upstream ACPI support for D3cold"
  Revert "drm/amdgpu: work around lack of upstream ACPI support for D3cold"
Dave Airlie 9 年之前
父節點
當前提交
c3beef5e14

+ 0 - 9
drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c

@@ -200,16 +200,7 @@ static int amdgpu_atpx_validate(struct amdgpu_atpx *atpx)
 	atpx->is_hybrid = false;
 	atpx->is_hybrid = false;
 	if (valid_bits & ATPX_MS_HYBRID_GFX_SUPPORTED) {
 	if (valid_bits & ATPX_MS_HYBRID_GFX_SUPPORTED) {
 		printk("ATPX Hybrid Graphics\n");
 		printk("ATPX Hybrid Graphics\n");
-#if 1
-		/* This is a temporary hack until the D3 cold support
-		 * makes it upstream.  The ATPX power_control method seems
-		 * to still work on even if the system should be using
-		 * the new standardized hybrid D3 cold ACPI interface.
-		 */
-		atpx->functions.power_cntl = true;
-#else
 		atpx->functions.power_cntl = false;
 		atpx->functions.power_cntl = false;
-#endif
 		atpx->is_hybrid = true;
 		atpx->is_hybrid = true;
 	}
 	}
 
 

+ 2 - 1
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c

@@ -1187,7 +1187,8 @@ int amdgpu_uvd_ring_test_ib(struct amdgpu_ring *ring, long timeout)
 		r = 0;
 		r = 0;
 	}
 	}
 
 
-error:
 	fence_put(fence);
 	fence_put(fence);
+
+error:
 	return r;
 	return r;
 }
 }

+ 4 - 1
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

@@ -1535,7 +1535,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm)
 	r = amd_sched_entity_init(&ring->sched, &vm->entity,
 	r = amd_sched_entity_init(&ring->sched, &vm->entity,
 				  rq, amdgpu_sched_jobs);
 				  rq, amdgpu_sched_jobs);
 	if (r)
 	if (r)
-		return r;
+		goto err;
 
 
 	vm->page_directory_fence = NULL;
 	vm->page_directory_fence = NULL;
 
 
@@ -1565,6 +1565,9 @@ error_free_page_directory:
 error_free_sched_entity:
 error_free_sched_entity:
 	amd_sched_entity_fini(&ring->sched, &vm->entity);
 	amd_sched_entity_fini(&ring->sched, &vm->entity);
 
 
+err:
+	drm_free_large(vm->page_tables);
+
 	return r;
 	return r;
 }
 }
 
 

+ 0 - 9
drivers/gpu/drm/radeon/radeon_atpx_handler.c

@@ -198,16 +198,7 @@ static int radeon_atpx_validate(struct radeon_atpx *atpx)
 	atpx->is_hybrid = false;
 	atpx->is_hybrid = false;
 	if (valid_bits & ATPX_MS_HYBRID_GFX_SUPPORTED) {
 	if (valid_bits & ATPX_MS_HYBRID_GFX_SUPPORTED) {
 		printk("ATPX Hybrid Graphics\n");
 		printk("ATPX Hybrid Graphics\n");
-#if 1
-		/* This is a temporary hack until the D3 cold support
-		 * makes it upstream.  The ATPX power_control method seems
-		 * to still work on even if the system should be using
-		 * the new standardized hybrid D3 cold ACPI interface.
-		 */
-		atpx->functions.power_cntl = true;
-#else
 		atpx->functions.power_cntl = false;
 		atpx->functions.power_cntl = false;
-#endif
 		atpx->is_hybrid = true;
 		atpx->is_hybrid = true;
 	}
 	}