minigbm: amdgpu: make bo's created with SCANOUT flag mmapable

amdgpu kenrel driver can mmap a 'bo' only if it has
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED  flag set.
This flag was not set in case if the 'bo' is used as a SCANOUT buffer,
for several reasons like it might impact performance etc.
But due to several requirements realted testing drm functionalitites
like atomicity, multi-planes etc., this restriction needs to be
removed.
Several known tests related to performance have been done after making
this change and none have shown glaring performance regressions.

However it should be noted that in case we find any performance related
regression in an un-tested scenario this patch needs to be reverted.

BUG=b:65297611
TEST=On Kahlee,
     UI comes up.
     GLMark2 & GLbench autotests show no performance regression
     atomictest -t multiplanes passes
     WebGL Aquarium

Change-Id: If629b64f3a14f843972b25d393a0a16058b3044e
Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-on: https://chromium-review.googlesource.com/715037
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
diff --git a/amdgpu.c b/amdgpu.c
index 9d2f5b5..3437cb7 100644
--- a/amdgpu.c
+++ b/amdgpu.c
@@ -44,8 +44,8 @@
 const static uint32_t render_target_formats[] = { DRM_FORMAT_ARGB8888, DRM_FORMAT_XBGR8888,
 						  DRM_FORMAT_XRGB8888 };
 
-const static uint32_t texture_source_formats[] = { DRM_FORMAT_GR88, DRM_FORMAT_R8,
-						   DRM_FORMAT_NV21, DRM_FORMAT_NV12 };
+const static uint32_t texture_source_formats[] = { DRM_FORMAT_GR88, DRM_FORMAT_R8, DRM_FORMAT_NV21,
+						   DRM_FORMAT_NV12 };
 
 static int amdgpu_set_metadata(int fd, uint32_t handle, struct amdgpu_bo_metadata *info)
 {
@@ -372,7 +372,7 @@
 		bo->strides[0] = addr_out.pixelPitch * DIV_ROUND_UP(addr_out.pixelBits, 8);
 	}
 
-	if (use_flags & (BO_USE_CURSOR | BO_USE_LINEAR | BO_USE_SW_READ_OFTEN |
+	if (use_flags & (BO_USE_SCANOUT | BO_USE_CURSOR | BO_USE_LINEAR | BO_USE_SW_READ_OFTEN |
 			 BO_USE_SW_WRITE_OFTEN | BO_USE_SW_WRITE_RARELY | BO_USE_SW_READ_RARELY))
 		gem_create_flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
 	else