drm/amdgpu: fix before and after mapping judgement for replace mapping
authorJunwei Zhang <Jerry.Zhang@amd.com>
Thu, 16 Mar 2017 08:09:24 +0000 (16:09 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 30 Mar 2017 03:54:02 +0000 (23:54 -0400)
commit27f6d61036a8cb25d144c8bcc6c15e2b54cec566
tree6ff3bb71d46dae9798faca9b06ceecda7bfd02ae
parent80f95c579d800fa22e9e57ecb3d50b9e93bc1f82
drm/amdgpu: fix before and after mapping judgement for replace mapping

If the before mapping is 1 page size, so its start and last will be same.
Thus below condition will become false, then to free the before mapping.
   > if (before->it.start != before->it.last)
But in this case, we need the before mapping of 1 page size.
So does after mapping.

Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c