1. 14 Aug, 2015 26 commits
  2. 13 Aug, 2015 3 commits
    • Maarten Lankhorst's avatar
      drm/i915: Commit planes on each crtc separately. · d2944cf2
      Maarten Lankhorst authored
      This patch is based on the upstream commit 5ac1c4bc and amended
      for v4.2 to make sure it works as intended.
      
      Repeated calls to begin_crtc_commit can cause warnings like this:
      [  169.127746] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:616
      [  169.127835] in_atomic(): 0, irqs_disabled(): 1, pid: 1947, name: kms_flip
      [  169.127840] 3 locks held by kms_flip/1947:
      [  169.127843]  #0:  (&dev->mode_config.mutex){+.+.+.}, at: [<ffffffff814774bc>] __drm_modeset_lock_all+0x9c/0x130
      [  169.127860]  #1:  (crtc_ww_class_acquire){+.+.+.}, at: [<ffffffff814774cd>] __drm_modeset_lock_all+0xad/0x130
      [  169.127870]  #2:  (crtc_ww_class_mutex){+.+.+.}, at: [<ffffffff81477178>] drm_modeset_lock+0x38/0x110
      [  169.127879] irq event stamp: 665690
      [  169.127882] hardirqs last  enabled at (665689): [<ffffffff817ffdb5>] _raw_spin_unlock_irqrestore+0x55/0x70
      [  169.127889] hardirqs last disabled at (665690): [<ffffffffc0197a23>] intel_pipe_update_start+0x113/0x5c0 [i915]
      [  169.127936] softirqs last  enabled at (665470): [<ffffffff8108a766>] __do_softirq+0x236/0x650
      [  169.127942] softirqs last disabled at (665465): [<ffffffff8108ae75>] irq_exit+0xc5/0xd0
      [  169.127951] CPU: 1 PID: 1947 Comm: kms_flip Not tainted 4.1.0-rc4-patser+ #4039
      [  169.127954] Hardware name: LENOVO 2349AV8/2349AV8, BIOS G1ETA5WW (2.65 ) 04/15/2014
      [  169.127957]  ffff8800c49036f0 ffff8800cde5fa28 ffffffff817f6907 0000000080000001
      [  169.127964]  0000000000000000 ffff8800cde5fa58 ffffffff810aebed 0000000000000046
      [  169.127970]  ffffffff81c5d518 0000000000000268 0000000000000000 ffff8800cde5fa88
      [  169.127981] Call Trace:
      [  169.127992]  [<ffffffff817f6907>] dump_stack+0x4f/0x7b
      [  169.128001]  [<ffffffff810aebed>] ___might_sleep+0x16d/0x270
      [  169.128008]  [<ffffffff810aed38>] __might_sleep+0x48/0x90
      [  169.128017]  [<ffffffff817fc359>] mutex_lock_nested+0x29/0x410
      [  169.128073]  [<ffffffffc01635f0>] ? vgpu_write64+0x220/0x220 [i915]
      [  169.128138]  [<ffffffffc017fddf>] ? ironlake_update_primary_plane+0x2ff/0x410 [i915]
      [  169.128198]  [<ffffffffc0190e75>] intel_frontbuffer_flush+0x25/0x70 [i915]
      [  169.128253]  [<ffffffffc01831ac>] intel_finish_crtc_commit+0x4c/0x180 [i915]
      [  169.128279]  [<ffffffffc00784ac>] drm_atomic_helper_commit_planes+0x12c/0x240 [drm_kms_helper]
      [  169.128338]  [<ffffffffc0184264>] __intel_set_mode+0x684/0x830 [i915]
      [  169.128378]  [<ffffffffc018a84a>] intel_crtc_set_config+0x49a/0x620 [i915]
      [  169.128385]  [<ffffffff817fdd39>] ? mutex_unlock+0x9/0x10
      [  169.128391]  [<ffffffff81467b69>] drm_mode_set_config_internal+0x69/0x120
      [  169.128398]  [<ffffffff8119b547>] ? might_fault+0x57/0xb0
      [  169.128403]  [<ffffffff8146bf93>] drm_mode_setcrtc+0x253/0x620
      [  169.128409]  [<ffffffff8145c600>] drm_ioctl+0x1a0/0x6a0
      [  169.128415]  [<ffffffff810b3b41>] ? get_parent_ip+0x11/0x50
      [  169.128424]  [<ffffffff811e9ab8>] do_vfs_ioctl+0x2f8/0x530
      [  169.128429]  [<ffffffff810d0fcd>] ? trace_hardirqs_on+0xd/0x10
      [  169.128435]  [<ffffffff812e7676>] ? selinux_file_ioctl+0x56/0x100
      [  169.128439]  [<ffffffff811e9d71>] SyS_ioctl+0x81/0xa0
      [  169.128445]  [<ffffffff81800697>] system_call_fastpath+0x12/0x6f
      
      Solve it by using the newly introduced drm_atomic_helper_commit_planes_on_crtc.
      
      The problem here was that the drm_atomic_helper_commit_planes() helper
      we were using was basically designed to do
      
          begin_crtc_commit(crtc #1)
          begin_crtc_commit(crtc #2)
          ...
          commit all planes
          finish_crtc_commit(crtc #1)
          finish_crtc_commit(crtc #2)
      
      The problem here is that since our hardware relies on vblank evasion,
      our CRTC 'begin' function waits until we're out of the danger zone in
      which register writes might wind up straddling the vblank, then disables
      interrupts; our 'finish' function re-enables interrupts after the
      registers have been written.  The expectation is that the operations between
      'begin' and 'end' must be performed without sleeping (since interrupts
      are disabled) and should happen as quickly as possible.  By clumping all
      of the 'begin' calls together, we introducing a couple problems:
       * Subsequent 'begin' invocations might sleep (which is illegal)
       * The first 'begin' ensured that we were far enough from the vblank that
         we could write our registers safely and ensure they all fell within
         the same frame.  Adding extra delay waiting for subsequent CRTC's
         wasn't accounted for and could put us back into the 'danger zone' for
         CRTC #1.
      
      This commit solves the problem by using a new helper that allows an
      order of operations like:
      
         for each crtc {
              begin_crtc_commit(crtc)  // sleep (maybe), then disable interrupts
              commit planes for this specific CRTC
              end_crtc_commit(crtc)    // reenable interrupts
         }
      
      so that sleeps will only be performed while interrupts are enabled and
      we can be sure that registers for a CRTC will be written immediately
      once we know we're in the safe zone.
      
      The crtc->config->base.crtc update may seem unrelated, but the helper
      will use it to obtain the crtc for the state. Without the update it
      will dereference NULL and crash.
      
      Changes since v1:
      - Use Matt Roper's commit message.
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      References: https://bugs.freedesktop.org/show_bug.cgi?id=90398Reviewed-by: default avatarAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      d2944cf2
    • Maarten Lankhorst's avatar
      f0fdc55d
    • Daniel Vetter's avatar
      drm/i915: Only dither on 6bpc panels · e8fa4270
      Daniel Vetter authored
      In
      
      commit d328c9d7
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Fri Apr 10 16:22:37 2015 +0200
      
          drm/i915: Select starting pipe bpp irrespective or the primary plane
      
      we started to select the pipe bpp from sink capabilities and not from
      the primary framebuffer - that one might change (and we don't want to
      incur a modeset) and sprites might contain higher bpp content too.
      
      We also selected dithering on a 8 bpc screen displaying a 24bpp rgb
      primary, because pipe_bpp is 24 for such a typical 8 bpc sink, but since
      the commit mentioned above, base_bpp is always the absolute maximum
      supported by the hardware, e.g., 36 bpp on my Ironlake chip. Iow. the
      only way to not get dithering would have been to connect a deep color 12
      bpc display, so pipe_bpp == 36 == base_bpp.
      
      Hence only enable dithering on 6bpc screens where we difinitely and
      always want it.
      
      Cc: Mario Kleiner <mario.kleiner.de@gmail.com>
      Reported-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Reviewed-and-tested-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      e8fa4270
  3. 09 Aug, 2015 5 commits
    • Linus Torvalds's avatar
      Linux 4.2-rc6 · f7644cbf
      Linus Torvalds authored
      f7644cbf
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · a230e95c
      Linus Torvalds authored
      Pull input subsystem fixes from Dmitry Torokhov:
       "Just small ALPS and Elan touchpads, and other driver fixups"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: elantech - add special check for fw_version 0x470f01 touchpad
        Input: twl4030-vibra - fix ERROR: Bad of_node_put() warning
        Input: alps - only Dell laptops have separate button bits for v2 dualpoint sticks
        Input: axp20x-pek - add module alias
        Input: turbografx - fix potential out of bound access
      a230e95c
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 3fbdc379
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "Another round of MIPS fixes for 4.2.  No area does particularly stand
        out but we have a two unpleasant ones:
      
         - Kernel ptes are marked with a global bit which allows the kernel to
           share kernel TLB entries between all processes.  For this to work
           both entries of an adjacent even/odd pte pair need to have the
           global bit set.  There has been a subtle race in setting the other
           entry's global bit since ~ 2000 but it take particularly
           pathological workloads that essentially do mostly vmalloc/vfree to
           trigger this.
      
           This pull request fixes the 64-bit case but leaves the case of 32
           bit CPUs with 64 bit ptes unsolved for now.  The unfixed cases
           affect hardware that is not available in the field yet.
      
         - Instruction emulation requires loading instructions from user space
           but the current fast but simplistic approach will fail on pages
           that are PROT_EXEC but !PROT_READ.  For this reason we temporarily
           do not permit this permission and will map pages with PROT_EXEC |
           PROT_READ.
      
        The remainder of this pull request is more or less across the field
        and the short log explains them well"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: Make set_pte() SMP safe.
        MIPS: Replace add and sub instructions in relocate_kernel.S with addiu
        MIPS: Flush RPS on kernel entry with EVA
        Revert "MIPS: BCM63xx: Provide a plat_post_dma_flush hook"
        MIPS: BMIPS: Delete unused Kconfig symbol
        MIPS: Export get_c0_perfcount_int()
        MIPS: show_stack: Fix stack trace with EVA
        MIPS: do_mcheck: Fix kernel code dump with EVA
        MIPS: SMP: Don't increment irq_count multiple times for call function IPIs
        MIPS: Partially disable RIXI support.
        MIPS: Handle page faults of executable but unreadable pages correctly.
        MIPS: Malta: Don't reinitialise RTC
        MIPS: unaligned: Fix build error on big endian R6 kernels
        MIPS: Fix sched_getaffinity with MT FPAFF enabled
        MIPS: Fix build with CONFIG_OF=y for non OF-enabled targets
        CPUFREQ: Loongson2: Fix broken build due to incorrect include.
      3fbdc379
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · af0b3152
      Linus Torvalds authored
      Pull btrfs fix from Chris Mason:
       "We have a btrfs quota regression fix.
      
        I merged this one on Thursday and have run it through tests against
        current master.
      
        Normally I wouldn't have sent this while you were finalizing rc6, but
        I'm feeding mosquitoes in the adirondacks next week, so I wanted to
        get this one out before leaving.  I'll leave longer tests running and
        check on things during the week, but I don't expect any problems"
      
      * 'for-linus-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        btrfs: qgroup: Fix a regression in qgroup reserved space.
      af0b3152
    • Linus Torvalds's avatar
      Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux · bae1577e
      Linus Torvalds authored
      Pull thermal management fixes from Zhang Rui:
       "Specifics:
      
         - fix an error that "weight_attr" sysfs attribute is not removed
           while unbinding.  From: Viresh Kumar.
      
         - fix power allocator governor tracing to return the real request.
           From Javi Merino.
      
         - remove redundant owner assignment of hisi platform thermal driver.
           From Krzysztof Kozlowski.
      
         - a couple of small fixes of Exynos thermal driver.  From Krzysztof
           Kozlowski and Chanwoo Choi"
      
      * 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
        thermal: Drop owner assignment from platform_driver
        thermal: exynos: Remove unused code related to platform_data on probe()
        thermal: exynos: Add the dependency of CONFIG_THERMAL_OF instead of CONFIG_OF
        thermal: exynos: Disable the regulator on probe failure
        thermal: power_allocator: trace the real requested power
        thermal: remove dangling 'weight_attr' device file
      bae1577e
  4. 08 Aug, 2015 6 commits
    • Linus Torvalds's avatar
      Merge tag 'arc-v4.2-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · dd2384a7
      Linus Torvalds authored
      Pull ARC fixes from Vineet Gupta:
       "Here's a late pull request for accumulated ARC fixes which came out of
        extended testing of the new ARCv2 port with LTP etc.  llock/scond
        livelock workaround has been reviewed by PeterZ.  The changes look a
        lot but I've crafted them into finer grained patches for better
        tracking later.
      
        I have some more fixes (ARC Futex backend) ready to go but those will
        have to wait for tglx to return from vacation.
      
        Summary:
         - Enable a reduced config of HS38 (w/o div-rem, ll64...)
         - Add software workaround for LLOCK/SCOND livelock
         - Fallout of a recent pt_regs update"
      
      * tag 'arc-v4.2-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARCv2: spinlock/rwlock/atomics: reduce 1 instruction in exponential backoff
        ARC: Make pt_regs regs unsigned
        ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle
        ARCv2: spinlock/rwlock/atomics: Delayed retry of failed SCOND with exponential backoff
        ARC: LLOCK/SCOND based rwlock
        ARC: LLOCK/SCOND based spin_lock
        ARC: refactor atomic inline asm operands with symbolic names
        Revert "ARCv2: STAR 9000837815 workaround hardware exclusive transactions livelock"
        ARCv2: [axs103_smp] Reduce clk for Quad FPGA configs
        ARCv2: Fix the peripheral address space detection
        ARCv2: allow selection of page size for MMUv4
        ARCv2: lib: memset: Don't assume 64-bit load/stores
        ARCv2: lib: memcpy: Missing PREFETCHW
        ARCv2: add knob for DIV_REV in Kconfig
        ARC/time: Migrate to new 'set-state' interface
      dd2384a7
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · b3b98a55
      Linus Torvalds authored
      Pull virtio fix from Michael Tsirkin:
       "A last minute fix for the new virtio input driver.  It seems pretty
         obvious, and the problem it's fixing would be quite hard to debug"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio-input: reset device and detach unused during remove
      b3b98a55
    • Linus Torvalds's avatar
      Merge tag 'dm-4.2-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm · 39171c86
      Linus Torvalds authored
      Pull device mapper fixes from Mike Snitzer:
      
       - stable fix for a dm_merge_bvec() regression on 32 bit Fedora systems.
      
       - fix for a 4.2 DM thinp discard regression due to inability to
         properly delete a range of blocks in a data mapping btree.
      
      * tag 'dm-4.2-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm btree remove: fix bug in remove_one()
        dm: fix dm_merge_bvec regression on 32 bit systems
      39171c86
    • Linus Torvalds's avatar
      Merge tag 'sound-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · f0943013
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "The only bulk changes in this request is ABI updates for ASoC topology
        API.  It's a new API that was introduced in 4.2, and we'd like to
        avoid ABI change after the release, so it's taken now.  As there is no
        real in-tree user for this API, it should be fairly safe.
      
        Other than that, the usual small fixes are found in various drivers:
        ASoC cs4265, rt5645, intel-sst, firewire, oxygen and HD-audio"
      
      * tag 'sound-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ASoC: topology: Add private data type and bump ABI version to 3
        ASoC: topology: Add ops support to byte controls UAPI
        ASoC: topology: Update TLV support so we can support more TLV types
        ASoC: topology: add private data to manifest
        ASoC: topology: Add subsequence in topology
        ALSA: hda - one Dell machine needs the headphone white noise fixup
        ALSA: fireworks/firewire-lib: add support for recent firmware quirk
        Revert "ALSA: fireworks: add support for AudioFire2 quirk"
        ASoC: topology: fix typo in soc_tplg_kcontrol_bind_io()
        ALSA: HDA: Dont check return for snd_hdac_chip_readl
        ALSA: HDA: Fix stream assignment for host in decoupled mode
        ASoC: rt5645: Fix lost pin setting for DMIC1
        ALSA: oxygen: Fix logical-not-parentheses warning
        ASoC: Intel: sst_byt: fix initialize 'NULL device *' issue
        ASoC: Intel: haswell: fix initialize 'NULL device *' issue
        ASoC: cs4265: Fix setting dai format for Left/Right Justified
      f0943013
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.2-rc6' of... · ea8dc1ab
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
      
       - Export module alias information in g762 and nct7904 to support
         auto-loading.
      
       - Blacklist Dell Studio XPS 8100 in dell-smm to fix fan control
         problems.
      
      * tag 'hwmon-for-linus-v4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (g762) Export OF module alias information
        hwmon: (nct7904) Export I2C module alias information
        hwmon: (dell-smm) Blacklist Dell Studio XPS 8100
      ea8dc1ab
    • Linus Torvalds's avatar
      Merge tag 'usb-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · d5a8ab40
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some USB and PHY fixes for 4.2-rc6 that resolve some reported
        issues.
      
        All of these have been in the linux-next tree for a while, full
        details on the patches are in the shortlog below"
      
      * tag 'usb-4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        ARM: dts: dra7: Add syscon-pllreset syscon to SATA PHY
        drivers/usb: Delete XHCI command timer if necessary
        xhci: fix off by one error in TRB DMA address boundary check
        usb: udc: core: add device_del() call to error pathway
        phy: ti-pipe3: i783 workaround for SATA lockup after dpll unlock/relock
        phy-sun4i-usb: Add missing EXPORT_SYMBOL_GPL for sun4i_usb_phy_set_squelch_detect
        USB: sierra: add 1199:68AB device ID
        usb: gadget: f_printer: actually limit the number of instances
        usb: gadget: f_hid: actually limit the number of instances
        usb: gadget: f_uac2: fix calculation of uac2->p_interval
        usb: gadget: bdc: fix a driver crash on disconnect
        usb: chipidea: ehci_init_driver is intended to call one time
        USB: qcserial: Add support for Dell Wireless 5809e 4G Modem
        USB: qcserial/option: make AT URCs work for Sierra Wireless MC7305/MC7355
      d5a8ab40