msm: kgsl: Use the new fence APIs for server side sync

The Android sync framework has been mainlined, with some changes in
the API. Update kgsl to use the fence and sync file APIs as required
instead of the older APIs.

Change-Id: Ia443dd3e5520c86b3b66c0cae1780dbe263b8aad
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
diff --git a/drivers/gpu/msm/adreno_debugfs.c b/drivers/gpu/msm/adreno_debugfs.c
index 2d38a1a..b1f832f 100644
--- a/drivers/gpu/msm/adreno_debugfs.c
+++ b/drivers/gpu/msm/adreno_debugfs.c
@@ -136,11 +136,14 @@
 				sync_event->context->id, sync_event->timestamp);
 		break;
 	}
-	case KGSL_CMD_SYNCPOINT_TYPE_FENCE:
-		seq_printf(s, "sync: [%pK] %s", sync_event->handle,
-		(sync_event->handle && sync_event->handle->fence)
-				? sync_event->handle->fence->name : "NULL");
+	case KGSL_CMD_SYNCPOINT_TYPE_FENCE: {
+		char fence_str[128];
+
+		kgsl_dump_fence(sync_event->handle,
+				fence_str, sizeof(fence_str));
+		seq_printf(s, "sync: [%pK] %s", sync_event->handle, fence_str);
 		break;
+	}
 	default:
 		seq_printf(s, "sync: type: %d", sync_event->type);
 		break;