The chipped off wall in the pictures is a plastered wall. The base coat of plaster is typically applied 1/2" thick on either lath or a type of sheetrock. Then there is a 1/8" finish coat applied over the base. The base is rough and sandy while the finish coat is made of finer materials, whiter and trowelled to a smooth finish.
In your case the water got between the base and finish coats causing the cracking and chipping off. All the loose finish coat needs to be removed (you can tell the loose parts by pushing on it or lightly tapping it with a hammer) if it moves or rattles it is loose. Then make sure the base coat is sound by brushing the loose part off with a stiff brush, wet it lightly and re-apply the finish coat. The finish will need to be trowelled with a steel trowell several times to make it smooth.
After the gray tone has left the finish coat completely (3 or 4 days) it can be primed and painted.