1. 11 Dec, 2015 9 commits
  2. 06 Dec, 2015 1 commit
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · a2dbb7b5
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "A bunch of change across the board, the main things are some vblank
        fallout in radeon and nouveau required some work, but I think this
        should fix it all.  There is also one drm fix for an oops in vmwgfx
        with how we pass the drm master around.
      
        The rest is just some amdgpu, i915, imx and rockchip fixes.
      
        Probably more than I'd like at this point, but hopefully things settle
        down now"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (40 commits)
        drm/amdgpu: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v3)
        drm/radeon: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v2)
        drm/radeon: Retry DDC probing on DVI on failure if we got an HPD interrupt
        drm/amdgpu: add spin lock to protect freed list in vm (v2)
        drm/amdgpu: partially revert "drm/amdgpu: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR" v2
        drm/amdgpu: take a BO reference for the user fence
        drm/amdgpu: take a BO reference in the display code
        drm/amdgpu: set snooped flags only on system addresses v2
        drm/nouveau: Fix pre-nv50 pageflip events (v4)
        drm: Fix an unwanted master inheritance v2
        drm/amdgpu: fix race condition in amd_sched_entity_push_job
        drm/amdgpu: add err check for pin userptr
        drm/i915: take a power domain reference while checking the HDMI live status
        drm/i915: add MISSING_CASE to a few port/aux power domain helpers
        drm/i915/ddi: fix intel_display_port_aux_power_domain() after HDMI detect
        drm/i915: Introduce a gmbus power domain
        drm/i915: Clean up AUX power domain handling
        drm/rockchip: Use CRTC vblank event interface
        drm/rockchip: Fix module autoload for OF platform driver
        drm/rockchip: vop: fix window origin calculation
        ...
      a2dbb7b5
  3. 05 Dec, 2015 2 commits
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 9cfe5212
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "This fixes a couple of crypto drivers that were using memcmp to verify
        authentication tags.  They now use crypto_memneq instead"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: talitos - Fix timing leak in ESP ICV verification
        crypto: nx - Fix timing leak in GCM and CCM decryption
      9cfe5212
    • Dave Airlie's avatar
      Merge branch 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux into drm-next · df4d4aa9
      Dave Airlie authored
      A few more last minute fixes for 4.4 on top of my pull request from
      earlier this week.  The big change here is a vblank regression fix due to
      commit 4dfd6486 "drm: Use vblank timestamps to guesstimate how many vblanks
      were missed".  Beyond that, a hotplug fix and a few VM fixes.
      
      * 'drm-fixes-4.4' of git://people.freedesktop.org/~agd5f/linux:
        drm/amdgpu: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v3)
        drm/radeon: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v2)
        drm/radeon: Retry DDC probing on DVI on failure if we got an HPD interrupt
        drm/amdgpu: add spin lock to protect freed list in vm (v2)
        drm/amdgpu: partially revert "drm/amdgpu: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR" v2
        drm/amdgpu: take a BO reference for the user fence
        drm/amdgpu: take a BO reference in the display code
        drm/amdgpu: set snooped flags only on system addresses v2
        drm/amdgpu: fix race condition in amd_sched_entity_push_job
        drm/amdgpu: add err check for pin userptr
        add blacklist for thinkpad T40p
        drm/amdgpu: fix VM page table reference counting
        drm/amdgpu: fix userptr flags check
      df4d4aa9
  4. 04 Dec, 2015 28 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client · 849ee3d4
      Linus Torvalds authored
      Pull Ceph fix from Sage Weil:
       "This addresses a refcounting bug that leads to a use-after-free"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
        rbd: don't put snap_context twice in rbd_queue_workfn()
      849ee3d4
    • Alex Deucher's avatar
      drm/amdgpu: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v3) · 8e36f9d3
      Alex Deucher authored
      commit 4dfd6486 "drm: Use vblank timestamps to guesstimate how many
      vblanks were missed" introduced in Linux 4.4-rc1 makes the drm core
      more fragile to drivers which don't update hw vblank counters and
      vblank timestamps in sync with firing of the vblank irq and
      essentially at leading edge of vblank.
      
      This exposed a problem with radeon-kms/amdgpu-kms which do not
      satisfy above requirements:
      
      The vblank irq fires a few scanlines before start of vblank, but
      programmed pageflips complete at start of vblank and
      vblank timestamps update at start of vblank, whereas the
      hw vblank counter increments only later, at start of vsync.
      
      This leads to problems like off by one errors for vblank counter
      updates, vblank counters apparently going backwards or vblank
      timestamps apparently having time going backwards. The net result
      is stuttering of graphics in games, or little hangs, as well as
      total failure of timing sensitive applications.
      
      See bug #93147 for an example of the regression on Linux 4.4-rc:
      
      https://bugs.freedesktop.org/show_bug.cgi?id=93147
      
      This patch tries to align all above events better from the
      viewpoint of the drm core / of external callers to fix the problem:
      
      1. The apparent start of vblank is shifted a few scanlines earlier,
      so the vblank irq now always happens after start of this extended
      vblank interval and thereby drm_update_vblank_count() always samples
      the updated vblank count and timestamp of the new vblank interval.
      
      To achieve this, the reporting of scanout positions by
      radeon_get_crtc_scanoutpos() now operates as if the vblank starts
      radeon_crtc->lb_vblank_lead_lines before the real start of the hw
      vblank interval. This means that the vblank timestamps which are based
      on these scanout positions will now update at this earlier start of
      vblank.
      
      2. The driver->get_vblank_counter() function will bump the returned
      vblank count as read from the hw by +1 if the query happens after
      the shifted earlier start of the vblank, but before the real hw increment
      at start of vsync, so the counter appears to increment at start of vblank
      in sync with the timestamp update.
      
      3. Calls from vblank irq-context and regular non-irq calls are now
      treated identical, always simulating the shifted vblank start, to
      avoid inconsistent results for queries happening from vblank irq vs.
      happening from drm_vblank_enable() or vblank_disable_fn().
      
      4. The radeon_flip_work_func will delay mmio programming a pageflip until
      the start of the real vblank iff it happens to execute inside the shifted
      earlier start of the vblank, so pageflips now also appear to execute at
      start of the shifted vblank, in sync with vblank counter and timestamp
      updates. This to avoid some races between updates of vblank count and
      timestamps that are used for swap scheduling and pageflip execution which
      could cause pageflips to execute before the scheduled target vblank.
      
      The lb_vblank_lead_lines "fudge" value is calculated as the size of
      the display controllers line buffer in scanlines for the given video
      mode: Vblank irq's are triggered by the line buffer logic when the line
      buffer refill for a video frame ends, ie. when the line buffer source read
      position enters the hw vblank. This means that a vblank irq could fire at
      most as many scanlines before the current reported scanout position of the
      crtc timing generator as the number of scanlines the line buffer can
      maximally hold for a given video mode.
      
      This patch has been successfully tested on a RV730 card with DCE-3 display
      engine and on a evergreen card with DCE-4 display engine, in single-display
      and dual-display configuration, with different video modes.
      
      A similar patch is needed for amdgpu-kms to fix the same problem.
      
      Limitations:
      
      - Maybe replace the udelay() in the flip_work_func() by a suitable
        usleep_range() for a bit better efficiency? Will try that.
      
      - Line buffer sizes in pixels are hard-coded on < DCE-4 to a value
        i just guessed to be high enough to work ok, lacking info on the true
        sizes atm.
      
      Probably fixes: fdo#93147
      
      Port of Mario's radeon fix to amdgpu.
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      (v1) Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
      
      (v2) Refine amdgpu_flip_work_func() for better efficiency.
      
           In amdgpu_flip_work_func, replace the busy waiting udelay(5)
           with event lock held by a more performance and energy efficient
           usleep_range() until at least predicted true start of hw vblank,
           with some slack for scheduler happiness. Release the event lock
           during waits to not delay other outputs in doing their stuff, as
           the waiting can last up to 200 usecs in some cases.
      
           Also small fix to code comment and formatting in that function.
      
      (v2) Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
      
      (v3) Fix crash in crtc disabled case
      8e36f9d3
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · fb39cbda
      Linus Torvalds authored
      Pull libnvdimm fixes from Dan Williams:
      
       - NFIT parsing regression fixes from Linda.  The nvdimm hot-add
         implementation merged in 4.4-rc1 interpreted the specification in a
         way that breaks actual HPE platforms.  We are also closing the loop
         with the ACPI Working Group to get this clarification added to the
         spec.
      
       - Andy pointed out that his laptop without nvdimm resources is loading
         the e820-nvdimm module by default, fix that up to only load the
         module when an e820-type-12 range is present.
      
      * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        nfit: Adjust for different _FIT and NFIT headers
        nfit: Fix the check for a successful NFIT merge
        nfit: Account for table size length variation
        libnvdimm, e820: skip module loading when no type-12
      fb39cbda
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · db281766
      Linus Torvalds authored
      Pull ARM KVM fixes from Paolo Bonzini:
      
       - a series of fixes to deal with the aliasing between the sp and xzr
         register
      
       - a fix for the cache flush fix that went in -rc3
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        ARM/arm64: KVM: correct PTE uncachedness check
        arm64: KVM: Get rid of old vcpu_reg()
        arm64: KVM: Correctly handle zero register in system register accesses
        arm64: KVM: Remove const from struct sys_reg_params
        arm64: KVM: Correctly handle zero register during MMIO
      db281766
    • Mario Kleiner's avatar
      drm/radeon: Fixup hw vblank counter/ts for new drm_update_vblank_count() (v2) · 5b5561b3
      Mario Kleiner authored
      commit 4dfd6486 "drm: Use vblank timestamps to guesstimate how many
      vblanks were missed" introduced in Linux 4.4-rc1 makes the drm core
      more fragile to drivers which don't update hw vblank counters and
      vblank timestamps in sync with firing of the vblank irq and
      essentially at leading edge of vblank.
      
      This exposed a problem with radeon-kms/amdgpu-kms which do not
      satisfy above requirements:
      
      The vblank irq fires a few scanlines before start of vblank, but
      programmed pageflips complete at start of vblank and
      vblank timestamps update at start of vblank, whereas the
      hw vblank counter increments only later, at start of vsync.
      
      This leads to problems like off by one errors for vblank counter
      updates, vblank counters apparently going backwards or vblank
      timestamps apparently having time going backwards. The net result
      is stuttering of graphics in games, or little hangs, as well as
      total failure of timing sensitive applications.
      
      See bug #93147 for an example of the regression on Linux 4.4-rc:
      
      https://bugs.freedesktop.org/show_bug.cgi?id=93147
      
      This patch tries to align all above events better from the
      viewpoint of the drm core / of external callers to fix the problem:
      
      1. The apparent start of vblank is shifted a few scanlines earlier,
      so the vblank irq now always happens after start of this extended
      vblank interval and thereby drm_update_vblank_count() always samples
      the updated vblank count and timestamp of the new vblank interval.
      
      To achieve this, the reporting of scanout positions by
      radeon_get_crtc_scanoutpos() now operates as if the vblank starts
      radeon_crtc->lb_vblank_lead_lines before the real start of the hw
      vblank interval. This means that the vblank timestamps which are based
      on these scanout positions will now update at this earlier start of
      vblank.
      
      2. The driver->get_vblank_counter() function will bump the returned
      vblank count as read from the hw by +1 if the query happens after
      the shifted earlier start of the vblank, but before the real hw increment
      at start of vsync, so the counter appears to increment at start of vblank
      in sync with the timestamp update.
      
      3. Calls from vblank irq-context and regular non-irq calls are now
      treated identical, always simulating the shifted vblank start, to
      avoid inconsistent results for queries happening from vblank irq vs.
      happening from drm_vblank_enable() or vblank_disable_fn().
      
      4. The radeon_flip_work_func will delay mmio programming a pageflip until
      the start of the real vblank iff it happens to execute inside the shifted
      earlier start of the vblank, so pageflips now also appear to execute at
      start of the shifted vblank, in sync with vblank counter and timestamp
      updates. This to avoid some races between updates of vblank count and
      timestamps that are used for swap scheduling and pageflip execution which
      could cause pageflips to execute before the scheduled target vblank.
      
      The lb_vblank_lead_lines "fudge" value is calculated as the size of
      the display controllers line buffer in scanlines for the given video
      mode: Vblank irq's are triggered by the line buffer logic when the line
      buffer refill for a video frame ends, ie. when the line buffer source read
      position enters the hw vblank. This means that a vblank irq could fire at
      most as many scanlines before the current reported scanout position of the
      crtc timing generator as the number of scanlines the line buffer can
      maximally hold for a given video mode.
      
      This patch has been successfully tested on a RV730 card with DCE-3 display
      engine and on a evergreen card with DCE-4 display engine, in single-display
      and dual-display configuration, with different video modes.
      
      A similar patch is needed for amdgpu-kms to fix the same problem.
      
      Limitations:
      
      - Line buffer sizes in pixels are hard-coded on < DCE-4 to a value
        i just guessed to be high enough to work ok, lacking info on the true
        sizes atm.
      
      Fixes: fdo#93147
      Signed-off-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Michel Dänzer <michel.daenzer@amd.com>
      Cc: Harry Wentland <Harry.Wentland@amd.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      
      (v1) Tested-by: Dave Witbrodt <dawitbro@sbcglobal.net>
      
      (v2) Refine radeon_flip_work_func() for better efficiency:
      
           In radeon_flip_work_func, replace the busy waiting udelay(5)
           with event lock held by a more performance and energy efficient
           usleep_range() until at least predicted true start of hw vblank,
           with some slack for scheduler happiness. Release the event lock
           during waits to not delay other outputs in doing their stuff, as
           the waiting can last up to 200 usecs in some cases.
      
           Retested on DCE-3 and DCE-4 to verify it still works nicely.
      
      (v2) Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      5b5561b3
    • Lyude's avatar
      drm/radeon: Retry DDC probing on DVI on failure if we got an HPD interrupt · cb5d4166
      Lyude authored
      HPD signals on DVI ports can be fired off before the pins required for
      DDC probing actually make contact, due to the pins for HPD making
      contact first. This results in a HPD signal being asserted but DDC
      probing failing, resulting in hotplugging occasionally failing.
      
      This is somewhat rare on most cards (depending on what angle you plug
      the DVI connector in), but on some cards it happens constantly. The
      Radeon R5 on the machine used for testing this patch for instance, runs
      into this issue just about every time I try to hotplug a DVI monitor and
      as a result hotplugging almost never works.
      
      Rescheduling the hotplug work for a second when we run into an HPD
      signal with a failing DDC probe usually gives enough time for the rest
      of the connector's pins to make contact, and fixes this issue.
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarLyude <cpaul@redhat.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      cb5d4166
    • jimqu's avatar
      drm/amdgpu: add spin lock to protect freed list in vm (v2) · 81d75a30
      jimqu authored
      there is a protection fault about freed list when OCL test.
      add a spin lock to protect it.
      
      v2: drop changes in vm_fini
      Signed-off-by: default avatarJimQu <jim.qu@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      81d75a30
    • Christian König's avatar
      drm/amdgpu: partially revert "drm/amdgpu: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR" v2 · 9c97b5ab
      Christian König authored
      The gtt_end is already inclusive, we don't need to subtract one here.
      
      v2 (chk): keep the fix for the VM code, cause here it really applies.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAnatoli Antonovitch <anatoli.antonovitch@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      9c97b5ab
    • Christian König's avatar
      drm/amdgpu: take a BO reference for the user fence · f3f17692
      Christian König authored
      No need for a GEM reference here.
      Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      f3f17692
    • Christian König's avatar
      drm/amdgpu: take a BO reference in the display code · e9d951a8
      Christian König authored
      No need for the GEM reference here.
      Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      e9d951a8
    • Paolo Bonzini's avatar
      Merge tag 'kvm-arm-for-v4.4-rc4' of... · 09922076
      Paolo Bonzini authored
      Merge tag 'kvm-arm-for-v4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master
      
      KVM/ARM fixes for v4.4-rc4
      
      - A series of fixes to deal with the aliasing between the sp and xzr register
      - A fix for the cache flush fix that went in -rc3
      09922076
    • Christian König's avatar
      drm/amdgpu: set snooped flags only on system addresses v2 · 6d99905a
      Christian König authored
      Not necessary for VRAM.
      
      v2: no need to check if ttm is NULL.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      6d99905a
    • Linus Torvalds's avatar
      Merge tag 'sound-4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 8cdef969
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "This time we've got a larger number of updates, mainly from ASoC
        world.  The only significant LOCs found here are for Realtek codecs,
        where most of changes are quite systematic replacements.
      
        There are also a few fixes in ASoC core side: one is the PM call order
        fix to ensure the DPAM resume working properly.  Another is the proper
        cleanup call after freeing DAPM widgets, and the correction of the
        wrong callback set in topology API.
      
        The rest are a wide range of driver-specific small fixes, including
        HD-audio"
      
      * tag 'sound-4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (35 commits)
        ALSA: hda - Add Conexant CX8200 (14f1:2008) codec entry
        ALSA: hda - Correct codec names for 14f1:50f1 and 14f1:50f3
        ALSA: hda - Skip ELD notification during system suspend
        ASoC: core: Change power state before rechecking endpoint
        ASoC: fix kernel-doc warnings in sound/soc/soc-ops.c
        ASoC: rt5645: Add dmi_system_id "Google Terra"
        ASoC: rockchip: Fix incorrect VDW value for 24 bit
        ASoC: fsl: clarify ac97 dependency
        ASoC: Intel: Skylake: fix memory leak
        ASoC: davinci-mcasp: Fix master capture only mode
        ASoC: es8328: Fix shifts for mixer switches
        ASoC: rt5645: Add dmi_system_id "Google Wizpig"
        ASoC: sti: set player private data
        ASoC: sti: rename ST proprietary DT properties
        ASoC: sti: remove wrong error message
        ASoC: Intel: Skylake: Add I2C depends for SKL machine
        ASoC: topology: fix info callback for TLV byte control
        ASoC: rt5670: fix wrong bit def for pll src
        ASoC: nau8825: add pm function
        ASoC: rt5645: Add struct dmi_system_id "Google Edgar" for Chrome OS
        ...
      8cdef969
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · b1007e73
      Linus Torvalds authored
      Pull power management and ACPI fixes from Rafael Wysocki:
       "These fix a recent regression in the ACPI PCI host bridge
        initialization code, clean up some recent changes (generic power
        domains framework, ACPI AML debugger support), fix three older but
        annoying bugs (PCI power management.  generic power domains framework,
        cpufreq) and a build problem (device properties framework), and update
        a stale MAINTAINERS entry (ACPI backlight driver).
      
        Specifics:
      
         - Fix a regression in the ACPI PCI host bridge initialization code
           introduced by the recent consolidation of the host bridge handling
           on x86 and ia64 that forgot to take one special piece of code
           related to NUMA on x86 into account (Liu Jiang).
      
         - Improve the Kconfig help description of the new ACPI AML debugger
           support option to avoid possible confusion (Peter Zijlstra).
      
         - Remove a piece of code in the generic power domains framework that
           should have been removed by one of the recent commits modifying
           that code (Ulf Hansson).
      
         - Reduce the log level of a PCI PM message that generates a lot of
           false-positive log noise for some drivers and improve the message
           itself while at it (Imre Deak).
      
         - Fix the OF-based domain lookup code in the generic power domains
           framework to make it drop references to DT nodes correctly (Eric
           Anholt).
      
         - Prevent the cpufreq core from setting the policy back to the
           default after a CPU offline/online cycle for cpufreq drivers
           providing the ->setpolicy callback (Srinivas Pandruvada).
      
         - Fix a build problem for CONFIG_ACPI unset in the device properties
           framework (Hanjun Guo).
      
         - Fix a stale file path in the ACPI backlight driver entry in
           MAINTAINERS (Dan Carpenter)"
      
      * tag 'pm+acpi-4.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / Domains: Fix bad of_node_put() in failure paths of genpd_dev_pm_attach()
        cpufreq: use last policy after online for drivers with ->setpolicy
        PCI / PM: Tune down retryable runtime suspend error messages
        PM / Domains: Validate cases of a non-bound driver in genpd governor
        MAINTAINERS: ACPI / video: update a file name in drivers/acpi/
        ACPI / property: fix compile error for acpi_node_get_property_reference() when CONFIG_ACPI=n
        x86/PCI/ACPI: Fix regression caused by commit 4d6b4e69
        ACPI: Better describe ACPI_DEBUGGER
      b1007e73
    • Ard Biesheuvel's avatar
      ARM/arm64: KVM: correct PTE uncachedness check · 0de58f85
      Ard Biesheuvel authored
      Commit e6fab544 ("ARM/arm64: KVM: test properly for a PTE's
      uncachedness") modified the logic to test whether a HYP or stage-2
      mapping needs flushing, from [incorrectly] interpreting the page table
      attributes to [incorrectly] checking whether the PFN that backs the
      mapping is covered by host system RAM. The PFN number is part of the
      output of the translation, not the input, so we have to use pte_pfn()
      on the contents of the PTE, not __phys_to_pfn() on the HYP virtual
      address or stage-2 intermediate physical address.
      
      Fixes: e6fab544 ("ARM/arm64: KVM: test properly for a PTE's uncachedness")
      Cc: stable@vger.kernel.org
      Tested-by: default avatarPavel Fedin <p.fedin@samsung.com>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      0de58f85
    • Pavel Fedin's avatar
      arm64: KVM: Get rid of old vcpu_reg() · f6be563a
      Pavel Fedin authored
      Using oldstyle vcpu_reg() accessor is proven to be inappropriate and
      unsafe on ARM64. This patch converts the rest of use cases to new
      accessors and completely removes vcpu_reg() on ARM64.
      Signed-off-by: default avatarPavel Fedin <p.fedin@samsung.com>
      Reviewed-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      f6be563a
    • Pavel Fedin's avatar
      arm64: KVM: Correctly handle zero register in system register accesses · 2ec5be3d
      Pavel Fedin authored
      System register accesses also use zero register for Rt == 31, and
      therefore using it will also result in getting SP value instead. This
      patch makes them also using new accessors, introduced by the previous
      patch. Since register value is no longer directly associated with storage
      inside vCPU context structure, we introduce a dedicated storage for it in
      struct sys_reg_params.
      
      This refactor also gets rid of "massive hack" in kvm_handle_cp_64().
      Signed-off-by: default avatarPavel Fedin <p.fedin@samsung.com>
      Reviewed-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      2ec5be3d
    • Pavel Fedin's avatar
      arm64: KVM: Remove const from struct sys_reg_params · 3fec037d
      Pavel Fedin authored
      Further rework is going to introduce a dedicated storage for transfer
      register value in struct sys_reg_params. Before doing this we have to
      remove 'const' modifiers from it in all accessor functions and their
      callers.
      Signed-off-by: default avatarPavel Fedin <p.fedin@samsung.com>
      Reviewed-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      3fec037d
    • Pavel Fedin's avatar
      arm64: KVM: Correctly handle zero register during MMIO · bc45a516
      Pavel Fedin authored
      On ARM64 register index of 31 corresponds to both zero register and SP.
      However, all memory access instructions, use ZR as transfer register. SP
      is used only as a base register in indirect memory addressing, or by
      register-register arithmetics, which cannot be trapped here.
      
      Correct emulation is achieved by introducing new register accessor
      functions, which can do special handling for reg_num == 31. These new
      accessors intentionally do not rely on old vcpu_reg() on ARM64, because
      it is to be removed. Since the affected code is shared by both ARM
      flavours, implementations of these accessors are also added to ARM32 code.
      
      This patch fixes setting MMIO register to a random value (actually SP)
      instead of zero by something like:
      
       *((volatile int *)reg) = 0;
      
      compilers tend to generate "str wzr, [xx]" here
      
      [Marc: Fixed 32bit splat]
      Signed-off-by: default avatarPavel Fedin <p.fedin@samsung.com>
      Reviewed-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      bc45a516
    • Ilya Dryomov's avatar
      rbd: don't put snap_context twice in rbd_queue_workfn() · 70b16db8
      Ilya Dryomov authored
      Commit 4e752f0a ("rbd: access snapshot context and mapping size
      safely") moved ceph_get_snap_context() out of rbd_img_request_create()
      and into rbd_queue_workfn(), adding a ceph_put_snap_context() to the
      error path in rbd_queue_workfn().  However, rbd_img_request_create()
      consumes a ref on snapc, so calling ceph_put_snap_context() after
      a successful rbd_img_request_create() leads to an extra put.  Fix it.
      
      Cc: stable@vger.kernel.org # 3.18+
      Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
      Reviewed-by: default avatarJosh Durgin <jdurgin@redhat.com>
      70b16db8
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-domains' and 'pm-cpufreq' · d441fe25
      Rafael J. Wysocki authored
      * pm-domains:
        PM / Domains: Fix bad of_node_put() in failure paths of genpd_dev_pm_attach()
        PM / Domains: Validate cases of a non-bound driver in genpd governor
      
      * pm-cpufreq:
        cpufreq: use last policy after online for drivers with ->setpolicy
      d441fe25
    • Rafael J. Wysocki's avatar
      Merge branches 'acpica', 'acpi-video' and 'device-properties' · 3e5050e6
      Rafael J. Wysocki authored
      * acpica:
        ACPI: Better describe ACPI_DEBUGGER
      
      * acpi-video:
        MAINTAINERS: ACPI / video: update a file name in drivers/acpi/
      
      * device-properties:
        ACPI / property: fix compile error for acpi_node_get_property_reference() when CONFIG_ACPI=n
      3e5050e6
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-pci' and 'pm-pci' · c09c9dd2
      Rafael J. Wysocki authored
      * acpi-pci:
        x86/PCI/ACPI: Fix regression caused by commit 4d6b4e69
      
      * pm-pci:
        PCI / PM: Tune down retryable runtime suspend error messages
      c09c9dd2
    • Daniel Vetter's avatar
      drm/nouveau: Fix pre-nv50 pageflip events (v4) · bbc8764f
      Daniel Vetter authored
      Apparently pre-nv50 pageflip events happen before the actual vblank
      period. Therefore that functionality got semi-disabled in
      
      commit af4870e4
      Author: Mario Kleiner <mario.kleiner.de@gmail.com>
      Date:   Tue May 13 00:42:08 2014 +0200
      
          drm/nouveau/kms/nv04-nv40: fix pageflip events via special case.
      
      Unfortunately that hack got uprooted in
      
      commit cc1ef118
      Author: Thierry Reding <treding@nvidia.com>
      Date:   Wed Aug 12 17:00:31 2015 +0200
      
          drm/irq: Make pipe unsigned and name consistent
      
      Triggering a warning when trying to sample the vblank timestamp for a
      non-existing pipe. There's a few ways to fix this:
      
      - Open-code the old behaviour, which just enshrines this slight
        breakage of the userspace ABI.
      
      - Revert Mario's commit and again inflict broken timestamps, again not
        pretty.
      
      - Fix this for real by delaying the pageflip TS until the next vblank
        interrupt, thereby making it accurate.
      
      This patch implements the third option. Since having a page flip
      interrupt that happens when the pageflip gets armed and not when it
      completes in the next vblank seems to be fairly common (older i915 hw
      works very similarly) create a new helper to arm vblank events for
      such drivers.
      
      v2 (Mario Kleiner):
      - Fix function prototypes in drmP.h
      - Add missing vblank_put() for pageflip completion without
        pageflip event.
      - Initialize sequence number for queued pageflip event to avoid
        trouble in drm_handle_vblank_events().
      - Remove dead code and spelling fix.
      
      v3 (Mario Kleiner):
      - Add a signed-off-by and cc stable tag per Ilja's advice.
      
      v4 (Thierry Reding):
      - Fix kerneldoc typo, discovered by Michel Dänzer
      - Rearrange tags and changelog
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=106431
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Mario Kleiner <mario.kleiner.de@gmail.com>
      Acked-by: default avatarBen Skeggs <bskeggs@redhat.com>
      Cc: Ilia Mirkin <imirkin@alum.mit.edu>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Reviewed-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Cc: stable@vger.kernel.org # v4.3
      Signed-off-by: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
      Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      bbc8764f
    • Thomas Hellstrom's avatar
      drm: Fix an unwanted master inheritance v2 · a0af2e53
      Thomas Hellstrom authored
      A client calling drmSetMaster() using a file descriptor that was opened
      when another client was master would inherit the latter client's master
      object and all its authenticated clients.
      
      This is unwanted behaviour, and when this happens, instead allocate a
      brand new master object for the client calling drmSetMaster().
      
      Fixes a BUG() throw in vmw_master_set().
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      a0af2e53
    • Dave Airlie's avatar
      Merge tag 'imx-drm-fixes-2015-12-01' of git://git.pengutronix.de/git/pza/linux into drm-fixes · f46e699c
      Dave Airlie authored
      imx-drm crtc, plane, parallel panel, and TV encoder fixes
      
      - Use drm_crtc_send_vblank_event to fix per crtc vblank handling
      - Move the crtc device of_node assignment out of the ipuv3-crtc driver into
        ipu-common code, where the devices are created.
      - Fix parallel display support with simple-panels
      - Remove some unused fields and superfluous checks
      - Switch to universal planes and add error handling for primary plane creation
      - Fix module autoload for TV encoder driver
      
      * tag 'imx-drm-fixes-2015-12-01' of git://git.pengutronix.de/git/pza/linux:
        drm: imx: imx-tve: Fix module autoload for OF platform driver
        drm: imx: convert to drm_crtc_send_vblank_event()
        GPU-DRM-IMX: Delete an unnecessary check before drm_fbdev_cma_restore_mode()
        drm/imx: Remove of_node assignment from ipuv3-crtc driver probe
        gpu: ipu-v3: Assign of_node of child platform devices to corresponding ports
        gpu: ipu-v3: Remove reg_offset field
        gpu: ipu-v3: drop unused dmfc field from client platform data
        drm/imx: parallel-display: allow to determine bus format from the connected panel
        drm/imx: ipuv3-crtc: Return error if ipu_plane_init() fails for primary plane
        drm/imx: switch to universal planes
      f46e699c
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2015-12-03' of git://anongit.freedesktop.org/drm-intel into drm-fixes · 00b83070
      Dave Airlie authored
      Another batch of drm/i915 fixes for v4.4, on top of the ones from
      earlier this week. One timeout handling regression fix from Chris, and
      backport of five patches from our -next to fix a power management
      related HDMI hotplug regression.
      
      * tag 'drm-intel-fixes-2015-12-03' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: take a power domain reference while checking the HDMI live status
        drm/i915: add MISSING_CASE to a few port/aux power domain helpers
        drm/i915/ddi: fix intel_display_port_aux_power_domain() after HDMI detect
        drm/i915: Introduce a gmbus power domain
        drm/i915: Clean up AUX power domain handling
        drm/i915: Check the timeout passed to i915_wait_request
      00b83070
    • Eric Anholt's avatar
      PM / Domains: Fix bad of_node_put() in failure paths of genpd_dev_pm_attach() · 265e2cf6
      Eric Anholt authored
      It looks like these meant to be unreffing the
      of_parse_phandle_with_args() node, since the error paths above it
      don't do of_node_put.  That function returns a new ref in pd_args.np,
      though, not a new ref on dev->of_node.  Also, it would have leaked the
      ref in the success case.
      
      Fixes "ERROR: Bad of_node_put()" on bcm2835 in the -EPROBE_DEFER case.
      
      Fixes: aa42240a (PM / Domains: Add generic OF-based PM domain look-up)
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Acked-by: default avatarKevin Hilman <khilman@linaro.org>
      Cc: 3.18+ <stable@vger.kernel.org> # 3.18+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      265e2cf6