[Pm-utils] [PATCH 1/6] Folded 20video functionality into 99video and deleted 20video.

Victor Lowther victor.lowther at gmail.com
Thu Feb 28 05:32:01 PST 2008


On Thu, Feb 28, 2008 at 07:27:38AM +0100, Michael Biebl wrote:
> 2008/2/28, Victor Lowther <victor.lowther at gmail.com>:
> > Like the subject says.  Nothing but code movement here.
> >
> 
> >  diff --git a/pm/sleep.d/99video b/pm/sleep.d/99video
> >  index 2797a06..d46fbfe 100755
> >  --- a/pm/sleep.d/99video
> >  +++ b/pm/sleep.d/99video
> >  @@ -48,7 +48,38 @@ resume_fbcon()
> >                 echo 0 >"${con}"
> >         done
> >   }
> >  +suspend_video()
> >  +{
> >  +       # 0=nothing, 1=s3_bios, 2=s3_mode, 3=both
> >  +       if [ "${DISPLAY_QUIRK_S3_BIOS}" = "true" -a \
> >  +               "${DISPLAY_QUIRK_S3_MODE}" = "true" ]; then
> >  +               sysctl -w kernel.acpi_video_flags=3
> >  +       elif [ "${DISPLAY_QUIRK_S3_BIOS}" = "true" ]; then
> >  +               sysctl -w kernel.acpi_video_flags=1
> >  +       elif [ "${DISPLAY_QUIRK_S3_MODE}" = "true" ]; then
> >  +               sysctl -w kernel.acpi_video_flags=2
> >  +       else
> >  +               sysctl -w kernel.acpi_video_flags=0
> >  +       fi
> >
> >  +       # We might need to do one or many of these quirks
> >  +       if [ "${DISPLAY_QUIRK_RADEON_OFF}" = "true" ]; then
> >  +               radeon dac off
> >  +               radeon light off
> >  +       fi
> >  +       if [ "${DISPLAY_QUIRK_VBESTATE_RESTORE}" = "true" ]; then
> >  +               vbe vbestate save > /var/run/vbestate
> >  +       fi
> >  +       if [ "${DISPLAY_QUIRK_VBEMODE_RESTORE}" = "true" ]; then
> >  +               vbe vbemode get > /var/run/vbemode
> >  +       fi
> >  +       if [ "${DISPLAY_QUIRK_VGA_MODE_3}" = "true" ]; then
> >  +               vbe vbemode set 3
> >  +       fi
> >  +       if [ "${DISPLAY_QUIRK_DPMS_SUSPEND}" = "true" ]; then
> >  +               vbe dpms suspend
> >  +       fi
> >  +}
> >   resume_video()
> >   {
> >         if [ "${DISPLAY_QUIRK_RADEON_OFF}" = "true" ]; then
> >  @@ -80,6 +111,12 @@ resume_video()
> >   case "$1" in
> >         suspend)
> >                 save_fbcon
> >  +               suspend_video
> 
> Why is save_fbcon() called before suspend_video() and resume_fbcon()
> inside resume_video()?

Copy/paste error.  Those lines should be reversed.
 
> Other than that, patch looks good to me.
> 
> Michael
> 
> -- 
> Why is it that all of the instruments seeking intelligent life in the
> universe are pointed away from Earth?

-- 
Victor Lowther
Ubuntu Certified Professional


More information about the Pm-utils mailing list