> -----Original Message----- > From: Peter Maydell <peter.mayd...@linaro.org> > Sent: 23 May 2022 14:52 > To: Frederic Konrad <fkon...@amd.com> > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; > edgar.igles...@gmail.com; alist...@alistair23.me; Sai Pavan Boddu > <saip...@xilinx.com>; Edgar Iglesias <edg...@xilinx.com>; Sai Pavan Boddu > <saip...@xilinx.com>; Edgar Iglesias <edg...@xilinx.com> > Subject: Re: [PATCH v2 2/4] xlnx_dp: Introduce a vblank signal > > [CAUTION: External Email] > > On Thu, 19 May 2022 at 16:39, Frederic Konrad <fkon...@amd.com> wrote: > > > > From: Sai Pavan Boddu <sai.pavan.bo...@xilinx.com> > > > > Add a periodic timer which raises vblank at a frequency of 30Hz. > > > > Signed-off-by: Sai Pavan Boddu <saip...@xilinx.com> > > Signed-off-by: Edgar E. Iglesias <edgar.igles...@xilinx.com> > > Changes by fkonrad: > > - Switched to transaction-based ptimer API. > > - Added the DP_INT_VBLNK_START macro. > > Signed-off-by: Frederic Konrad <fkon...@amd.com> > > --- > > > > @@ -107,6 +108,8 @@ struct XlnxDPState { > > */ > > DPCDState *dpcd; > > I2CDDCState *edid; > > + > > + ptimer_state *vblank; > > }; > > The ptimer has internal state which needs to be considered in > migration. This means you need to either include it in the device > vmstate struct (there is a VMSTATE_PTIMER macro for this), or > else set it up again in a post-load hook. Otherwise if you do > a migration or state save/load when the timer is running then > on resume the timer won't be running when it should.
Ah yes indeed, I forgot about that. Since cross version migration is not relevant here, the VMSTATE_PTIMER would be acceptable right? > > Apologies for not noticing this in my first review. No worries, thanks for the review :). Fred > > -- PMM