On Fri, Mar 13, 2009 at 7:14 AM, Kristian Høgsberg <k...@redhat.com> wrote: > On Thu, 2009-03-12 at 19:22 -0700, Dan Nicholson wrote: >> On Thu, Mar 12, 2009 at 4:41 PM, Victor Lowther >> <victor.lowt...@gmail.com> wrote: >> > On Mar 12, 2009, at 4:58 PM, Kristian Høgsberg <k...@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.
They set /proc/sys/kernel/acpi_video_flags. They get set to 0 by pm-utils, then added to if you have --quirk-s3-mode and/or --quirk-s3-bios. I don't know what that actually does in the kernel. > Here's an update version of the patch that moves the kms detection in > pm/functions.in and also disables the s3 hooks. Nice, thanks. Since we have an driver-independent way to check for kms, probably there should be a new function in 98-smart-kernel-video: smart_kernel_kms() { kms_active || return 1 remove_parameters ... } Then any driver that gets kms support will just get the video quirks removed. That would probably want to get called first in smart_kernel_video(), or at least before smart_kernel_intel(). -- Dan _______________________________________________ Pm-utils mailing list Pm-utils@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pm-utils