17 Dec, 2011

8 commits

  • This fixes a race where we may try to finish a page flip and decrement
    the refcount even if our vblank_get failed and we ended up with a
    spurious flip pending interrupt.

    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=34211.

    Signed-off-by: Jesse Barnes
    Signed-off-by: Keith Packard

    Jesse Barnes
     
  • RC6 should always work on IVB, and should work on SNB whenever IO
    remapping is disabled. RC6 never works on Ironlake. Make the default
    value for the parameter follow these guidelines. Setting the value
    to either 0 or 1 will force the specified behavior.

    Signed-off-by: Keith Packard
    Reviewed-by: Kenneth Graunke
    Reviewed-by: Eugeni Dodonov
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38567
    Cc: Ted Phelps
    Cc: Peter
    Cc: Lukas Hejtmanek
    Cc: Andrew Lutomirski

    Keith Packard
     
  • In i915 driver, we do not enable either rc6 or semaphores on SNB when dmar
    is enabled. The new 'intel_iommu_enabled' variable signals when the
    iommu code is in operation.

    Cc: Ted Phelps
    Cc: Peter
    Cc: Lukas Hejtmanek
    Cc: Andrew Lutomirski
    CC: Daniel Vetter
    Cc: Eugeni Dodonov
    Signed-off-by: Keith Packard

    Eugeni Dodonov
     
  • We were checking whether the supplied edid matched the connector it was
    read from. We do this in case a DDC read returns an EDID for another
    device on a multifunction or otherwise interesting card. However, we
    failed to include LVDS as a digital device and so rejecting an otherwise
    valid EDID.

    Fixes the detection of the secondary SDVO LVDS panel on the Libretto
    W105.

    Signed-off-by: Chris Wilson
    Reviewed-by: Adam Jackson
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39216
    Signed-off-by: Keith Packard

    Chris Wilson
     
  • This prevents an in-kernel division by zero which happens when we are
    asking for i915_chipset_val too quickly, or within a race condition
    between the power monitoring thread and userspace accesses via debugfs.

    The issue can be reproduced easily via the following command:
    while ``; do cat /sys/kernel/debug/dri/0/i915_emon_status; done

    This is particularly dangerous because it can be triggered by
    a non-privileged user by just reading the debugfs entry.

    This issue was also found independently by Konstantin Belousov
    , who proposed a similar patch.

    Reported-by: Konstantin Belousov
    Acked-by: Jesse Barnes
    Acked-by: Keith Packard
    Reviewed-by: Chris Wilson
    Cc:
    Signed-off-by: Eugeni Dodonov
    Signed-off-by: Keith Packard

    Eugeni Dodonov
     
  • Signed-off-by: Chris Wilson
    Signed-off-by: Paulo Zanoni
    Signed-off-by: Keith Packard

    Paulo Zanoni
     
  • v2: add a CPT-specific macro, make code cleaner
    v3: fix commit message

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41272
    Cc: stable@kernel.org
    Signed-off-by: Paulo Zanoni
    Reviewed-by: Chris Wilson
    Signed-off-by: Keith Packard

    Paulo Zanoni
     
  • https://bugzilla.redhat.com/show_bug.cgi?id=750006

    Signed-off-by: Adam Jackson
    Signed-off-by: Keith Packard

    Adam Jackson
     

24 Nov, 2011

