13 Jan, 2012

1 commit


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
     

26 Jan, 2011

1 commit

  • The -rt patches change the console_semaphore to console_mutex. As a
    result, a quite large chunk of the patches changes all
    acquire/release_console_sem() to acquire/release_console_mutex()

    This commit makes things use more neutral function names which dont make
    implications about the underlying lock.

    The only real change is the return value of console_trylock which is
    inverted from try_acquire_console_sem()

    This patch also paves the way to switching console_sem from a semaphore to
    a mutex.

    [akpm@linux-foundation.org: coding-style fixes]
    [akpm@linux-foundation.org: make console_trylock return 1 on success, per Geert]
    Signed-off-by: Torben Hohn
    Cc: Thomas Gleixner
    Cc: Greg KH
    Cc: Ingo Molnar
    Cc: Geert Uytterhoeven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Torben Hohn
     

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
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

17 Mar, 2010

1 commit


24 Jun, 2009

1 commit

  • On bootup nvidiafb prints the following on my Apple G5:

    nvidiafb: CRTC 1appears to have a CRT attached

    There should be a space between the '1' and the 'appears'. Add it.

    Signed-off-by: Mikael Pettersson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mikael Pettersson
     

03 Apr, 2009

1 commit


01 Apr, 2009

1 commit


27 Jan, 2009

1 commit


07 Jan, 2009

1 commit

  • Fix this sparse warnings:

    drivers/video/nvidia/nv_accel.c:304:3: warning: returning void-valued expression
    drivers/video/nvidia/nv_accel.c:323:3: warning: returning void-valued expression

    Signed-off-by: Hannes Eder
    Cc: Krzysztof Helt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hannes Eder
     

28 Apr, 2008

3 commits


24 Feb, 2008

