The quadratic equation y=2x^2-px+6 has equal roots. Find the possible values of p.