drm/amdgpu: sync ce and me with SWITCH_BUFFER(2)
authormonk.liu <monk.liu@amd.com>
Wed, 23 Sep 2015 05:49:58 +0000 (13:49 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Sep 2015 21:23:45 +0000 (17:23 -0400)
commit5c3422b0b135b46c8dca9c1d909c1ae84f3561bd
tree98bb55830306ee8e9869dc5a474de3732ed6a86c
parent54ef0b5461c071050c61e501af5544842d61f40a
drm/amdgpu: sync ce and me with SWITCH_BUFFER(2)

we used to adopt wait_reg_mem to let CE wait before DE finish page
updating, but from Tonga+, CE doesn't support wait_reg_mem package so
this logic no longer works.

so here is another approach to do same thing:
Insert two of SWITCH_BUFFER at both front and end of vm_flush can
guarantee that CE not go further to process IB_const before vm_flush
done.

Insert two of SWITCH_BUFFER also works on CI, so remove legency method
to sync CE and ME

v2:
Insert double SWITCH_BUFFER at front of vm flush as well.

Signed-off-by: monk.liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c