Generalized Hilbert-Kunz function in graded dimension 2