7 commits

  • For i945 and earlier chips, the backlight frequency value had the low
    bit (of 16) fixed to zero. The Pineview code path handled this by just
    exposing the backlight range as 15 bits while other chips had the
    backlight range limited to 0 .. 0xfffe.

    This patch makes everyone take the pineview code path, providing 15
    bits of backlight duty cycle range which seems more than sufficient to
    me.

    Daniel Mack reported that writing 1 to bit 0 of the duty cycle
    register was causing problems on his Samsung X20 notebook, even when
    the duty cycle value was less than the maximum backlight value. (He
    tried a value of 29749 with max_brightness of 29750). This patch never
    writes a '1' to that bit.

    Signed-off-by: Keith Packard
    Reviewed-by: Takashi Iwai
    Reported-and-tested-by: Daniel Mack
    Cc: stable@kernel.org

    Keith Packard
     
  • The Ivybridge eDP control register looks like a cross between a
    Cougarpoint PCH DP control register and a Sandybridge eDP control
    register.

    Where things trivially match, share the code. Where there are any
    tricky bits, just split things out into two obviously separate code paths.

    Signed-off-by: Keith Packard
    Tested-by: Fang Xun
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41991

    Keith Packard
     
  • On IVB C0+ with newer BIOSes, the forcewake handshake has changed. There's
    now a bitfield for different driver components to keep the GT powered
    on. On Linux, we centralize forcewake handling in one place, so we
    still just need a single bit, but we need to use the new registers if MT
    forcewake is enabled.

    This needs testing on affected machines. Please reply with your
    tested-by if you had problems after a BIOS upgrade and this patch fixes
    them.

    v2: force MT mode. shift by 16
    v3: set MT force wake bits then check ECOBUS

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42923
    Tested-by: Manoj Iyer
    Tested-by: Robert Hooker
    Tested-by: Keith Packard
    Signed-off-by: Jesse Barnes
    Signed-off-by: Keith Packard

    Keith Packard
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
    ktest: Check parent options for iterated tests

    Linus Torvalds
     
  • * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
    i2c: Make i2cdev_notifier_call static
    i2c: Delete ANY_I2C_BUS
    i2c: Fix device name for 10-bit slave address
    i2c-algo-bit: Generate correct i2c address sequence for 10-bit target

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
    regulator: TPS65910: Fix VDD1/2 voltage selector count

    Linus Torvalds
     
  • * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (31 commits)
    drm: integer overflow in drm_mode_dirtyfb_ioctl()
    drivers/gpu/vga/vgaarb.c: add missing kfree
    drm/radeon/kms/atom: unify i2c gpio table handling
    drm/radeon/kms: fix up gpio i2c mask bits for r4xx for real
    ttm: Don't return the bo reserved on error path
    drm/radeon/kms: add a CS ioctl flag not to rewrite tiling flags in the CS
    drm/i915: Fix inconsistent backlight level during disabled
    drm, i915: Fix memory leak in i915_gem_busy_ioctl().
    drm/i915: Use DPCD value for max DP lanes.
    drm/i915: Initiate DP link training only on the lanes we'll be using
    drm/i915: Remove trailing white space
    drm/i915: Try harder during dp pattern 1 link training
    drm/i915: Make DP prepare/commit consistent with DP dpms
    drm/i915: Let panel power sequencing hardware do its job
    drm/i915: Treat PCH eDP like DP in most places
    drm/i915: Remove link_status field from intel_dp structure
    drm/i915: Move common PCH_PP_CONTROL setup to ironlake_get_pp_control
    drm/i915: Module parameters using '-1' as default must be signed type
    drm/i915: Turn on another required clock gating bit on gen6.
    drm/i915: Turn on a required 3D clock gating bit on Sandybridge.
    ...

    Linus Torvalds
     

23 Nov, 2011

