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.

Apologies for not noticing this in my first review.

-- PMM

Reply via email to