On 11/12/25 14:01, Dmitry Osipenko wrote:
> On 10/27/25 23:53, [email protected] wrote:
>> diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c 
>> b/drivers/gpu/drm/virtio/virtgpu_drv.c
>> index 676893e90a9f..5ff79e3775e8 100644
>> --- a/drivers/gpu/drm/virtio/virtgpu_drv.c
>> +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
>> @@ -207,6 +207,15 @@ static int virtgpu_restore(struct virtio_device *vdev)
>>  
>>      virtio_device_ready(vdev);
>>  
>> +    if (vgdev->hibernation) {
>> +            vgdev->hibernation = false;
>> +            error = virtio_gpu_object_restore_all(vgdev);
>> +            if (error) {
>> +                    DRM_ERROR("Failed to recover virtio-gpu objects\n");
>> +                    return error;
>> +            }
>> +    }
> 
> What if hibernation was aborted and didn't happen? In that case
> restoring of objects will fail. Please investigate how to handle aborted
> hibernation properly.

One option could be to explicitly destroy all stored objs upon
hibernation, that way the restoring will always work.

-- 
Best regards,
Dmitry

Reply via email to