1 commit

  • During the last step of hibernation in the "platform" mode (with the
    help of ACPI) we use the suspend code, including the devices'
    ->suspend() methods, to prepare the system for entering the ACPI S4
    system sleep state.

    But at least for some devices the operations performed by the
    ->suspend() callback in that case must be different from its operations
    during regular suspend.

    For this reason, introduce the new PM event type PM_EVENT_HIBERNATE and
    pass it to the device drivers' ->suspend() methods during the last phase
    of hibernation, so that they can distinguish this case and handle it as
    appropriate. Modify the drivers that handle PM_EVENT_SUSPEND in a
    special way and need to handle PM_EVENT_HIBERNATE in the same way.

    These changes are necessary to fix a hibernation regression related
    to the i915 driver (ref. http://lkml.org/lkml/2008/2/22/488).

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Pavel Machek
    Tested-by: Jeff Chua
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

07 Feb, 2008

1 commit

  • The current nvidiafb_check_var() simply bails out if the selected mode is
    out of range of the panel dimensions. A good question would be why the
    bogus mode is being selected in the first place -- the panel dimensions
    that are read back are certainly bogus, but alas, I have no idea where to
    even begin looking at the i2c/EDID/DDC mess:

    nvidiafb: Device ID: 10de0165
    nvidiafb: CRTC0 analog not found
    nvidiafb: CRTC1 analog not found
    nvidiafb: EDID found from BUS1
    nvidiafb: CRTC 0 is currently programmed for DFP
    nvidiafb: Using DFP on CRTC 0
    nvidiafb: Panel size is 1280 x 1024
    nvidiafb: Panel is TMDS
    nvidiafb: unable to setup MTRR
    nvidiafb: Flat panel dithering disabled
    nvidiafb: PCI nVidia NV16 framebuffer (64MB @ 0xC0000000)

    In my .config I presently have:

    CONFIG_FIRMWARE_EDID=y
    CONFIG_FB_DDC=y
    CONFIG_FB_NVIDIA_I2C=y

    I've not tried fiddling with these options, as I haven't the vaguest idea
    what I should be looking at.

    As a workaround, simply groveling for a new mode based on the probed
    dimensions seems to work ok. While it would be nice to debug this further
    and sort out why the panel information is bogus, I think it's still worth
    retrying the mode based on the panel information at hand as a last-ditch
    effort, rather than simply bailing out completely.

    Signed-off-by: Paul Mundt
    Cc: Antonino A. Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     

17 Oct, 2007

2 commits

  • If the i2c ports are to be reversed, I2C_CLASS_HWMON assignment must also be
    reversed.

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     
  • There are a few nvidia hardware where the i2c port assignments are reversed,
    i.e., the 1st i2c port is assigned to the secondary display and the 2nd i2c
    port to the primary display. In most cases, if only 1 display is attached, or
    if only 1 flatpanel and 1 analog display is attached, the port reversal is of
    no consequence. However if 2 flatpanels are attached, it can cause display
    problems.

    There is no sane way of determining if the hardware reversed the i2c port
    assignment, so the simplest fix is to add a boot/module option, "reverse_i2c
    to explicitly reverse the i2c port.

    This also restores i2c ordering back to the pre-2.6.22 state.

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     

23 Jul, 2007

1 commit


18 Jul, 2007

2 commits


16 Jul, 2007

1 commit

  • Convert the backlight and LCD classes from struct class_device
    to struct device since class_device is scheduled for removal.

    One nasty API break is the backlight power attribute has had to be
    renamed to bl_power and the LCD power attribute has had to be renamed
    to lcd_power since the original names clash with the core. I can't see
    a way around this.

    Signed-off-by: Richard Purdie
    Acked-by: Greg Kroah-Hartman

    Richard Purdie
     

11 May, 2007

2 commits


10 May, 2007

1 commit

  • My geforce isn't supported by nvidia frame buffer.

    /sbin/lspci
    01:00.0 VGA compatible controller: nVidia Corporation Unknown device 02e2 (rev a2)

    /usr/sbin/fbset -i

    mode "1024x768-60"
    # D: 65.003 MHz, H: 48.365 kHz, V: 60.006 Hz
    geometry 1024 768 1024 32767 8
    timings 15384 160 24 29 3 136 6
    accel true
    rgba 8/0,8/0,8/0,0/0
    endmode

    Frame buffer device information:
    Name : NV2e
    Address : 0xe0000000
    Size : 134217728
    Type : PACKED PIXELS
    Visual : PSEUDOCOLOR
    XPanStep : 8
    YPanStep : 1
    YWrapStep : 0
    LineLength : 1024
    MMIO Address: 0xf6000000
    MMIO Size : 16777216
    Accelerator : Unknown (46)

    Here is a patch for this problem.

    Signed-off-by: Michal Piotrowski
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Piotrowski
     

09 May, 2007

12 commits

  • * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (77 commits)
    [POWERPC] Abolish powerpc_flash_init()
    [POWERPC] Early serial debug support for PPC44x
    [POWERPC] Support for the Ebony 440GP reference board in arch/powerpc
    [POWERPC] Add device tree for Ebony
    [POWERPC] Add powerpc/platforms/44x, disable platforms/4xx for now
    [POWERPC] MPIC U3/U4 MSI backend
    [POWERPC] MPIC MSI allocator
    [POWERPC] Enable MSI mappings for MPIC
    [POWERPC] Tell Phyp we support MSI
    [POWERPC] RTAS MSI implementation
    [POWERPC] PowerPC MSI infrastructure
    [POWERPC] Rip out the existing powerpc msi stubs
    [POWERPC] Remove use of 4level-fixup.h for ppc32
    [POWERPC] Add powerpc PCI-E reset API implementation
    [POWERPC] Holly bootwrapper
    [POWERPC] Holly DTS
    [POWERPC] Holly defconfig
    [POWERPC] Add support for 750CL Holly board
    [POWERPC] Generalize tsi108 PCI setup
    [POWERPC] Generalize tsi108 PHY types
    ...

    Fixed conflict in include/asm-powerpc/kdebug.h manually

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Fix return value of nvidiafb_open().

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     
  • If the chip locks up, we get into a long polling loop,
    where the softlockup detector kicks in.
    See https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=151878
    for an example.

    [adaplas]
    Chip lockup can occur at 3 points (flush, sync, and wait). Consolidate and
    allow the driver to go to safe mode cleanly.

    Signed-off-by: Dave Jones
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • Switch to pci_get refcounting APIs

    [adaplas]
    Fix a long-standing bug where the return value of
    pci_find_slot()/pci_get_bus_and_slot() is ignored.

    Signed-off-by: Alan Cox
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Fix the following sparse warning:

    drivers/video/nvidia/nv_setup.c:659:20: warning: dereference of noderef expression

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     
  • Allow the saving and restoration of VGA text mode. The state is saved on the
    first open and restored on the last close. Because of the non-linear mapping
    of the VGA registers to the MMIO space, this will be done only on X86
    platforms where the device is the primary display.

    An echo 0 > /sys/class/vtconsole/vtcon1/bind will convert the display from
    graphics to text mode.

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     
  • Use Read/WriteCrtc() to access CRTC registers in nv_i2c.c. These are safer
    because it uses the correct CRTC base (0x3bx or 0x3dx).

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     
  • - Ensure that CRTC registers are accessible by unlocking them on set_par(),
    otherwise i2c reading will fail.

    - The function nvidia_vga_protect(), does not protect the VGA registers, but
    turns off the screen. Rename it to nvidia_screen_off().

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     
  • Various cleanups to rivafb/nvidiafb's I2C code:
    * Drop useless par->bus.
    * Refactor I2C bus deletion code.
    * Drop useless variable initialization.
    * Remove unneeded include of .
    * Simplify +1/-1.
    * Add __devinit tags where possible.

    [adaplas]
    The varible initialization are not useless. However, rivafb must
    check if i2c bus are created properly before reading the EDID
    block.

    Signed-off-by: Jean Delvare
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • Let the hardware monitoring drivers probe the second rivafb/nvidiafb I2C bus
    for devices.

    Signed-off-by: Jean Delvare
    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jean Delvare
     
  • After I added some debugging printks I've found that code became a bit
    confused because it believed that primary monitor is 1920x540, but later it
    found in CRTC0's registers that panel size is 1920x1200 (Windows also agree
    that 1920x1200 is primary monitor, and 1920x1080i secondary one).

    When I applied attached patch then my monitor became as happy as it was
    before I connected HDMI cable to secondary output.

    Signed-off-by: Petr Vandrovec
    Signed-off-by: Antonino Daplas
    Cc: Dave Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Petr Vandrovec
     
  • Make nvidiafb use fb_ddc_read(). This patch was submitted before but was
    reverted due to problems in a non-x86 platform. This includes a fix for that
    where ddc reading is bypassed if there is no DDC bus (duh).

    Signed-off-by: Antonino Daplas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Antonino A. Daplas
     

02 May, 2007

1 commit


07 Mar, 2007

1 commit


05 Mar, 2007

1 commit