Tuning ferroelectricity in DyMn2O5 by pressure and magnetic fields