  Gamayun, Iorgov and Lisovyy in 2012 proposed that tau function of the
Painlev\'e equation is equal to the series of $c=1$ Virasoro conformal blocks.
We study similar series of $c=-2$ conformal blocks and relate it to Painlev\'e
theory. The arguments are based on Nakajima-Yoshioka blowup relations on
Nekrasov partition functions. We also study series of $q$-deformed $c=-2$
conformal blocks and relate it to $q$-Painlev\'e equation. As an application,
we prove formula for the tau function of $q$-Painlev\'e $A_7^{(1)'}$ equation.