19 commits

  • Count of selector voltage is required for regulator_set_voltage
    to work via set_voltage_sel. VDD1/2 currently have it as zero,
    so regulator_set_voltage won't work for VDD1/2.
    Update count (n_voltages) for VDD1/2.

    Output Voltage = (step value * 12.5 mV + 562.5 mV) * gain

    With above expr, number of voltages that can be selected is
    step value count * gain count

    constant for gain count will be called VDD1_2_NUM_VOLT_COARSE

    existing constant for step value count is VDD1_2_NUM_VOLTS,
    use VDD1_2_NUM_VOLT_FINE instead to make clear that step value
    is not the only component in deciding selectable voltage count

    Signed-off-by: Afzal Mohammed
    Signed-off-by: Mark Brown

    Afzal Mohammed
     
  • The function i2cdev_notifier_call is used only in i2c-dev file
    making it static.
    Also removes the following sparse warning

    drivers/i2c/i2c-dev.c:582:5: warning: symbol 'i2cdev_notifier_call'
    was not declared. Should it be static?

    Signed-off-by: Shubhrajyoti D
    Signed-off-by: Jean Delvare

    Shubhrajyoti D
     
  • Last piece of code using ANY_I2C_BUS was deleted almost 2 years ago,
    so ANY_I2C_BUS can go away as well.

    Signed-off-by: Jean Delvare

    Jean Delvare
     
  • 10-bit addresses overlap with traditional 7-bit addresses, leading in
    device name collisions. Add an arbitrary offset to 10-bit addresses to
    prevent this collision. The offset was chosen so that the address is
    still easily recognizable.

    Signed-off-by: Jean Delvare
    Acked-by: Wolfram Sang

    Jean Delvare
     
  • The wrong bits were put on the wire, fix that.

    This fixes kernel bug #42562.

    Signed-off-by: Sheng-Hui J. Chu
    Cc: stable@kernel.org
    Signed-off-by: Jean Delvare

    Jeffrey (Sheng-Hui) Chu
     
  • There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
    if userspace passes in a large num_clips. The call to kmalloc would
    allocate a small buffer, and the call to fb->funcs->dirty may result
    in a memory corruption.

    Reported-by: Haogang Chen
    Signed-off-by: Xi Wang
    Cc: stable@kernel.org
    Signed-off-by: Dave Airlie

    Xi Wang
     
  • This reverts commit dc9372808412edbc653a675a526c2ee6c0c14a91.

    As requested by Ben Herrenschmidt:
    "This breaks some powerpc platforms at least. The practice of having
    a node provide an explicit "interrupt-parent" property pointing to
    itself is an old trick that we've used in the past to allow a
    device-node to have interrupts routed to different controllers.

    In that case, the node also contains an interrupt-map, so the node is
    its own parent, the interrupt resolution hits the map, which then can
    route each individual interrupt to a different parent."

    Grant says:
    "Ah, nuts, yes that is broken then. Yes, please revert the commit and
    Rob & I will come up with a better solution.

    Rob, I think it can be done by explicitly checking for np ==
    desc->interrupt_parent in of_irq_init() instead of relying on
    of_irq_find_parent() returning NULL."

    Requested-by: Benjamin Herrenschmidt
    Acked-by: Grant Likely
    Cc: Rob Herring
    Cc: devicetree-discuss@lists.ozlabs.org
    Cc: linuxppc-dev
    Cc: Tanmay Inamdar
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    mount_subtree() pointless use-after-free
    iio: fix a leak due to improper use of anon_inode_getfd()
    microblaze: bury asm/namei.h

    Linus Torvalds
     
  • kbuf is a buffer that is local to this function, so all of the error paths
    leaving the function should release it.

    Signed-off-by: Julia Lawall
    Cc: Jesper Juhl
    Signed-off-by: Andrew Morton
    Signed-off-by: Dave Airlie

    Julia Lawall
     
  • Split the quirks and i2c_rec assignment into separate
    functions used by both radeon_lookup_i2c_gpio() and
    radeon_atombios_i2c_init(). This avoids duplicating code
    and cases where quirks were only added to one of the
    functions.

    Signed-off-by: Alex Deucher
    Cc: Jean Delvare
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • Fixes i2c test failures when i2c_algo_bit.bit_test=1.

    The hw doesn't actually require a mask, so just set it
    to the default mask bits for r1xx-r4xx radeon ddc.

    I missed this part the first time through.

    Signed-off-by: Alex Deucher
    Cc: stable@kernel.org
    Cc: Jean Delvare
    Signed-off-by: Dave Airlie

    Alex Deucher
     
  • An unlikely race could case a bo to be returned reserved on an error path.

    Signed-off-by: Thomas Hellstrom
    Reviewed-by: Jerome Glisse
    Signed-off-by: Dave Airlie

    Thomas Hellstrom
     
  • * 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux: (25 commits)
    drm/i915: Fix inconsistent backlight level during disabled
    drm, i915: Fix memory leak in i915_gem_busy_ioctl().
    drm/i915: Use DPCD value for max DP lanes.
    drm/i915: Initiate DP link training only on the lanes we'll be using
    drm/i915: Remove trailing white space
    drm/i915: Try harder during dp pattern 1 link training
    drm/i915: Make DP prepare/commit consistent with DP dpms
    drm/i915: Let panel power sequencing hardware do its job
    drm/i915: Treat PCH eDP like DP in most places
    drm/i915: Remove link_status field from intel_dp structure
    drm/i915: Move common PCH_PP_CONTROL setup to ironlake_get_pp_control
    drm/i915: Module parameters using '-1' as default must be signed type
    drm/i915: Turn on another required clock gating bit on gen6.
    drm/i915: Turn on a required 3D clock gating bit on Sandybridge.
    drm/i915: enable cacheable objects on Ivybridge
    drm/i915: add constants to size fence arrays and fields
    drm/i915: Ivybridge still has fences!
    drm/i915: forcewake warning fixes in debugfs
    drm/i915: Fix object refcount leak on mmappable size limit error path.
    drm/i915: Use mode_config.mutex in ironlake_panel_vdd_work
    ...

    Dave Airlie
     
  • d'oh... we'd carefully pinned mnt->mnt_sb down, dropped mnt and attempt
    to grab s_umount on mnt->mnt_sb. The trouble is, *mnt might've been
    overwritten by now...

    Signed-off-by: Al Viro

    Al Viro
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: ams_delta_serio - include linux/module.h
    Input: elantech - adjust hw_version detection logic
    Input: i8042 - add HP Pavilion dv4s to 'notimeout' and 'nomux' blacklists

    Linus Torvalds
     
  • * git://www.linux-watchdog.org/linux-watchdog:
    watchdog: fix initialisation printout in s3c2410_wdt
    watchdog: Don't overwrite error value in wm831x_wdt_set_timeout()
    watchdog: adx_wdt.c: remove driver

    Linus Torvalds
     
  • * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    NFS: Revert pnfs ugliness from the generic NFS read code path
    SUNRPC: destroy freshly allocated transport in case of sockaddr init error
    NFS: Fix a regression in the referral code
    nfs: move nfs_file_operations declaration to bottom of file.c (try #2)
    nfs: when attempting to open a directory, fall back on normal lookup (try #5)

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
    Btrfs: remove free-space-cache.c WARN during log replay
    Btrfs: sectorsize align offsets in fiemap
    Btrfs: clear pages dirty for io and set them extent mapped
    Btrfs: wait on caching if we're loading the free space cache
    Btrfs: prefix resize related printks with btrfs:
    btrfs: fix stat blocks accounting
    Btrfs: avoid unnecessary bitmap search for cluster setup
    Btrfs: fix to search one more bitmap for cluster setup
    btrfs: mirror_num should be int, not u64
    btrfs: Fix up 32/64-bit compatibility for new ioctls
    Btrfs: fix barrier flushes
    Btrfs: fix tree corruption after multi-thread snapshots and inode_cache flush

    Linus Torvalds
     
  • * 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
    writeback: remove vm_dirties and task->dirties
    writeback: hard throttle 1000+ dd on a slow USB stick
    mm: Make task in balance_dirty_pages() killable

    Linus Torvalds
     

22 Nov, 2011

6 commits

  • * 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    staging: fix more ET131X build errors
    staging: et131x depends on NET
    staging: slicoss depends on NET
    linux-next: et131x: Fix build error when CONFIG_PM_SLEEP not enabled

    Linus Torvalds
     
  • * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (48 commits)
    USB: Fix Corruption issue in USB ftdi driver ftdi_sio.c
    USB: option: add PID of Huawei E173s 3G modem
    OHCI: final fix for NVIDIA problems (I hope)
    USB: option: release new PID for ZTE 3G modem
    usb: Netlogic: Fix HC_LENGTH call in ehci-xls.c
    USB: storage: ene_ub6250: fix compile warnings
    USB: option: add id for 3G dongle Model VT1000 of Viettel
    USB: serial: pl2303: rm duplicate id
    USB: pch_udc: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor
    USB: pch_udc: Support new device LAPIS Semiconductor ML7831 IOH
    usb-storage: Accept 8020i-protocol commands longer than 12 bytes
    USB: quirks: adding more quirky webcams to avoid squeaky audio
    powerpc/usb: fix type cast for address of ioremap to compatible with 64-bit
    USB: at91: at91-ohci: fix set/get power
    USB: cdc-acm: Fix disconnect() vs close() race
    USB: add quirk for Logitech C600 web cam
    USB: EHCI: fix HUB TT scheduling issue with iso transfer
    USB: XHCI: resume root hubs when the controller resumes
    USB: workaround for bug in old version of GCC
    USB: ark3116 initialisation fix
    ...

    Linus Torvalds
     
  • * 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    TTY: ldisc, wait for ldisc infinitely in hangup
    TTY: ldisc, move wait idle to caller
    TTY: ldisc, allow waiting for ldisc arbitrarily long
    Revert "tty/serial: Prevent drop of DCD on suspend for Tegra UARTs"
    RS485: fix inconsistencies in the meaning of some variables
    pch_uart: Fix DMA resource leak issue
    serial,mfd: Fix CMSPAR setup
    tty/serial: Prevent drop of DCD on suspend for Tegra UARTs
    pch_uart: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor
    pch_uart: Support new device LAPIS Semiconductor ML7831 IOH
    pch_uart: Fix hw-flow control issue
    tty: hvc_dcc: Fix duplicate character inputs
    jsm: Change maintainership

    Linus Torvalds
     
  • * 'driver-core-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    drivers/base/node.c: fix compilation error with older versions of gcc
    uio: documentation fixups
    device.h: Fix struct member documentation

    Linus Torvalds
     
  • * 'char-misc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    misc: ad525x_dpot: Fix AD8400 spi transfer size.
    pch_phub: Fix MAC address writing issue for LAPIS ML7831
    pch_phub: Improve ADE(Address Decode Enable) control
    pch_phub: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor
    pch_phub: Support new device LAPIS Semiconductor ML7831 IOH
    pcie-gadget-spear: Add "platform:" prefix for platform modalias
    MAINTAINERS: add CHAR and MISC driver maintainers

    Linus Torvalds
     
  • it can fail and in that case ->release() will *not* be called...

    Signed-off-by: Al Viro

    Al Viro