We present a new determination of the UV galaxy luminosity function (LF) at redshift z ~ 7 and z ~ 8, and a first estimate at z ~ 9. An accurate determination of the form and evolution of the LF at high z is crucial for improving our knowledge of early galaxy evolution and cosmic reionization. Our analysis exploits fully the new, deepest WFC3/IR imaging from our HST UDF12 campaign, and includes a new, consistent analysis of all appropriate, shallower/wider-area HST data. Our new measurement of the evolving LF at z ~ 7-8 is based on a final catalogue of ~600 galaxies, and involves a step-wise maximum likelihood determination based on the redshift probability distribution for each object; this makes full use of the 11-band imaging now available in the HUDF, including the new UDF12 F140W data, and the deep Spitzer IRAC imaging. The final result is a determination of the z ~ 7 LF extending down to M_UV = -16.75, and the z ~ 8 LF down to M_UV = -17.00. Fitting a Schechter function, we find M* = -19.90 (+0.23/-0.28), log phi* = -2.96 (+0.18/-0.23), and a faint-end slope alpha=-1.90 (+0.14/-0.15) at z~7, and M* = -20.12 (+0.37/-0.48), log phi* = -3.35 (+0.28/-0.47), alpha=-2.02 (+0.22/-0.23) at z~8. These results strengthen suggestions that the evolution at z > 7 is more akin to `density evolution than the apparent `luminosity evolution seen at z ~ 5-7. We also provide the first meaningful information on the LF at z ~ 9, explore alternative extrapolations to higher z, and consider the implications for the evolution of UV luminosity density. Finally, we provide catalogues (including z_phot, M_UV and all photometry) for the 100 most robust z~6.5-11.9 galaxies in the HUDF used in this analysis. We discuss our results in the context of earlier work and the results of an independent analysis of the UDF12 data based on colour-colour selection (Schenker et al. 2013).