Onset condition of the subcritical geodesic acoustic mode instability in the presence of energetic-particle-driven geodesic acoustic mode