panfrost: Add routines to calculate stack size/shift