23 Mar, 2011

1 commit

  • There may be multiple ways of controlling the backlight on a given
    machine. Allow drivers to expose the type of interface they are
    providing, making it possible for userspace to make appropriate policy
    decisions.

    Signed-off-by: Matthew Garrett
    Cc: Richard Purdie
    Cc: Chris Wilson
    Cc: David Airlie
    Cc: Alex Deucher
    Cc: Ben Skeggs
    Cc: Zhang Rui
    Cc: Len Brown
    Cc: Jesse Barnes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthew Garrett
     

16 Nov, 2010

1 commit

  • backlight_device_register has been expecting a const "ops" argument, and using
    it as such, since 9905a43b2d563e6f89e4c63c4278ada03f2ebb14. Let's make the
    remaining backlight_ops instances const.

    Inspired by hunks of the grsecurity patch, updated for newer kernels.

    Signed-off-by: Lionel Debroux
    Acked-by: Ingo Molnar
    Signed-off-by: Jiri Kosina

    Lionel Debroux
     

17 Mar, 2010

1 commit


09 Feb, 2010

1 commit


13 Mar, 2008

1 commit

  • The PMU backlight code would kick in during sleep/resume even on
    machines that use a different backlight method. This breaks
    sleep on some PowerBooks.

    This fixes it by adding a flag to indicate whether the backlight
    is controlled by the PMU, and testing that before trying to use
    the PMU to turn off the backlight during sleep.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

21 Dec, 2007

1 commit

  • This fixes a few issues with via-pmu based backlight control.

    First, it fixes a sign problem with the setup of the backlight
    curve since the `range' value there -can- (and will) go negative.

    Then, it reworks the interaction between this and the via-pmu sleep
    code to properly restore backlight on wakeup from sleep.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

20 Feb, 2007

4 commits

  • Per device data such as brightness belongs to the indivdual device
    and should therefore be separate from the the backlight operation
    function pointers. This patch splits the two types of data and
    allows simplifcation of some code.

    Signed-off-by: Richard Purdie

    Richard Purdie
     
  • Move the setting/unsetting of pmac_backlight into the
    backlight core instead of doing it in each driver.

    Signed-off-by: Richard Purdie

    Richard Purdie
     
  • backlight_device->sem has a very specific use as documented in the
    header file. The external users of this are using it for a different
    reason, to serialise access to the update_status() method.

    backlight users were supposed to implement their own internal
    serialisation of update_status() if needed but everyone is doing
    things differently and incorrectly. Therefore add a global mutex to
    take care of serialisation for everyone, once and for all.

    Locking for get_brightness remains optional since most users don't
    need it.

    Also update the lcd class in a similar way.

    Signed-off-by: Richard Purdie

    Richard Purdie
     
  • Remove uneeded owner field from backlight_properties structure.

    Nothing uses it and it is unlikely that it will ever be used. The
    backlight class uses other means to ensure that nothing references
    unloaded code.

    Based on a patch from Dmitry Torokhov

    Signed-off-by: Richard Purdie

    Richard Purdie
     

31 Dec, 2006

1 commit


30 Sep, 2006

1 commit


02 Sep, 2006

2 commits

  • Fix some more problems (inverted use of semaphores in some places). He
    also moved my checks into within the protected section which is better.

    Signed-off-by: Michael Hanselmann
    Signed-off-by: Benjamin Herrenschmidt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     
  • The via-pmu backlight code (introduced in 2.6.18) has various design issues
    causing crashes on machines using it like the old Wallstreet powerbook
    (Michael, the author, never managed to test on these and I just got my hand
    on one of those old beasts).

    This fixes them by no longer trying to hijack the backlight device of the
    frontmost framebuffer (causing that framebuffer to crash) but having it's
    own local bits instead. Might look weird but it's better that way on those
    old machines, at least as a last-minute fix for 2.6.18. We might rework
    the whole thing later. This patch also changes the way it gets notified of
    sleep and wakeup in order to properly shut the backlight down on sleep and
    bring it back on wakeup.

    Signed-off-by: Benjamin Herrenschmidt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

01 Aug, 2006

1 commit

  • This patch fixes several problems:
    - The legacy backlight value might be set at interrupt time. Introduced
    a worker to prevent it from directly calling the backlight code.
    - via-pmu allows the backlight to be grabbed, in which case we need to
    prevent other kernel code from changing the brightness.
    - Don't send PMU requests in via-pmu-backlight when the machine is about
    to sleep or waking up.
    - More Kconfig fixes.

    Signed-off-by: Michael Hanselmann
    Cc: Benjamin Herrenschmidt
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hanselmann
     

26 Jun, 2006

1 commit

  • This patch contains a total rewrite of the backlight infrastructure for
    portable Apple computers. Backward compatibility is retained. A sysfs
    interface allows userland to control the brightness with more steps than
    before. Userland is allowed to upload a brightness curve for different
    monitors, similar to Mac OS X.

    [akpm@osdl.org: add needed exports]
    Signed-off-by: Michael Hanselmann
    Acked-by: Benjamin Herrenschmidt
    Cc: Richard Purdie
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Hanselmann