drm/amdgpu: fix ocl test performance drop

Submitted by Cui, Flora on May 22, 2017, 8:34 a.m.

Details

Message ID 1495442049-7481-1-git-send-email-Flora.Cui@amd.com
State New
Headers show
Series "drm/amdgpu: fix ocl test performance drop" ( rev: 2 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Cui, Flora May 22, 2017, 8:34 a.m.
partial revert commit <6971d3d> - drm/amdgpu: cleanup logic in
amdgpu_vm_flush

Change-Id: Iadce9d613dfe9a739643a74050cea55854832adb
Signed-off-by: Flora Cui <Flora.Cui@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 4573d8c..11d58f7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -743,8 +743,7 @@  int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job)
 		id->gws_size != job->gws_size ||
 		id->oa_base != job->oa_base ||
 		id->oa_size != job->oa_size);
-	bool vm_flush_needed = job->vm_needs_flush ||
-		amdgpu_vm_ring_has_compute_vm_bug(ring);
+	bool vm_flush_needed = job->vm_needs_flush;
 	unsigned patch_offset = 0;
 	int r;
 
@@ -753,7 +752,8 @@  int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job)
 		vm_flush_needed = true;
 	}
 
-	if (!vm_flush_needed && !gds_switch_needed)
+	if (!vm_flush_needed && !gds_switch_needed &&
+	    !amdgpu_vm_ring_has_compute_vm_bug(ring))
 		return 0;
 
 	if (ring->funcs->init_cond_exec)

Comments

On 2017年05月22日 16:34, Flora Cui wrote:
> partial revert commit <6971d3d> - drm/amdgpu: cleanup logic in
> amdgpu_vm_flush
>
> Change-Id: Iadce9d613dfe9a739643a74050cea55854832adb
> Signed-off-by: Flora Cui <Flora.Cui@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 4573d8c..11d58f7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -743,8 +743,7 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job)
>   		id->gws_size != job->gws_size ||
>   		id->oa_base != job->oa_base ||
>   		id->oa_size != job->oa_size);
> -	bool vm_flush_needed = job->vm_needs_flush ||
> -		amdgpu_vm_ring_has_compute_vm_bug(ring);
> +	bool vm_flush_needed = job->vm_needs_flush;
>   	unsigned patch_offset = 0;
>   	int r;
>   
> @@ -753,7 +752,8 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job)
>   		vm_flush_needed = true;
>   	}
>   
> -	if (!vm_flush_needed && !gds_switch_needed)
> +	if (!vm_flush_needed && !gds_switch_needed &&
> +	    !amdgpu_vm_ring_has_compute_vm_bug(ring))
>   		return 0;
here change isn't needed.

Regards,
David Zhou
>   
>   	if (ring->funcs->init_cond_exec)