[Pm-utils] Skipping pm-utils chvt on suspend and resume under kernel modesetting
Kristian Høgsberg
krh at redhat.com
Fri Mar 13 07:14:34 PDT 2009
On Thu, 2009-03-12 at 19:22 -0700, Dan Nicholson wrote:
> On Thu, Mar 12, 2009 at 4:41 PM, Victor Lowther
> <victor.lowther at gmail.com> wrote:
> > On Mar 12, 2009, at 4:58 PM, Kristian Høgsberg <krh at redhat.com> wrote:
> >
> >> Hi Victor,
> >>
> >> I'm attaching a patch that I've just added to pm-utils in Fedora
> >> Rawhide. With a kernel modesetting capable drm driver and DRI2, we no
> >> longer need to chvt away from X to suspend and resume correctly.
> >> We'll
> >> keep it in rawhide and see how it goes, but I've tested it on a
> >> bunch of
> >> intel machines and it works. Dave Airlie is testing this with radeon
> >> modesetting and it should work there too.
> >
> > No problem - I have been waiting for KMS to hit mainline before
> > patching pm-utils myself.
>
> Speaking of which, right now smart_kernel_intel() doesn't disable the
> S3 hooks. I think with KMS, we shouldn't need to run any video hooks.
> So, perhaps something like this should be added:
>
> local kms=`cat /sys/module/i915/parameters/modeset 2>/dev/null`
> [ "$kms" = 1 ] && remove_parameters --quirk-s3-mode --quirk-s3-bios
I'm using
kms_active()
{
test -d /sys/class/drm/card0/device/graphics/fb0
}
to test for modesetting and I think it's a little better for a couple of
reasons: you could pass modeset=1 to the module and still not get
modesetting, whereas testing for the fb0 directory there only returns
true if modesetting actually kicked in. Second, it's chipset
independent.
Not sure what the s3 hooks do, but it sounds plausible that we won't
need them with a KMS driver.
Here's an update version of the patch that moves the kms detection in
pm/functions.in and also disables the s3 hooks.
cheers,
Kristian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Skip-chvt-and-S3-hooks-if-kernel-modesetting-is-acti.patch
Type: text/x-patch
Size: 0 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/pm-utils/attachments/20090313/9f09a09e/attachment.bin
More information about the Pm-utils
mailing list