All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thellstrom@vmware.com>
To: Dave Airlie <airlied@gmail.com>
Cc: "airlied@redhat.com" <airlied@redhat.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 03/15] vmwgfx: Fix ACPI S3 & S4 functionality.
Date: Tue, 28 Sep 2010 08:44:37 +0200	[thread overview]
Message-ID: <4CA18ED5.8090409@vmware.com> (raw)
In-Reply-To: <AANLkTimgP-furYN2-J_T9DGo7phCKScjPaCzWq+XU2dL@mail.gmail.com>

On 09/28/2010 12:41 AM, Dave Airlie wrote:
> On Mon, Sep 27, 2010 at 11:20 PM, Thomas Hellstrom
> <thellstrom@vmware.com>  wrote:
>    
>> Don't suspend or hibernate when there are 3D resources active since we
>> can't restore the device's 3D state. Instead fail with an error message.
>>      
> Its not acceptable to block suspend ever like that, you need to
> restore the devices 3D state somehow,
>
> since if you are running a compiz desktop or something, you'll never
> have a time when the resources aren't active.
>
> Dave.
>    
Dave,

In principle I agree.

However, in this case we should be aware, that suspending / hibernating 
a guest VM using S3 / S4 is an extremely rare event, that is the result 
of the user doing something stupid. A VM should be suspended from the 
GUI (which justs makes the host stop the VM saving its complete state).

If the host is suspending / hibernating, like if you close the lid, the 
VM will just go to sleep like any other user-space process, and the 
suspend / hibernate event will not be propagated to the guest.

But unfortunately we can't stop the user from trying S3/S4 suspend / 
hibernate, from within the guest VM, so we need to do some kind of 
graceful failure here. The alternative is a 3D hang when the user 
resumes, because we can't really introduce code in the kernel that 
tracks the complete state of all 3D contexts (well, we probably can, but 
it's going to be ugly and error-prone).

I think a future version of the device will have capabilities to save 
and restore the device state.

Given this special case,
Would this patch be acceptable?

Thanks,
Thomas

      reply	other threads:[~2010-09-28  6:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-27 13:20 [PATCH 0/15] vmwgfx updates Thomas Hellstrom
2010-09-27 13:20 ` [PATCH 01/15] vmwgfx: Add an option to choose whether to enable fbdev at load time Thomas Hellstrom
2010-09-27 13:20   ` [PATCH 02/15] vmwgfx: Really support other depths than 32 Thomas Hellstrom
2010-09-27 13:20     ` [PATCH 03/15] vmwgfx: Fix ACPI S3 & S4 functionality Thomas Hellstrom
2010-09-27 13:20       ` [PATCH 04/15] vmwgfx: Add new-style PM hooks to improve hibernation behavior Thomas Hellstrom
2010-09-27 13:20         ` [PATCH 05/15] drm: vmwgfx: Add a struct drm_file parameter to the dirty framebuffer callback Thomas Hellstrom
2010-09-27 13:20           ` [PATCH 06/15] vmwgfx: Take the ttm lock around the dirty ioctl Thomas Hellstrom
2010-09-27 13:20             ` [PATCH 07/15] vmwgfx: Prune modes based on available VRAM size Thomas Hellstrom
2010-09-27 13:20               ` [PATCH 08/15] vmwgfx: Don't flush fb if we're in the suspended state Thomas Hellstrom
2010-09-27 13:20                 ` [PATCH 09/15] vmwgfx: Add a parameter to get the max fb size Thomas Hellstrom
2010-09-27 13:20                   ` [PATCH 10/15] vmwgfx: Enable use of the vblank system Thomas Hellstrom
2010-09-27 13:20                     ` [PATCH 11/15] vmwgfx: Add modinfo version Thomas Hellstrom
2010-09-27 13:20                       ` [PATCH 12/15] vmwgfx: Remove initialisation of dev::devname Thomas Hellstrom
2010-09-27 13:20                         ` [PATCH 13/15] vmwgfx: Add a get_vblank_counter function Thomas Hellstrom
2010-09-27 13:20                           ` [PATCH 14/15] vmwgfx: Save at least one screen layout Thomas Hellstrom
2010-09-27 13:20                             ` [PATCH 15/15] vmwgfx: Bump minor and driver date Thomas Hellstrom
2010-09-28  7:23                           ` [PATCH 13/15] vmwgfx: Add a get_vblank_counter function Michel Dänzer
2010-09-28  8:06                             ` Thomas Hellstrom
2010-09-27 22:41       ` [PATCH 03/15] vmwgfx: Fix ACPI S3 & S4 functionality Dave Airlie
2010-09-28  6:44         ` Thomas Hellstrom [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CA18ED5.8090409@vmware.com \
    --to=thellstrom@vmware.com \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.